debug stmts

This commit is contained in:
xensik 2021-05-20 20:26:39 +02:00
parent e99263d697
commit 3d94bb6fb9
43 changed files with 14310 additions and 12004 deletions

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return h1::parser::make_BREAKPOINT(loc); }
"prof_begin" { return h1::parser::make_PROFBEGIN(loc); }
"prof_end" { return h1::parser::make_PROFEND(loc); }
"#include" { return h1::parser::make_INCLUDE(loc); }
"#using_animtree" { return h1::parser::make_USINGTREE(loc); }
"#animtree" { return h1::parser::make_ANIMTREE(loc); }
@ -84,7 +87,7 @@ RGX_DEFAULT (.|\n)
"true" { return h1::parser::make_TRUE(loc); }
"false" { return h1::parser::make_FALSE(loc); }
"undefined" { return h1::parser::make_UNDEFINED(loc); }
"size" { return h1::parser::make_SIZE(loc); }
".size" { return h1::parser::make_SIZE(loc); }
"game" { return h1::parser::make_GAME(loc); }
"self" { return h1::parser::make_SELF(loc); }
"anim" { return h1::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::h1::parser::symbol_type H1lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -74,7 +77,7 @@ xsk::gsc::h1::parser::symbol_type H1lex(yyscan_t yyscanner, xsk::gsc::location&
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -160,6 +163,9 @@ xsk::gsc::h1::parser::symbol_type H1lex(yyscan_t yyscanner, xsk::gsc::location&
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -211,8 +217,8 @@ xsk::gsc::h1::parser::symbol_type H1lex(yyscan_t yyscanner, xsk::gsc::location&
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -302,6 +308,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -434,6 +443,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -600,7 +624,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return h2::parser::make_BREAKPOINT(loc); }
"prof_begin" { return h2::parser::make_PROFBEGIN(loc); }
"prof_end" { return h2::parser::make_PROFEND(loc); }
"#include" { return h2::parser::make_INCLUDE(loc); }
"#using_animtree" { return h2::parser::make_USINGTREE(loc); }
"#animtree" { return h2::parser::make_ANIMTREE(loc); }
@ -84,7 +87,7 @@ RGX_DEFAULT (.|\n)
"true" { return h2::parser::make_TRUE(loc); }
"false" { return h2::parser::make_FALSE(loc); }
"undefined" { return h2::parser::make_UNDEFINED(loc); }
"size" { return h2::parser::make_SIZE(loc); }
".size" { return h2::parser::make_SIZE(loc); }
"game" { return h2::parser::make_GAME(loc); }
"self" { return h2::parser::make_SELF(loc); }
"anim" { return h2::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::h2::parser::symbol_type H2lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -74,7 +77,7 @@ xsk::gsc::h2::parser::symbol_type H2lex(yyscan_t yyscanner, xsk::gsc::location&
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -160,6 +163,9 @@ xsk::gsc::h2::parser::symbol_type H2lex(yyscan_t yyscanner, xsk::gsc::location&
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -211,8 +217,8 @@ xsk::gsc::h2::parser::symbol_type H2lex(yyscan_t yyscanner, xsk::gsc::location&
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -302,6 +308,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -434,6 +443,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -600,7 +624,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return iw5::parser::make_BREAKPOINT(loc); }
"prof_begin" { return iw5::parser::make_PROFBEGIN(loc); }
"prof_end" { return iw5::parser::make_PROFEND(loc); }
"#include" { return iw5::parser::make_INCLUDE(loc); }
"#using_animtree" { return iw5::parser::make_USINGTREE(loc); }
"#animtree" { return iw5::parser::make_ANIMTREE(loc); }
@ -83,7 +86,7 @@ RGX_DEFAULT (.|\n)
"true" { return iw5::parser::make_TRUE(loc); }
"false" { return iw5::parser::make_FALSE(loc); }
"undefined" { return iw5::parser::make_UNDEFINED(loc); }
"size" { return iw5::parser::make_SIZE(loc); }
".size" { return iw5::parser::make_SIZE(loc); }
"game" { return iw5::parser::make_GAME(loc); }
"self" { return iw5::parser::make_SELF(loc); }
"anim" { return iw5::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::iw5::parser::symbol_type IW5lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -73,7 +76,7 @@ xsk::gsc::iw5::parser::symbol_type IW5lex(yyscan_t yyscanner, xsk::gsc::location
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -158,6 +161,9 @@ xsk::gsc::iw5::parser::symbol_type IW5lex(yyscan_t yyscanner, xsk::gsc::location
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -209,8 +215,8 @@ xsk::gsc::iw5::parser::symbol_type IW5lex(yyscan_t yyscanner, xsk::gsc::location
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -299,6 +305,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -424,6 +433,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -590,7 +614,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return iw6::parser::make_BREAKPOINT(loc); }
"prof_begin" { return iw6::parser::make_PROFBEGIN(loc); }
"prof_end" { return iw6::parser::make_PROFEND(loc); }
"#include" { return iw6::parser::make_INCLUDE(loc); }
"#using_animtree" { return iw6::parser::make_USINGTREE(loc); }
"#animtree" { return iw6::parser::make_ANIMTREE(loc); }
@ -83,7 +86,7 @@ RGX_DEFAULT (.|\n)
"true" { return iw6::parser::make_TRUE(loc); }
"false" { return iw6::parser::make_FALSE(loc); }
"undefined" { return iw6::parser::make_UNDEFINED(loc); }
"size" { return iw6::parser::make_SIZE(loc); }
".size" { return iw6::parser::make_SIZE(loc); }
"game" { return iw6::parser::make_GAME(loc); }
"self" { return iw6::parser::make_SELF(loc); }
"anim" { return iw6::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::iw6::parser::symbol_type IW6lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -73,7 +76,7 @@ xsk::gsc::iw6::parser::symbol_type IW6lex(yyscan_t yyscanner, xsk::gsc::location
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -158,6 +161,9 @@ xsk::gsc::iw6::parser::symbol_type IW6lex(yyscan_t yyscanner, xsk::gsc::location
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -209,8 +215,8 @@ xsk::gsc::iw6::parser::symbol_type IW6lex(yyscan_t yyscanner, xsk::gsc::location
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -299,6 +305,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -424,6 +433,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -590,7 +614,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return iw7::parser::make_BREAKPOINT(loc); }
"prof_begin" { return iw7::parser::make_PROFBEGIN(loc); }
"prof_end" { return iw7::parser::make_PROFEND(loc); }
"#include" { return iw7::parser::make_INCLUDE(loc); }
"#using_animtree" { return iw7::parser::make_USINGTREE(loc); }
"#animtree" { return iw7::parser::make_ANIMTREE(loc); }
@ -83,7 +86,7 @@ RGX_DEFAULT (.|\n)
"true" { return iw7::parser::make_TRUE(loc); }
"false" { return iw7::parser::make_FALSE(loc); }
"undefined" { return iw7::parser::make_UNDEFINED(loc); }
"size" { return iw7::parser::make_SIZE(loc); }
".size" { return iw7::parser::make_SIZE(loc); }
"game" { return iw7::parser::make_GAME(loc); }
"self" { return iw7::parser::make_SELF(loc); }
"anim" { return iw7::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::iw7::parser::symbol_type IW7lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -73,7 +76,7 @@ xsk::gsc::iw7::parser::symbol_type IW7lex(yyscan_t yyscanner, xsk::gsc::location
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -158,6 +161,9 @@ xsk::gsc::iw7::parser::symbol_type IW7lex(yyscan_t yyscanner, xsk::gsc::location
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -209,8 +215,8 @@ xsk::gsc::iw7::parser::symbol_type IW7lex(yyscan_t yyscanner, xsk::gsc::location
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -299,6 +305,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -424,6 +433,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -590,7 +614,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return s1::parser::make_BREAKPOINT(loc); }
"prof_begin" { return s1::parser::make_PROFBEGIN(loc); }
"prof_end" { return s1::parser::make_PROFEND(loc); }
"#include" { return s1::parser::make_INCLUDE(loc); }
"#using_animtree" { return s1::parser::make_USINGTREE(loc); }
"#animtree" { return s1::parser::make_ANIMTREE(loc); }
@ -84,7 +87,7 @@ RGX_DEFAULT (.|\n)
"true" { return s1::parser::make_TRUE(loc); }
"false" { return s1::parser::make_FALSE(loc); }
"undefined" { return s1::parser::make_UNDEFINED(loc); }
"size" { return s1::parser::make_SIZE(loc); }
".size" { return s1::parser::make_SIZE(loc); }
"game" { return s1::parser::make_GAME(loc); }
"self" { return s1::parser::make_SELF(loc); }
"anim" { return s1::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::s1::parser::symbol_type S1lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -74,7 +77,7 @@ xsk::gsc::s1::parser::symbol_type S1lex(yyscan_t yyscanner, xsk::gsc::location&
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -160,6 +163,9 @@ xsk::gsc::s1::parser::symbol_type S1lex(yyscan_t yyscanner, xsk::gsc::location&
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -211,8 +217,8 @@ xsk::gsc::s1::parser::symbol_type S1lex(yyscan_t yyscanner, xsk::gsc::location&
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -302,6 +308,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -434,6 +443,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -600,7 +624,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

View File

@ -55,6 +55,9 @@ RGX_DEFAULT (.|\n)
<DEVELOPER_BLOCK_STATE>\n { loc.lines(yyleng); loc.step(); }
<DEVELOPER_BLOCK_STATE>"#/" { BEGIN(INITIAL); }
"breakpoint" { return s2::parser::make_BREAKPOINT(loc); }
"prof_begin" { return s2::parser::make_PROFBEGIN(loc); }
"prof_end" { return s2::parser::make_PROFEND(loc); }
"#include" { return s2::parser::make_INCLUDE(loc); }
"#using_animtree" { return s2::parser::make_USINGTREE(loc); }
"#animtree" { return s2::parser::make_ANIMTREE(loc); }
@ -84,7 +87,7 @@ RGX_DEFAULT (.|\n)
"true" { return s2::parser::make_TRUE(loc); }
"false" { return s2::parser::make_FALSE(loc); }
"undefined" { return s2::parser::make_UNDEFINED(loc); }
"size" { return s2::parser::make_SIZE(loc); }
".size" { return s2::parser::make_SIZE(loc); }
"game" { return s2::parser::make_GAME(loc); }
"self" { return s2::parser::make_SELF(loc); }
"anim" { return s2::parser::make_ANIM(loc); }

View File

@ -45,6 +45,9 @@ using namespace xsk::gsc;
xsk::gsc::s2::parser::symbol_type S2lex(yyscan_t yyscanner, xsk::gsc::location& loc);
}
%token BREAKPOINT "breakpoint"
%token PROFBEGIN "prof_begin"
%token PROFEND "prof_end"
%token INCLUDE "#include"
%token USINGTREE "#using_animtree"
%token ANIMTREE "#animtree"
@ -74,7 +77,7 @@ xsk::gsc::s2::parser::symbol_type S2lex(yyscan_t yyscanner, xsk::gsc::location&
%token TRUE "true"
%token FALSE "false"
%token UNDEFINED "undefined"
%token SIZE "size"
%token SIZE ".size"
%token GAME "game"
%token SELF "self"
%token ANIM "anim"
@ -160,6 +163,9 @@ xsk::gsc::s2::parser::symbol_type S2lex(yyscan_t yyscanner, xsk::gsc::location&
%type <stmt_break_ptr> stmt_break
%type <stmt_continue_ptr> stmt_continue
%type <stmt_return_ptr> stmt_return
%type <stmt_breakpoint_ptr> stmt_breakpoint
%type <stmt_prof_begin_ptr> stmt_prof_begin
%type <stmt_prof_end_ptr> stmt_prof_end
%type <stmt_ptr> for_stmt
%type <expr_ptr> for_expr
%type <expr_assign_ptr> expr_assign
@ -211,8 +217,8 @@ xsk::gsc::s2::parser::symbol_type S2lex(yyscan_t yyscanner, xsk::gsc::location&
%left OR
%left AND
%left BITWISE_OR
%left BITWISE_AND
%left BITWISE_EXOR
%left BITWISE_AND
%left EQUALITY INEQUALITY
%left LESS GREATER LESS_EQUAL GREATER_EQUAL
%left LSHIFT RSHIFT
@ -302,6 +308,9 @@ stmt
| stmt_break { $$.as_break = std::move($1); }
| stmt_continue { $$.as_continue = std::move($1); }
| stmt_return { $$.as_return = std::move($1); }
| stmt_breakpoint { $$.as_breakpoint = std::move($1); }
| stmt_prof_begin { $$.as_prof_begin = std::move($1); }
| stmt_prof_end { $$.as_prof_end = std::move($1); }
;
stmt_block
@ -434,6 +443,21 @@ stmt_return
{ $$ = std::make_unique<node_stmt_return>(@$, std::make_unique<node>(@$)); }
;
stmt_breakpoint
: BREAKPOINT SEMICOLON
{ $$ = std::make_unique<node_stmt_breakpoint>(@$); }
;
stmt_prof_begin
: PROFBEGIN LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_begin>(@$, std::move($3)); }
;
stmt_prof_end
: PROFEND LPAREN expr_arguments RPAREN SEMICOLON
{ $$ = std::make_unique<node_stmt_prof_end>(@$, std::move($3)); }
;
for_stmt
: expr_assign { $$.as_list = std::make_unique<node_stmt_list>(@$); $$.as_list->stmts.push_back(stmt_ptr(std::make_unique<node_stmt_assign>(@$, std::move($1)))); }
| { $$.as_node = std::make_unique<node>(@$); }
@ -600,7 +624,7 @@ expr_field
;
expr_size
: object DOT SIZE
: object SIZE
{ $$ = std::make_unique<node_expr_size>(@$, std::move($1)); }
;

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 146 "lexer.lpp"
#line 149 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,88 +510,97 @@ namespace xsk { namespace gsc { namespace h1 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waitframe
char dummy43[sizeof (stmt_waitframe_ptr)];
char dummy46[sizeof (stmt_waitframe_ptr)];
// stmt_waittill
char dummy44[sizeof (stmt_waittill_ptr)];
char dummy47[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy45[sizeof (stmt_waittillframeend_ptr)];
char dummy48[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy46[sizeof (stmt_waittillmatch_ptr)];
char dummy49[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy47[sizeof (stmt_while_ptr)];
char dummy50[sizeof (stmt_while_ptr)];
// string
char dummy48[sizeof (string_ptr)];
char dummy51[sizeof (string_ptr)];
// thisthread
char dummy49[sizeof (thisthread_ptr)];
char dummy52[sizeof (thisthread_ptr)];
// thread
char dummy50[sizeof (thread_ptr)];
char dummy53[sizeof (thread_ptr)];
// true
char dummy51[sizeof (true_ptr)];
char dummy54[sizeof (true_ptr)];
// undefined
char dummy52[sizeof (undefined_ptr)];
char dummy55[sizeof (undefined_ptr)];
// usingtree
char dummy53[sizeof (usingtree_ptr)];
char dummy56[sizeof (usingtree_ptr)];
// vector
char dummy54[sizeof (vector_ptr)];
char dummy57[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -643,98 +652,101 @@ namespace xsk { namespace gsc { namespace h1 {
H1EOF = 0, // "end of file"
H1error = 1, // error
H1UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
WAITFRAME = 12, // "waitframe"
IF = 13, // "if"
ELSE = 14, // "else"
WHILE = 15, // "while"
FOR = 16, // "for"
FOREACH = 17, // "foreach"
IN = 18, // "in"
SWITCH = 19, // "switch"
CASE = 20, // "case"
DEFAULT = 21, // "default"
BREAK = 22, // "break"
CONTINUE = 23, // "continue"
RETURN = 24, // "return"
THREAD = 25, // "thread"
CHILDTHREAD = 26, // "childthread"
THISTHREAD = 27, // "thisthread"
CALL = 28, // "call"
TRUE = 29, // "true"
FALSE = 30, // "false"
UNDEFINED = 31, // "undefined"
SIZE = 32, // "size"
GAME = 33, // "game"
SELF = 34, // "self"
ANIM = 35, // "anim"
LEVEL = 36, // "level"
LPAREN = 37, // "("
RPAREN = 38, // ")"
LBRACE = 39, // "{"
RBRACE = 40, // "}"
LBRACKET = 41, // "["
RBRACKET = 42, // "]"
COMMA = 43, // ","
DOT = 44, // "."
DOUBLECOLON = 45, // "::"
COLON = 46, // ":"
SEMICOLON = 47, // ";"
INCREMENT = 48, // "++"
DECREMENT = 49, // "--"
LSHIFT = 50, // "<<"
RSHIFT = 51, // ">>"
OR = 52, // "||"
AND = 53, // "&&"
EQUALITY = 54, // "=="
INEQUALITY = 55, // "!="
LESS_EQUAL = 56, // "<="
GREATER_EQUAL = 57, // ">="
LESS = 58, // "<"
GREATER = 59, // ">"
NOT = 60, // "!"
COMPLEMENT = 61, // "~"
ASSIGN = 62, // "="
ASSIGN_ADD = 63, // "+="
ASSIGN_SUB = 64, // "-="
ASSIGN_MULT = 65, // "*="
ASSIGN_DIV = 66, // "/="
ASSIGN_MOD = 67, // "%="
ASSIGN_BITWISE_OR = 68, // "|="
ASSIGN_BITWISE_AND = 69, // "&="
ASSIGN_BITWISE_EXOR = 70, // "^="
ASSIGN_RSHIFT = 71, // ">>="
ASSIGN_LSHIFT = 72, // "<<="
BITWISE_OR = 73, // "|"
BITWISE_AND = 74, // "&"
BITWISE_EXOR = 75, // "^"
ADD = 76, // "+"
SUB = 77, // "-"
MULT = 78, // "*"
DIV = 79, // "/"
MOD = 80, // "%"
FILE = 81, // "file path"
NAME = 82, // "identifier"
STRING = 83, // "string literal"
ISTRING = 84, // "localized string"
FLOAT = 85, // "float"
INTEGER = 86, // "int"
ADD_ARRAY = 87, // ADD_ARRAY
THEN = 88, // THEN
NEG = 89, // NEG
ANIMREF = 90, // ANIMREF
PREINC = 91, // PREINC
PREDEC = 92, // PREDEC
POSTINC = 93, // POSTINC
POSTDEC = 94 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
WAITFRAME = 15, // "waitframe"
IF = 16, // "if"
ELSE = 17, // "else"
WHILE = 18, // "while"
FOR = 19, // "for"
FOREACH = 20, // "foreach"
IN = 21, // "in"
SWITCH = 22, // "switch"
CASE = 23, // "case"
DEFAULT = 24, // "default"
BREAK = 25, // "break"
CONTINUE = 26, // "continue"
RETURN = 27, // "return"
THREAD = 28, // "thread"
CHILDTHREAD = 29, // "childthread"
THISTHREAD = 30, // "thisthread"
CALL = 31, // "call"
TRUE = 32, // "true"
FALSE = 33, // "false"
UNDEFINED = 34, // "undefined"
SIZE = 35, // ".size"
GAME = 36, // "game"
SELF = 37, // "self"
ANIM = 38, // "anim"
LEVEL = 39, // "level"
LPAREN = 40, // "("
RPAREN = 41, // ")"
LBRACE = 42, // "{"
RBRACE = 43, // "}"
LBRACKET = 44, // "["
RBRACKET = 45, // "]"
COMMA = 46, // ","
DOT = 47, // "."
DOUBLECOLON = 48, // "::"
COLON = 49, // ":"
SEMICOLON = 50, // ";"
INCREMENT = 51, // "++"
DECREMENT = 52, // "--"
LSHIFT = 53, // "<<"
RSHIFT = 54, // ">>"
OR = 55, // "||"
AND = 56, // "&&"
EQUALITY = 57, // "=="
INEQUALITY = 58, // "!="
LESS_EQUAL = 59, // "<="
GREATER_EQUAL = 60, // ">="
LESS = 61, // "<"
GREATER = 62, // ">"
NOT = 63, // "!"
COMPLEMENT = 64, // "~"
ASSIGN = 65, // "="
ASSIGN_ADD = 66, // "+="
ASSIGN_SUB = 67, // "-="
ASSIGN_MULT = 68, // "*="
ASSIGN_DIV = 69, // "/="
ASSIGN_MOD = 70, // "%="
ASSIGN_BITWISE_OR = 71, // "|="
ASSIGN_BITWISE_AND = 72, // "&="
ASSIGN_BITWISE_EXOR = 73, // "^="
ASSIGN_RSHIFT = 74, // ">>="
ASSIGN_LSHIFT = 75, // "<<="
BITWISE_OR = 76, // "|"
BITWISE_AND = 77, // "&"
BITWISE_EXOR = 78, // "^"
ADD = 79, // "+"
SUB = 80, // "-"
MULT = 81, // "*"
DIV = 82, // "/"
MOD = 83, // "%"
FILE = 84, // "file path"
NAME = 85, // "identifier"
STRING = 86, // "string literal"
ISTRING = 87, // "localized string"
FLOAT = 88, // "float"
INTEGER = 89, // "int"
ADD_ARRAY = 90, // ADD_ARRAY
THEN = 91, // THEN
NEG = 92, // NEG
ANIMREF = 93, // ANIMREF
PREINC = 94, // PREINC
PREDEC = 95, // PREDEC
POSTINC = 96, // POSTINC
POSTDEC = 97 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -751,176 +763,182 @@ namespace xsk { namespace gsc { namespace h1 {
{
enum symbol_kind_type
{
YYNTOKENS = 95, ///< Number of tokens.
YYNTOKENS = 98, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_WAITFRAME = 12, // "waitframe"
S_IF = 13, // "if"
S_ELSE = 14, // "else"
S_WHILE = 15, // "while"
S_FOR = 16, // "for"
S_FOREACH = 17, // "foreach"
S_IN = 18, // "in"
S_SWITCH = 19, // "switch"
S_CASE = 20, // "case"
S_DEFAULT = 21, // "default"
S_BREAK = 22, // "break"
S_CONTINUE = 23, // "continue"
S_RETURN = 24, // "return"
S_THREAD = 25, // "thread"
S_CHILDTHREAD = 26, // "childthread"
S_THISTHREAD = 27, // "thisthread"
S_CALL = 28, // "call"
S_TRUE = 29, // "true"
S_FALSE = 30, // "false"
S_UNDEFINED = 31, // "undefined"
S_SIZE = 32, // "size"
S_GAME = 33, // "game"
S_SELF = 34, // "self"
S_ANIM = 35, // "anim"
S_LEVEL = 36, // "level"
S_LPAREN = 37, // "("
S_RPAREN = 38, // ")"
S_LBRACE = 39, // "{"
S_RBRACE = 40, // "}"
S_LBRACKET = 41, // "["
S_RBRACKET = 42, // "]"
S_COMMA = 43, // ","
S_DOT = 44, // "."
S_DOUBLECOLON = 45, // "::"
S_COLON = 46, // ":"
S_SEMICOLON = 47, // ";"
S_INCREMENT = 48, // "++"
S_DECREMENT = 49, // "--"
S_LSHIFT = 50, // "<<"
S_RSHIFT = 51, // ">>"
S_OR = 52, // "||"
S_AND = 53, // "&&"
S_EQUALITY = 54, // "=="
S_INEQUALITY = 55, // "!="
S_LESS_EQUAL = 56, // "<="
S_GREATER_EQUAL = 57, // ">="
S_LESS = 58, // "<"
S_GREATER = 59, // ">"
S_NOT = 60, // "!"
S_COMPLEMENT = 61, // "~"
S_ASSIGN = 62, // "="
S_ASSIGN_ADD = 63, // "+="
S_ASSIGN_SUB = 64, // "-="
S_ASSIGN_MULT = 65, // "*="
S_ASSIGN_DIV = 66, // "/="
S_ASSIGN_MOD = 67, // "%="
S_ASSIGN_BITWISE_OR = 68, // "|="
S_ASSIGN_BITWISE_AND = 69, // "&="
S_ASSIGN_BITWISE_EXOR = 70, // "^="
S_ASSIGN_RSHIFT = 71, // ">>="
S_ASSIGN_LSHIFT = 72, // "<<="
S_BITWISE_OR = 73, // "|"
S_BITWISE_AND = 74, // "&"
S_BITWISE_EXOR = 75, // "^"
S_ADD = 76, // "+"
S_SUB = 77, // "-"
S_MULT = 78, // "*"
S_DIV = 79, // "/"
S_MOD = 80, // "%"
S_FILE = 81, // "file path"
S_NAME = 82, // "identifier"
S_STRING = 83, // "string literal"
S_ISTRING = 84, // "localized string"
S_FLOAT = 85, // "float"
S_INTEGER = 86, // "int"
S_ADD_ARRAY = 87, // ADD_ARRAY
S_THEN = 88, // THEN
S_NEG = 89, // NEG
S_ANIMREF = 90, // ANIMREF
S_PREINC = 91, // PREINC
S_PREDEC = 92, // PREDEC
S_POSTINC = 93, // POSTINC
S_POSTDEC = 94, // POSTDEC
S_YYACCEPT = 95, // $accept
S_root = 96, // root
S_program = 97, // program
S_include = 98, // include
S_define = 99, // define
S_usingtree = 100, // usingtree
S_constant = 101, // constant
S_thread = 102, // thread
S_parameters = 103, // parameters
S_stmt = 104, // stmt
S_stmt_block = 105, // stmt_block
S_stmt_list = 106, // stmt_list
S_stmt_call = 107, // stmt_call
S_stmt_assign = 108, // stmt_assign
S_stmt_endon = 109, // stmt_endon
S_stmt_notify = 110, // stmt_notify
S_stmt_wait = 111, // stmt_wait
S_stmt_waittill = 112, // stmt_waittill
S_stmt_waittillmatch = 113, // stmt_waittillmatch
S_stmt_waittillframeend = 114, // stmt_waittillframeend
S_stmt_waitframe = 115, // stmt_waitframe
S_stmt_if = 116, // stmt_if
S_stmt_ifelse = 117, // stmt_ifelse
S_stmt_while = 118, // stmt_while
S_stmt_for = 119, // stmt_for
S_stmt_foreach = 120, // stmt_foreach
S_stmt_switch = 121, // stmt_switch
S_stmt_case = 122, // stmt_case
S_stmt_default = 123, // stmt_default
S_stmt_break = 124, // stmt_break
S_stmt_continue = 125, // stmt_continue
S_stmt_return = 126, // stmt_return
S_for_stmt = 127, // for_stmt
S_for_expr = 128, // for_expr
S_expr = 129, // expr
S_expr_assign = 130, // expr_assign
S_expr_compare = 131, // expr_compare
S_expr_binary = 132, // expr_binary
S_expr_primitive = 133, // expr_primitive
S_expr_call = 134, // expr_call
S_expr_call_thread = 135, // expr_call_thread
S_expr_call_childthread = 136, // expr_call_childthread
S_expr_call_function = 137, // expr_call_function
S_expr_call_pointer = 138, // expr_call_pointer
S_expr_arguments = 139, // expr_arguments
S_expr_arguments_filled = 140, // expr_arguments_filled
S_expr_arguments_empty = 141, // expr_arguments_empty
S_expr_function = 142, // expr_function
S_expr_add_array = 143, // expr_add_array
S_expr_array = 144, // expr_array
S_expr_field = 145, // expr_field
S_expr_size = 146, // expr_size
S_object = 147, // object
S_thisthread = 148, // thisthread
S_empty_array = 149, // empty_array
S_undefined = 150, // undefined
S_game = 151, // game
S_self = 152, // self
S_anim = 153, // anim
S_level = 154, // level
S_animation = 155, // animation
S_animtree = 156, // animtree
S_name = 157, // name
S_file = 158, // file
S_istring = 159, // istring
S_string = 160, // string
S_vector = 161, // vector
S_neg_float = 162, // neg_float
S_neg_integer = 163, // neg_integer
S_float = 164, // float
S_integer = 165, // integer
S_false = 166, // false
S_true = 167 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_WAITFRAME = 15, // "waitframe"
S_IF = 16, // "if"
S_ELSE = 17, // "else"
S_WHILE = 18, // "while"
S_FOR = 19, // "for"
S_FOREACH = 20, // "foreach"
S_IN = 21, // "in"
S_SWITCH = 22, // "switch"
S_CASE = 23, // "case"
S_DEFAULT = 24, // "default"
S_BREAK = 25, // "break"
S_CONTINUE = 26, // "continue"
S_RETURN = 27, // "return"
S_THREAD = 28, // "thread"
S_CHILDTHREAD = 29, // "childthread"
S_THISTHREAD = 30, // "thisthread"
S_CALL = 31, // "call"
S_TRUE = 32, // "true"
S_FALSE = 33, // "false"
S_UNDEFINED = 34, // "undefined"
S_SIZE = 35, // ".size"
S_GAME = 36, // "game"
S_SELF = 37, // "self"
S_ANIM = 38, // "anim"
S_LEVEL = 39, // "level"
S_LPAREN = 40, // "("
S_RPAREN = 41, // ")"
S_LBRACE = 42, // "{"
S_RBRACE = 43, // "}"
S_LBRACKET = 44, // "["
S_RBRACKET = 45, // "]"
S_COMMA = 46, // ","
S_DOT = 47, // "."
S_DOUBLECOLON = 48, // "::"
S_COLON = 49, // ":"
S_SEMICOLON = 50, // ";"
S_INCREMENT = 51, // "++"
S_DECREMENT = 52, // "--"
S_LSHIFT = 53, // "<<"
S_RSHIFT = 54, // ">>"
S_OR = 55, // "||"
S_AND = 56, // "&&"
S_EQUALITY = 57, // "=="
S_INEQUALITY = 58, // "!="
S_LESS_EQUAL = 59, // "<="
S_GREATER_EQUAL = 60, // ">="
S_LESS = 61, // "<"
S_GREATER = 62, // ">"
S_NOT = 63, // "!"
S_COMPLEMENT = 64, // "~"
S_ASSIGN = 65, // "="
S_ASSIGN_ADD = 66, // "+="
S_ASSIGN_SUB = 67, // "-="
S_ASSIGN_MULT = 68, // "*="
S_ASSIGN_DIV = 69, // "/="
S_ASSIGN_MOD = 70, // "%="
S_ASSIGN_BITWISE_OR = 71, // "|="
S_ASSIGN_BITWISE_AND = 72, // "&="
S_ASSIGN_BITWISE_EXOR = 73, // "^="
S_ASSIGN_RSHIFT = 74, // ">>="
S_ASSIGN_LSHIFT = 75, // "<<="
S_BITWISE_OR = 76, // "|"
S_BITWISE_AND = 77, // "&"
S_BITWISE_EXOR = 78, // "^"
S_ADD = 79, // "+"
S_SUB = 80, // "-"
S_MULT = 81, // "*"
S_DIV = 82, // "/"
S_MOD = 83, // "%"
S_FILE = 84, // "file path"
S_NAME = 85, // "identifier"
S_STRING = 86, // "string literal"
S_ISTRING = 87, // "localized string"
S_FLOAT = 88, // "float"
S_INTEGER = 89, // "int"
S_ADD_ARRAY = 90, // ADD_ARRAY
S_THEN = 91, // THEN
S_NEG = 92, // NEG
S_ANIMREF = 93, // ANIMREF
S_PREINC = 94, // PREINC
S_PREDEC = 95, // PREDEC
S_POSTINC = 96, // POSTINC
S_POSTDEC = 97, // POSTDEC
S_YYACCEPT = 98, // $accept
S_root = 99, // root
S_program = 100, // program
S_include = 101, // include
S_define = 102, // define
S_usingtree = 103, // usingtree
S_constant = 104, // constant
S_thread = 105, // thread
S_parameters = 106, // parameters
S_stmt = 107, // stmt
S_stmt_block = 108, // stmt_block
S_stmt_list = 109, // stmt_list
S_stmt_call = 110, // stmt_call
S_stmt_assign = 111, // stmt_assign
S_stmt_endon = 112, // stmt_endon
S_stmt_notify = 113, // stmt_notify
S_stmt_wait = 114, // stmt_wait
S_stmt_waittill = 115, // stmt_waittill
S_stmt_waittillmatch = 116, // stmt_waittillmatch
S_stmt_waittillframeend = 117, // stmt_waittillframeend
S_stmt_waitframe = 118, // stmt_waitframe
S_stmt_if = 119, // stmt_if
S_stmt_ifelse = 120, // stmt_ifelse
S_stmt_while = 121, // stmt_while
S_stmt_for = 122, // stmt_for
S_stmt_foreach = 123, // stmt_foreach
S_stmt_switch = 124, // stmt_switch
S_stmt_case = 125, // stmt_case
S_stmt_default = 126, // stmt_default
S_stmt_break = 127, // stmt_break
S_stmt_continue = 128, // stmt_continue
S_stmt_return = 129, // stmt_return
S_stmt_breakpoint = 130, // stmt_breakpoint
S_stmt_prof_begin = 131, // stmt_prof_begin
S_stmt_prof_end = 132, // stmt_prof_end
S_for_stmt = 133, // for_stmt
S_for_expr = 134, // for_expr
S_expr = 135, // expr
S_expr_assign = 136, // expr_assign
S_expr_compare = 137, // expr_compare
S_expr_binary = 138, // expr_binary
S_expr_primitive = 139, // expr_primitive
S_expr_call = 140, // expr_call
S_expr_call_thread = 141, // expr_call_thread
S_expr_call_childthread = 142, // expr_call_childthread
S_expr_call_function = 143, // expr_call_function
S_expr_call_pointer = 144, // expr_call_pointer
S_expr_arguments = 145, // expr_arguments
S_expr_arguments_filled = 146, // expr_arguments_filled
S_expr_arguments_empty = 147, // expr_arguments_empty
S_expr_function = 148, // expr_function
S_expr_add_array = 149, // expr_add_array
S_expr_array = 150, // expr_array
S_expr_field = 151, // expr_field
S_expr_size = 152, // expr_size
S_object = 153, // object
S_thisthread = 154, // thisthread
S_empty_array = 155, // empty_array
S_undefined = 156, // undefined
S_game = 157, // game
S_self = 158, // self
S_anim = 159, // anim
S_level = 160, // level
S_animation = 161, // animation
S_animtree = 162, // animtree
S_name = 163, // name
S_file = 164, // file
S_istring = 165, // istring
S_string = 166, // string
S_vector = 167, // vector
S_neg_float = 168, // neg_float
S_neg_integer = 169, // neg_integer
S_float = 170, // float
S_integer = 171, // integer
S_false = 172, // false
S_true = 173 // true
};
};
@ -1086,6 +1104,10 @@ namespace xsk { namespace gsc { namespace h1 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1131,6 +1153,14 @@ namespace xsk { namespace gsc { namespace h1 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1597,6 +1627,20 @@ namespace xsk { namespace gsc { namespace h1 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1751,6 +1795,34 @@ namespace xsk { namespace gsc { namespace h1 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2126,6 +2198,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2171,6 +2247,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2437,6 +2521,51 @@ switch (yykind)
return symbol_type (token::H1UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4161,8 +4290,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1581, ///< Last index in yytable_.
yynnts_ = 73, ///< Number of nonterminal symbols.
yylast_ = 1646, ///< Last index in yytable_.
yynnts_ = 76, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4319,6 +4448,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4364,6 +4497,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4587,6 +4728,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4632,6 +4777,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4760,7 +4913,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::h1
#line 4764 "parser.hpp"
#line 4917 "parser.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 146 "lexer.lpp"
#line 149 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,88 +510,97 @@ namespace xsk { namespace gsc { namespace h2 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waitframe
char dummy43[sizeof (stmt_waitframe_ptr)];
char dummy46[sizeof (stmt_waitframe_ptr)];
// stmt_waittill
char dummy44[sizeof (stmt_waittill_ptr)];
char dummy47[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy45[sizeof (stmt_waittillframeend_ptr)];
char dummy48[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy46[sizeof (stmt_waittillmatch_ptr)];
char dummy49[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy47[sizeof (stmt_while_ptr)];
char dummy50[sizeof (stmt_while_ptr)];
// string
char dummy48[sizeof (string_ptr)];
char dummy51[sizeof (string_ptr)];
// thisthread
char dummy49[sizeof (thisthread_ptr)];
char dummy52[sizeof (thisthread_ptr)];
// thread
char dummy50[sizeof (thread_ptr)];
char dummy53[sizeof (thread_ptr)];
// true
char dummy51[sizeof (true_ptr)];
char dummy54[sizeof (true_ptr)];
// undefined
char dummy52[sizeof (undefined_ptr)];
char dummy55[sizeof (undefined_ptr)];
// usingtree
char dummy53[sizeof (usingtree_ptr)];
char dummy56[sizeof (usingtree_ptr)];
// vector
char dummy54[sizeof (vector_ptr)];
char dummy57[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -643,98 +652,101 @@ namespace xsk { namespace gsc { namespace h2 {
H2EOF = 0, // "end of file"
H2error = 1, // error
H2UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
WAITFRAME = 12, // "waitframe"
IF = 13, // "if"
ELSE = 14, // "else"
WHILE = 15, // "while"
FOR = 16, // "for"
FOREACH = 17, // "foreach"
IN = 18, // "in"
SWITCH = 19, // "switch"
CASE = 20, // "case"
DEFAULT = 21, // "default"
BREAK = 22, // "break"
CONTINUE = 23, // "continue"
RETURN = 24, // "return"
THREAD = 25, // "thread"
CHILDTHREAD = 26, // "childthread"
THISTHREAD = 27, // "thisthread"
CALL = 28, // "call"
TRUE = 29, // "true"
FALSE = 30, // "false"
UNDEFINED = 31, // "undefined"
SIZE = 32, // "size"
GAME = 33, // "game"
SELF = 34, // "self"
ANIM = 35, // "anim"
LEVEL = 36, // "level"
LPAREN = 37, // "("
RPAREN = 38, // ")"
LBRACE = 39, // "{"
RBRACE = 40, // "}"
LBRACKET = 41, // "["
RBRACKET = 42, // "]"
COMMA = 43, // ","
DOT = 44, // "."
DOUBLECOLON = 45, // "::"
COLON = 46, // ":"
SEMICOLON = 47, // ";"
INCREMENT = 48, // "++"
DECREMENT = 49, // "--"
LSHIFT = 50, // "<<"
RSHIFT = 51, // ">>"
OR = 52, // "||"
AND = 53, // "&&"
EQUALITY = 54, // "=="
INEQUALITY = 55, // "!="
LESS_EQUAL = 56, // "<="
GREATER_EQUAL = 57, // ">="
LESS = 58, // "<"
GREATER = 59, // ">"
NOT = 60, // "!"
COMPLEMENT = 61, // "~"
ASSIGN = 62, // "="
ASSIGN_ADD = 63, // "+="
ASSIGN_SUB = 64, // "-="
ASSIGN_MULT = 65, // "*="
ASSIGN_DIV = 66, // "/="
ASSIGN_MOD = 67, // "%="
ASSIGN_BITWISE_OR = 68, // "|="
ASSIGN_BITWISE_AND = 69, // "&="
ASSIGN_BITWISE_EXOR = 70, // "^="
ASSIGN_RSHIFT = 71, // ">>="
ASSIGN_LSHIFT = 72, // "<<="
BITWISE_OR = 73, // "|"
BITWISE_AND = 74, // "&"
BITWISE_EXOR = 75, // "^"
ADD = 76, // "+"
SUB = 77, // "-"
MULT = 78, // "*"
DIV = 79, // "/"
MOD = 80, // "%"
FILE = 81, // "file path"
NAME = 82, // "identifier"
STRING = 83, // "string literal"
ISTRING = 84, // "localized string"
FLOAT = 85, // "float"
INTEGER = 86, // "int"
ADD_ARRAY = 87, // ADD_ARRAY
THEN = 88, // THEN
NEG = 89, // NEG
ANIMREF = 90, // ANIMREF
PREINC = 91, // PREINC
PREDEC = 92, // PREDEC
POSTINC = 93, // POSTINC
POSTDEC = 94 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
WAITFRAME = 15, // "waitframe"
IF = 16, // "if"
ELSE = 17, // "else"
WHILE = 18, // "while"
FOR = 19, // "for"
FOREACH = 20, // "foreach"
IN = 21, // "in"
SWITCH = 22, // "switch"
CASE = 23, // "case"
DEFAULT = 24, // "default"
BREAK = 25, // "break"
CONTINUE = 26, // "continue"
RETURN = 27, // "return"
THREAD = 28, // "thread"
CHILDTHREAD = 29, // "childthread"
THISTHREAD = 30, // "thisthread"
CALL = 31, // "call"
TRUE = 32, // "true"
FALSE = 33, // "false"
UNDEFINED = 34, // "undefined"
SIZE = 35, // ".size"
GAME = 36, // "game"
SELF = 37, // "self"
ANIM = 38, // "anim"
LEVEL = 39, // "level"
LPAREN = 40, // "("
RPAREN = 41, // ")"
LBRACE = 42, // "{"
RBRACE = 43, // "}"
LBRACKET = 44, // "["
RBRACKET = 45, // "]"
COMMA = 46, // ","
DOT = 47, // "."
DOUBLECOLON = 48, // "::"
COLON = 49, // ":"
SEMICOLON = 50, // ";"
INCREMENT = 51, // "++"
DECREMENT = 52, // "--"
LSHIFT = 53, // "<<"
RSHIFT = 54, // ">>"
OR = 55, // "||"
AND = 56, // "&&"
EQUALITY = 57, // "=="
INEQUALITY = 58, // "!="
LESS_EQUAL = 59, // "<="
GREATER_EQUAL = 60, // ">="
LESS = 61, // "<"
GREATER = 62, // ">"
NOT = 63, // "!"
COMPLEMENT = 64, // "~"
ASSIGN = 65, // "="
ASSIGN_ADD = 66, // "+="
ASSIGN_SUB = 67, // "-="
ASSIGN_MULT = 68, // "*="
ASSIGN_DIV = 69, // "/="
ASSIGN_MOD = 70, // "%="
ASSIGN_BITWISE_OR = 71, // "|="
ASSIGN_BITWISE_AND = 72, // "&="
ASSIGN_BITWISE_EXOR = 73, // "^="
ASSIGN_RSHIFT = 74, // ">>="
ASSIGN_LSHIFT = 75, // "<<="
BITWISE_OR = 76, // "|"
BITWISE_AND = 77, // "&"
BITWISE_EXOR = 78, // "^"
ADD = 79, // "+"
SUB = 80, // "-"
MULT = 81, // "*"
DIV = 82, // "/"
MOD = 83, // "%"
FILE = 84, // "file path"
NAME = 85, // "identifier"
STRING = 86, // "string literal"
ISTRING = 87, // "localized string"
FLOAT = 88, // "float"
INTEGER = 89, // "int"
ADD_ARRAY = 90, // ADD_ARRAY
THEN = 91, // THEN
NEG = 92, // NEG
ANIMREF = 93, // ANIMREF
PREINC = 94, // PREINC
PREDEC = 95, // PREDEC
POSTINC = 96, // POSTINC
POSTDEC = 97 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -751,176 +763,182 @@ namespace xsk { namespace gsc { namespace h2 {
{
enum symbol_kind_type
{
YYNTOKENS = 95, ///< Number of tokens.
YYNTOKENS = 98, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_WAITFRAME = 12, // "waitframe"
S_IF = 13, // "if"
S_ELSE = 14, // "else"
S_WHILE = 15, // "while"
S_FOR = 16, // "for"
S_FOREACH = 17, // "foreach"
S_IN = 18, // "in"
S_SWITCH = 19, // "switch"
S_CASE = 20, // "case"
S_DEFAULT = 21, // "default"
S_BREAK = 22, // "break"
S_CONTINUE = 23, // "continue"
S_RETURN = 24, // "return"
S_THREAD = 25, // "thread"
S_CHILDTHREAD = 26, // "childthread"
S_THISTHREAD = 27, // "thisthread"
S_CALL = 28, // "call"
S_TRUE = 29, // "true"
S_FALSE = 30, // "false"
S_UNDEFINED = 31, // "undefined"
S_SIZE = 32, // "size"
S_GAME = 33, // "game"
S_SELF = 34, // "self"
S_ANIM = 35, // "anim"
S_LEVEL = 36, // "level"
S_LPAREN = 37, // "("
S_RPAREN = 38, // ")"
S_LBRACE = 39, // "{"
S_RBRACE = 40, // "}"
S_LBRACKET = 41, // "["
S_RBRACKET = 42, // "]"
S_COMMA = 43, // ","
S_DOT = 44, // "."
S_DOUBLECOLON = 45, // "::"
S_COLON = 46, // ":"
S_SEMICOLON = 47, // ";"
S_INCREMENT = 48, // "++"
S_DECREMENT = 49, // "--"
S_LSHIFT = 50, // "<<"
S_RSHIFT = 51, // ">>"
S_OR = 52, // "||"
S_AND = 53, // "&&"
S_EQUALITY = 54, // "=="
S_INEQUALITY = 55, // "!="
S_LESS_EQUAL = 56, // "<="
S_GREATER_EQUAL = 57, // ">="
S_LESS = 58, // "<"
S_GREATER = 59, // ">"
S_NOT = 60, // "!"
S_COMPLEMENT = 61, // "~"
S_ASSIGN = 62, // "="
S_ASSIGN_ADD = 63, // "+="
S_ASSIGN_SUB = 64, // "-="
S_ASSIGN_MULT = 65, // "*="
S_ASSIGN_DIV = 66, // "/="
S_ASSIGN_MOD = 67, // "%="
S_ASSIGN_BITWISE_OR = 68, // "|="
S_ASSIGN_BITWISE_AND = 69, // "&="
S_ASSIGN_BITWISE_EXOR = 70, // "^="
S_ASSIGN_RSHIFT = 71, // ">>="
S_ASSIGN_LSHIFT = 72, // "<<="
S_BITWISE_OR = 73, // "|"
S_BITWISE_AND = 74, // "&"
S_BITWISE_EXOR = 75, // "^"
S_ADD = 76, // "+"
S_SUB = 77, // "-"
S_MULT = 78, // "*"
S_DIV = 79, // "/"
S_MOD = 80, // "%"
S_FILE = 81, // "file path"
S_NAME = 82, // "identifier"
S_STRING = 83, // "string literal"
S_ISTRING = 84, // "localized string"
S_FLOAT = 85, // "float"
S_INTEGER = 86, // "int"
S_ADD_ARRAY = 87, // ADD_ARRAY
S_THEN = 88, // THEN
S_NEG = 89, // NEG
S_ANIMREF = 90, // ANIMREF
S_PREINC = 91, // PREINC
S_PREDEC = 92, // PREDEC
S_POSTINC = 93, // POSTINC
S_POSTDEC = 94, // POSTDEC
S_YYACCEPT = 95, // $accept
S_root = 96, // root
S_program = 97, // program
S_include = 98, // include
S_define = 99, // define
S_usingtree = 100, // usingtree
S_constant = 101, // constant
S_thread = 102, // thread
S_parameters = 103, // parameters
S_stmt = 104, // stmt
S_stmt_block = 105, // stmt_block
S_stmt_list = 106, // stmt_list
S_stmt_call = 107, // stmt_call
S_stmt_assign = 108, // stmt_assign
S_stmt_endon = 109, // stmt_endon
S_stmt_notify = 110, // stmt_notify
S_stmt_wait = 111, // stmt_wait
S_stmt_waittill = 112, // stmt_waittill
S_stmt_waittillmatch = 113, // stmt_waittillmatch
S_stmt_waittillframeend = 114, // stmt_waittillframeend
S_stmt_waitframe = 115, // stmt_waitframe
S_stmt_if = 116, // stmt_if
S_stmt_ifelse = 117, // stmt_ifelse
S_stmt_while = 118, // stmt_while
S_stmt_for = 119, // stmt_for
S_stmt_foreach = 120, // stmt_foreach
S_stmt_switch = 121, // stmt_switch
S_stmt_case = 122, // stmt_case
S_stmt_default = 123, // stmt_default
S_stmt_break = 124, // stmt_break
S_stmt_continue = 125, // stmt_continue
S_stmt_return = 126, // stmt_return
S_for_stmt = 127, // for_stmt
S_for_expr = 128, // for_expr
S_expr = 129, // expr
S_expr_assign = 130, // expr_assign
S_expr_compare = 131, // expr_compare
S_expr_binary = 132, // expr_binary
S_expr_primitive = 133, // expr_primitive
S_expr_call = 134, // expr_call
S_expr_call_thread = 135, // expr_call_thread
S_expr_call_childthread = 136, // expr_call_childthread
S_expr_call_function = 137, // expr_call_function
S_expr_call_pointer = 138, // expr_call_pointer
S_expr_arguments = 139, // expr_arguments
S_expr_arguments_filled = 140, // expr_arguments_filled
S_expr_arguments_empty = 141, // expr_arguments_empty
S_expr_function = 142, // expr_function
S_expr_add_array = 143, // expr_add_array
S_expr_array = 144, // expr_array
S_expr_field = 145, // expr_field
S_expr_size = 146, // expr_size
S_object = 147, // object
S_thisthread = 148, // thisthread
S_empty_array = 149, // empty_array
S_undefined = 150, // undefined
S_game = 151, // game
S_self = 152, // self
S_anim = 153, // anim
S_level = 154, // level
S_animation = 155, // animation
S_animtree = 156, // animtree
S_name = 157, // name
S_file = 158, // file
S_istring = 159, // istring
S_string = 160, // string
S_vector = 161, // vector
S_neg_float = 162, // neg_float
S_neg_integer = 163, // neg_integer
S_float = 164, // float
S_integer = 165, // integer
S_false = 166, // false
S_true = 167 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_WAITFRAME = 15, // "waitframe"
S_IF = 16, // "if"
S_ELSE = 17, // "else"
S_WHILE = 18, // "while"
S_FOR = 19, // "for"
S_FOREACH = 20, // "foreach"
S_IN = 21, // "in"
S_SWITCH = 22, // "switch"
S_CASE = 23, // "case"
S_DEFAULT = 24, // "default"
S_BREAK = 25, // "break"
S_CONTINUE = 26, // "continue"
S_RETURN = 27, // "return"
S_THREAD = 28, // "thread"
S_CHILDTHREAD = 29, // "childthread"
S_THISTHREAD = 30, // "thisthread"
S_CALL = 31, // "call"
S_TRUE = 32, // "true"
S_FALSE = 33, // "false"
S_UNDEFINED = 34, // "undefined"
S_SIZE = 35, // ".size"
S_GAME = 36, // "game"
S_SELF = 37, // "self"
S_ANIM = 38, // "anim"
S_LEVEL = 39, // "level"
S_LPAREN = 40, // "("
S_RPAREN = 41, // ")"
S_LBRACE = 42, // "{"
S_RBRACE = 43, // "}"
S_LBRACKET = 44, // "["
S_RBRACKET = 45, // "]"
S_COMMA = 46, // ","
S_DOT = 47, // "."
S_DOUBLECOLON = 48, // "::"
S_COLON = 49, // ":"
S_SEMICOLON = 50, // ";"
S_INCREMENT = 51, // "++"
S_DECREMENT = 52, // "--"
S_LSHIFT = 53, // "<<"
S_RSHIFT = 54, // ">>"
S_OR = 55, // "||"
S_AND = 56, // "&&"
S_EQUALITY = 57, // "=="
S_INEQUALITY = 58, // "!="
S_LESS_EQUAL = 59, // "<="
S_GREATER_EQUAL = 60, // ">="
S_LESS = 61, // "<"
S_GREATER = 62, // ">"
S_NOT = 63, // "!"
S_COMPLEMENT = 64, // "~"
S_ASSIGN = 65, // "="
S_ASSIGN_ADD = 66, // "+="
S_ASSIGN_SUB = 67, // "-="
S_ASSIGN_MULT = 68, // "*="
S_ASSIGN_DIV = 69, // "/="
S_ASSIGN_MOD = 70, // "%="
S_ASSIGN_BITWISE_OR = 71, // "|="
S_ASSIGN_BITWISE_AND = 72, // "&="
S_ASSIGN_BITWISE_EXOR = 73, // "^="
S_ASSIGN_RSHIFT = 74, // ">>="
S_ASSIGN_LSHIFT = 75, // "<<="
S_BITWISE_OR = 76, // "|"
S_BITWISE_AND = 77, // "&"
S_BITWISE_EXOR = 78, // "^"
S_ADD = 79, // "+"
S_SUB = 80, // "-"
S_MULT = 81, // "*"
S_DIV = 82, // "/"
S_MOD = 83, // "%"
S_FILE = 84, // "file path"
S_NAME = 85, // "identifier"
S_STRING = 86, // "string literal"
S_ISTRING = 87, // "localized string"
S_FLOAT = 88, // "float"
S_INTEGER = 89, // "int"
S_ADD_ARRAY = 90, // ADD_ARRAY
S_THEN = 91, // THEN
S_NEG = 92, // NEG
S_ANIMREF = 93, // ANIMREF
S_PREINC = 94, // PREINC
S_PREDEC = 95, // PREDEC
S_POSTINC = 96, // POSTINC
S_POSTDEC = 97, // POSTDEC
S_YYACCEPT = 98, // $accept
S_root = 99, // root
S_program = 100, // program
S_include = 101, // include
S_define = 102, // define
S_usingtree = 103, // usingtree
S_constant = 104, // constant
S_thread = 105, // thread
S_parameters = 106, // parameters
S_stmt = 107, // stmt
S_stmt_block = 108, // stmt_block
S_stmt_list = 109, // stmt_list
S_stmt_call = 110, // stmt_call
S_stmt_assign = 111, // stmt_assign
S_stmt_endon = 112, // stmt_endon
S_stmt_notify = 113, // stmt_notify
S_stmt_wait = 114, // stmt_wait
S_stmt_waittill = 115, // stmt_waittill
S_stmt_waittillmatch = 116, // stmt_waittillmatch
S_stmt_waittillframeend = 117, // stmt_waittillframeend
S_stmt_waitframe = 118, // stmt_waitframe
S_stmt_if = 119, // stmt_if
S_stmt_ifelse = 120, // stmt_ifelse
S_stmt_while = 121, // stmt_while
S_stmt_for = 122, // stmt_for
S_stmt_foreach = 123, // stmt_foreach
S_stmt_switch = 124, // stmt_switch
S_stmt_case = 125, // stmt_case
S_stmt_default = 126, // stmt_default
S_stmt_break = 127, // stmt_break
S_stmt_continue = 128, // stmt_continue
S_stmt_return = 129, // stmt_return
S_stmt_breakpoint = 130, // stmt_breakpoint
S_stmt_prof_begin = 131, // stmt_prof_begin
S_stmt_prof_end = 132, // stmt_prof_end
S_for_stmt = 133, // for_stmt
S_for_expr = 134, // for_expr
S_expr = 135, // expr
S_expr_assign = 136, // expr_assign
S_expr_compare = 137, // expr_compare
S_expr_binary = 138, // expr_binary
S_expr_primitive = 139, // expr_primitive
S_expr_call = 140, // expr_call
S_expr_call_thread = 141, // expr_call_thread
S_expr_call_childthread = 142, // expr_call_childthread
S_expr_call_function = 143, // expr_call_function
S_expr_call_pointer = 144, // expr_call_pointer
S_expr_arguments = 145, // expr_arguments
S_expr_arguments_filled = 146, // expr_arguments_filled
S_expr_arguments_empty = 147, // expr_arguments_empty
S_expr_function = 148, // expr_function
S_expr_add_array = 149, // expr_add_array
S_expr_array = 150, // expr_array
S_expr_field = 151, // expr_field
S_expr_size = 152, // expr_size
S_object = 153, // object
S_thisthread = 154, // thisthread
S_empty_array = 155, // empty_array
S_undefined = 156, // undefined
S_game = 157, // game
S_self = 158, // self
S_anim = 159, // anim
S_level = 160, // level
S_animation = 161, // animation
S_animtree = 162, // animtree
S_name = 163, // name
S_file = 164, // file
S_istring = 165, // istring
S_string = 166, // string
S_vector = 167, // vector
S_neg_float = 168, // neg_float
S_neg_integer = 169, // neg_integer
S_float = 170, // float
S_integer = 171, // integer
S_false = 172, // false
S_true = 173 // true
};
};
@ -1086,6 +1104,10 @@ namespace xsk { namespace gsc { namespace h2 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1131,6 +1153,14 @@ namespace xsk { namespace gsc { namespace h2 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1597,6 +1627,20 @@ namespace xsk { namespace gsc { namespace h2 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1751,6 +1795,34 @@ namespace xsk { namespace gsc { namespace h2 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2126,6 +2198,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2171,6 +2247,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2437,6 +2521,51 @@ switch (yykind)
return symbol_type (token::H2UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4161,8 +4290,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1581, ///< Last index in yytable_.
yynnts_ = 73, ///< Number of nonterminal symbols.
yylast_ = 1646, ///< Last index in yytable_.
yynnts_ = 76, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4319,6 +4448,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4364,6 +4497,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4587,6 +4728,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4632,6 +4777,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4760,7 +4913,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::h2
#line 4764 "parser.hpp"
#line 4917 "parser.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 145 "lexer.lpp"
#line 148 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,85 +510,94 @@ namespace xsk { namespace gsc { namespace iw5 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waittill
char dummy43[sizeof (stmt_waittill_ptr)];
char dummy46[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy44[sizeof (stmt_waittillframeend_ptr)];
char dummy47[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy45[sizeof (stmt_waittillmatch_ptr)];
char dummy48[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy46[sizeof (stmt_while_ptr)];
char dummy49[sizeof (stmt_while_ptr)];
// string
char dummy47[sizeof (string_ptr)];
char dummy50[sizeof (string_ptr)];
// thisthread
char dummy48[sizeof (thisthread_ptr)];
char dummy51[sizeof (thisthread_ptr)];
// thread
char dummy49[sizeof (thread_ptr)];
char dummy52[sizeof (thread_ptr)];
// true
char dummy50[sizeof (true_ptr)];
char dummy53[sizeof (true_ptr)];
// undefined
char dummy51[sizeof (undefined_ptr)];
char dummy54[sizeof (undefined_ptr)];
// usingtree
char dummy52[sizeof (usingtree_ptr)];
char dummy55[sizeof (usingtree_ptr)];
// vector
char dummy53[sizeof (vector_ptr)];
char dummy56[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -640,97 +649,100 @@ namespace xsk { namespace gsc { namespace iw5 {
IW5EOF = 0, // "end of file"
IW5error = 1, // error
IW5UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
IF = 12, // "if"
ELSE = 13, // "else"
WHILE = 14, // "while"
FOR = 15, // "for"
FOREACH = 16, // "foreach"
IN = 17, // "in"
SWITCH = 18, // "switch"
CASE = 19, // "case"
DEFAULT = 20, // "default"
BREAK = 21, // "break"
CONTINUE = 22, // "continue"
RETURN = 23, // "return"
THREAD = 24, // "thread"
CHILDTHREAD = 25, // "childthread"
THISTHREAD = 26, // "thisthread"
CALL = 27, // "call"
TRUE = 28, // "true"
FALSE = 29, // "false"
UNDEFINED = 30, // "undefined"
SIZE = 31, // "size"
GAME = 32, // "game"
SELF = 33, // "self"
ANIM = 34, // "anim"
LEVEL = 35, // "level"
LPAREN = 36, // "("
RPAREN = 37, // ")"
LBRACE = 38, // "{"
RBRACE = 39, // "}"
LBRACKET = 40, // "["
RBRACKET = 41, // "]"
COMMA = 42, // ","
DOT = 43, // "."
DOUBLECOLON = 44, // "::"
COLON = 45, // ":"
SEMICOLON = 46, // ";"
INCREMENT = 47, // "++"
DECREMENT = 48, // "--"
LSHIFT = 49, // "<<"
RSHIFT = 50, // ">>"
OR = 51, // "||"
AND = 52, // "&&"
EQUALITY = 53, // "=="
INEQUALITY = 54, // "!="
LESS_EQUAL = 55, // "<="
GREATER_EQUAL = 56, // ">="
LESS = 57, // "<"
GREATER = 58, // ">"
NOT = 59, // "!"
COMPLEMENT = 60, // "~"
ASSIGN = 61, // "="
ASSIGN_ADD = 62, // "+="
ASSIGN_SUB = 63, // "-="
ASSIGN_MULT = 64, // "*="
ASSIGN_DIV = 65, // "/="
ASSIGN_MOD = 66, // "%="
ASSIGN_BITWISE_OR = 67, // "|="
ASSIGN_BITWISE_AND = 68, // "&="
ASSIGN_BITWISE_EXOR = 69, // "^="
ASSIGN_RSHIFT = 70, // ">>="
ASSIGN_LSHIFT = 71, // "<<="
BITWISE_OR = 72, // "|"
BITWISE_AND = 73, // "&"
BITWISE_EXOR = 74, // "^"
ADD = 75, // "+"
SUB = 76, // "-"
MULT = 77, // "*"
DIV = 78, // "/"
MOD = 79, // "%"
FILE = 80, // "file path"
NAME = 81, // "identifier"
STRING = 82, // "string literal"
ISTRING = 83, // "localized string"
FLOAT = 84, // "float"
INTEGER = 85, // "int"
ADD_ARRAY = 86, // ADD_ARRAY
THEN = 87, // THEN
NEG = 88, // NEG
ANIMREF = 89, // ANIMREF
PREINC = 90, // PREINC
PREDEC = 91, // PREDEC
POSTINC = 92, // POSTINC
POSTDEC = 93 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
IF = 15, // "if"
ELSE = 16, // "else"
WHILE = 17, // "while"
FOR = 18, // "for"
FOREACH = 19, // "foreach"
IN = 20, // "in"
SWITCH = 21, // "switch"
CASE = 22, // "case"
DEFAULT = 23, // "default"
BREAK = 24, // "break"
CONTINUE = 25, // "continue"
RETURN = 26, // "return"
THREAD = 27, // "thread"
CHILDTHREAD = 28, // "childthread"
THISTHREAD = 29, // "thisthread"
CALL = 30, // "call"
TRUE = 31, // "true"
FALSE = 32, // "false"
UNDEFINED = 33, // "undefined"
SIZE = 34, // ".size"
GAME = 35, // "game"
SELF = 36, // "self"
ANIM = 37, // "anim"
LEVEL = 38, // "level"
LPAREN = 39, // "("
RPAREN = 40, // ")"
LBRACE = 41, // "{"
RBRACE = 42, // "}"
LBRACKET = 43, // "["
RBRACKET = 44, // "]"
COMMA = 45, // ","
DOT = 46, // "."
DOUBLECOLON = 47, // "::"
COLON = 48, // ":"
SEMICOLON = 49, // ";"
INCREMENT = 50, // "++"
DECREMENT = 51, // "--"
LSHIFT = 52, // "<<"
RSHIFT = 53, // ">>"
OR = 54, // "||"
AND = 55, // "&&"
EQUALITY = 56, // "=="
INEQUALITY = 57, // "!="
LESS_EQUAL = 58, // "<="
GREATER_EQUAL = 59, // ">="
LESS = 60, // "<"
GREATER = 61, // ">"
NOT = 62, // "!"
COMPLEMENT = 63, // "~"
ASSIGN = 64, // "="
ASSIGN_ADD = 65, // "+="
ASSIGN_SUB = 66, // "-="
ASSIGN_MULT = 67, // "*="
ASSIGN_DIV = 68, // "/="
ASSIGN_MOD = 69, // "%="
ASSIGN_BITWISE_OR = 70, // "|="
ASSIGN_BITWISE_AND = 71, // "&="
ASSIGN_BITWISE_EXOR = 72, // "^="
ASSIGN_RSHIFT = 73, // ">>="
ASSIGN_LSHIFT = 74, // "<<="
BITWISE_OR = 75, // "|"
BITWISE_AND = 76, // "&"
BITWISE_EXOR = 77, // "^"
ADD = 78, // "+"
SUB = 79, // "-"
MULT = 80, // "*"
DIV = 81, // "/"
MOD = 82, // "%"
FILE = 83, // "file path"
NAME = 84, // "identifier"
STRING = 85, // "string literal"
ISTRING = 86, // "localized string"
FLOAT = 87, // "float"
INTEGER = 88, // "int"
ADD_ARRAY = 89, // ADD_ARRAY
THEN = 90, // THEN
NEG = 91, // NEG
ANIMREF = 92, // ANIMREF
PREINC = 93, // PREINC
PREDEC = 94, // PREDEC
POSTINC = 95, // POSTINC
POSTDEC = 96 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -747,174 +759,180 @@ namespace xsk { namespace gsc { namespace iw5 {
{
enum symbol_kind_type
{
YYNTOKENS = 94, ///< Number of tokens.
YYNTOKENS = 97, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_IF = 12, // "if"
S_ELSE = 13, // "else"
S_WHILE = 14, // "while"
S_FOR = 15, // "for"
S_FOREACH = 16, // "foreach"
S_IN = 17, // "in"
S_SWITCH = 18, // "switch"
S_CASE = 19, // "case"
S_DEFAULT = 20, // "default"
S_BREAK = 21, // "break"
S_CONTINUE = 22, // "continue"
S_RETURN = 23, // "return"
S_THREAD = 24, // "thread"
S_CHILDTHREAD = 25, // "childthread"
S_THISTHREAD = 26, // "thisthread"
S_CALL = 27, // "call"
S_TRUE = 28, // "true"
S_FALSE = 29, // "false"
S_UNDEFINED = 30, // "undefined"
S_SIZE = 31, // "size"
S_GAME = 32, // "game"
S_SELF = 33, // "self"
S_ANIM = 34, // "anim"
S_LEVEL = 35, // "level"
S_LPAREN = 36, // "("
S_RPAREN = 37, // ")"
S_LBRACE = 38, // "{"
S_RBRACE = 39, // "}"
S_LBRACKET = 40, // "["
S_RBRACKET = 41, // "]"
S_COMMA = 42, // ","
S_DOT = 43, // "."
S_DOUBLECOLON = 44, // "::"
S_COLON = 45, // ":"
S_SEMICOLON = 46, // ";"
S_INCREMENT = 47, // "++"
S_DECREMENT = 48, // "--"
S_LSHIFT = 49, // "<<"
S_RSHIFT = 50, // ">>"
S_OR = 51, // "||"
S_AND = 52, // "&&"
S_EQUALITY = 53, // "=="
S_INEQUALITY = 54, // "!="
S_LESS_EQUAL = 55, // "<="
S_GREATER_EQUAL = 56, // ">="
S_LESS = 57, // "<"
S_GREATER = 58, // ">"
S_NOT = 59, // "!"
S_COMPLEMENT = 60, // "~"
S_ASSIGN = 61, // "="
S_ASSIGN_ADD = 62, // "+="
S_ASSIGN_SUB = 63, // "-="
S_ASSIGN_MULT = 64, // "*="
S_ASSIGN_DIV = 65, // "/="
S_ASSIGN_MOD = 66, // "%="
S_ASSIGN_BITWISE_OR = 67, // "|="
S_ASSIGN_BITWISE_AND = 68, // "&="
S_ASSIGN_BITWISE_EXOR = 69, // "^="
S_ASSIGN_RSHIFT = 70, // ">>="
S_ASSIGN_LSHIFT = 71, // "<<="
S_BITWISE_OR = 72, // "|"
S_BITWISE_AND = 73, // "&"
S_BITWISE_EXOR = 74, // "^"
S_ADD = 75, // "+"
S_SUB = 76, // "-"
S_MULT = 77, // "*"
S_DIV = 78, // "/"
S_MOD = 79, // "%"
S_FILE = 80, // "file path"
S_NAME = 81, // "identifier"
S_STRING = 82, // "string literal"
S_ISTRING = 83, // "localized string"
S_FLOAT = 84, // "float"
S_INTEGER = 85, // "int"
S_ADD_ARRAY = 86, // ADD_ARRAY
S_THEN = 87, // THEN
S_NEG = 88, // NEG
S_ANIMREF = 89, // ANIMREF
S_PREINC = 90, // PREINC
S_PREDEC = 91, // PREDEC
S_POSTINC = 92, // POSTINC
S_POSTDEC = 93, // POSTDEC
S_YYACCEPT = 94, // $accept
S_root = 95, // root
S_program = 96, // program
S_include = 97, // include
S_define = 98, // define
S_usingtree = 99, // usingtree
S_constant = 100, // constant
S_thread = 101, // thread
S_parameters = 102, // parameters
S_stmt = 103, // stmt
S_stmt_block = 104, // stmt_block
S_stmt_list = 105, // stmt_list
S_stmt_call = 106, // stmt_call
S_stmt_assign = 107, // stmt_assign
S_stmt_endon = 108, // stmt_endon
S_stmt_notify = 109, // stmt_notify
S_stmt_wait = 110, // stmt_wait
S_stmt_waittill = 111, // stmt_waittill
S_stmt_waittillmatch = 112, // stmt_waittillmatch
S_stmt_waittillframeend = 113, // stmt_waittillframeend
S_stmt_if = 114, // stmt_if
S_stmt_ifelse = 115, // stmt_ifelse
S_stmt_while = 116, // stmt_while
S_stmt_for = 117, // stmt_for
S_stmt_foreach = 118, // stmt_foreach
S_stmt_switch = 119, // stmt_switch
S_stmt_case = 120, // stmt_case
S_stmt_default = 121, // stmt_default
S_stmt_break = 122, // stmt_break
S_stmt_continue = 123, // stmt_continue
S_stmt_return = 124, // stmt_return
S_for_stmt = 125, // for_stmt
S_for_expr = 126, // for_expr
S_expr = 127, // expr
S_expr_assign = 128, // expr_assign
S_expr_compare = 129, // expr_compare
S_expr_binary = 130, // expr_binary
S_expr_primitive = 131, // expr_primitive
S_expr_call = 132, // expr_call
S_expr_call_thread = 133, // expr_call_thread
S_expr_call_childthread = 134, // expr_call_childthread
S_expr_call_function = 135, // expr_call_function
S_expr_call_pointer = 136, // expr_call_pointer
S_expr_arguments = 137, // expr_arguments
S_expr_arguments_filled = 138, // expr_arguments_filled
S_expr_arguments_empty = 139, // expr_arguments_empty
S_expr_function = 140, // expr_function
S_expr_add_array = 141, // expr_add_array
S_expr_array = 142, // expr_array
S_expr_field = 143, // expr_field
S_expr_size = 144, // expr_size
S_object = 145, // object
S_thisthread = 146, // thisthread
S_empty_array = 147, // empty_array
S_undefined = 148, // undefined
S_game = 149, // game
S_self = 150, // self
S_anim = 151, // anim
S_level = 152, // level
S_animation = 153, // animation
S_animtree = 154, // animtree
S_name = 155, // name
S_file = 156, // file
S_istring = 157, // istring
S_string = 158, // string
S_vector = 159, // vector
S_neg_float = 160, // neg_float
S_neg_integer = 161, // neg_integer
S_float = 162, // float
S_integer = 163, // integer
S_false = 164, // false
S_true = 165 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_IF = 15, // "if"
S_ELSE = 16, // "else"
S_WHILE = 17, // "while"
S_FOR = 18, // "for"
S_FOREACH = 19, // "foreach"
S_IN = 20, // "in"
S_SWITCH = 21, // "switch"
S_CASE = 22, // "case"
S_DEFAULT = 23, // "default"
S_BREAK = 24, // "break"
S_CONTINUE = 25, // "continue"
S_RETURN = 26, // "return"
S_THREAD = 27, // "thread"
S_CHILDTHREAD = 28, // "childthread"
S_THISTHREAD = 29, // "thisthread"
S_CALL = 30, // "call"
S_TRUE = 31, // "true"
S_FALSE = 32, // "false"
S_UNDEFINED = 33, // "undefined"
S_SIZE = 34, // ".size"
S_GAME = 35, // "game"
S_SELF = 36, // "self"
S_ANIM = 37, // "anim"
S_LEVEL = 38, // "level"
S_LPAREN = 39, // "("
S_RPAREN = 40, // ")"
S_LBRACE = 41, // "{"
S_RBRACE = 42, // "}"
S_LBRACKET = 43, // "["
S_RBRACKET = 44, // "]"
S_COMMA = 45, // ","
S_DOT = 46, // "."
S_DOUBLECOLON = 47, // "::"
S_COLON = 48, // ":"
S_SEMICOLON = 49, // ";"
S_INCREMENT = 50, // "++"
S_DECREMENT = 51, // "--"
S_LSHIFT = 52, // "<<"
S_RSHIFT = 53, // ">>"
S_OR = 54, // "||"
S_AND = 55, // "&&"
S_EQUALITY = 56, // "=="
S_INEQUALITY = 57, // "!="
S_LESS_EQUAL = 58, // "<="
S_GREATER_EQUAL = 59, // ">="
S_LESS = 60, // "<"
S_GREATER = 61, // ">"
S_NOT = 62, // "!"
S_COMPLEMENT = 63, // "~"
S_ASSIGN = 64, // "="
S_ASSIGN_ADD = 65, // "+="
S_ASSIGN_SUB = 66, // "-="
S_ASSIGN_MULT = 67, // "*="
S_ASSIGN_DIV = 68, // "/="
S_ASSIGN_MOD = 69, // "%="
S_ASSIGN_BITWISE_OR = 70, // "|="
S_ASSIGN_BITWISE_AND = 71, // "&="
S_ASSIGN_BITWISE_EXOR = 72, // "^="
S_ASSIGN_RSHIFT = 73, // ">>="
S_ASSIGN_LSHIFT = 74, // "<<="
S_BITWISE_OR = 75, // "|"
S_BITWISE_AND = 76, // "&"
S_BITWISE_EXOR = 77, // "^"
S_ADD = 78, // "+"
S_SUB = 79, // "-"
S_MULT = 80, // "*"
S_DIV = 81, // "/"
S_MOD = 82, // "%"
S_FILE = 83, // "file path"
S_NAME = 84, // "identifier"
S_STRING = 85, // "string literal"
S_ISTRING = 86, // "localized string"
S_FLOAT = 87, // "float"
S_INTEGER = 88, // "int"
S_ADD_ARRAY = 89, // ADD_ARRAY
S_THEN = 90, // THEN
S_NEG = 91, // NEG
S_ANIMREF = 92, // ANIMREF
S_PREINC = 93, // PREINC
S_PREDEC = 94, // PREDEC
S_POSTINC = 95, // POSTINC
S_POSTDEC = 96, // POSTDEC
S_YYACCEPT = 97, // $accept
S_root = 98, // root
S_program = 99, // program
S_include = 100, // include
S_define = 101, // define
S_usingtree = 102, // usingtree
S_constant = 103, // constant
S_thread = 104, // thread
S_parameters = 105, // parameters
S_stmt = 106, // stmt
S_stmt_block = 107, // stmt_block
S_stmt_list = 108, // stmt_list
S_stmt_call = 109, // stmt_call
S_stmt_assign = 110, // stmt_assign
S_stmt_endon = 111, // stmt_endon
S_stmt_notify = 112, // stmt_notify
S_stmt_wait = 113, // stmt_wait
S_stmt_waittill = 114, // stmt_waittill
S_stmt_waittillmatch = 115, // stmt_waittillmatch
S_stmt_waittillframeend = 116, // stmt_waittillframeend
S_stmt_if = 117, // stmt_if
S_stmt_ifelse = 118, // stmt_ifelse
S_stmt_while = 119, // stmt_while
S_stmt_for = 120, // stmt_for
S_stmt_foreach = 121, // stmt_foreach
S_stmt_switch = 122, // stmt_switch
S_stmt_case = 123, // stmt_case
S_stmt_default = 124, // stmt_default
S_stmt_break = 125, // stmt_break
S_stmt_continue = 126, // stmt_continue
S_stmt_return = 127, // stmt_return
S_stmt_breakpoint = 128, // stmt_breakpoint
S_stmt_prof_begin = 129, // stmt_prof_begin
S_stmt_prof_end = 130, // stmt_prof_end
S_for_stmt = 131, // for_stmt
S_for_expr = 132, // for_expr
S_expr = 133, // expr
S_expr_assign = 134, // expr_assign
S_expr_compare = 135, // expr_compare
S_expr_binary = 136, // expr_binary
S_expr_primitive = 137, // expr_primitive
S_expr_call = 138, // expr_call
S_expr_call_thread = 139, // expr_call_thread
S_expr_call_childthread = 140, // expr_call_childthread
S_expr_call_function = 141, // expr_call_function
S_expr_call_pointer = 142, // expr_call_pointer
S_expr_arguments = 143, // expr_arguments
S_expr_arguments_filled = 144, // expr_arguments_filled
S_expr_arguments_empty = 145, // expr_arguments_empty
S_expr_function = 146, // expr_function
S_expr_add_array = 147, // expr_add_array
S_expr_array = 148, // expr_array
S_expr_field = 149, // expr_field
S_expr_size = 150, // expr_size
S_object = 151, // object
S_thisthread = 152, // thisthread
S_empty_array = 153, // empty_array
S_undefined = 154, // undefined
S_game = 155, // game
S_self = 156, // self
S_anim = 157, // anim
S_level = 158, // level
S_animation = 159, // animation
S_animtree = 160, // animtree
S_name = 161, // name
S_file = 162, // file
S_istring = 163, // istring
S_string = 164, // string
S_vector = 165, // vector
S_neg_float = 166, // neg_float
S_neg_integer = 167, // neg_integer
S_float = 168, // float
S_integer = 169, // integer
S_false = 170, // false
S_true = 171 // true
};
};
@ -1080,6 +1098,10 @@ namespace xsk { namespace gsc { namespace iw5 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1125,6 +1147,14 @@ namespace xsk { namespace gsc { namespace iw5 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1587,6 +1617,20 @@ namespace xsk { namespace gsc { namespace iw5 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1741,6 +1785,34 @@ namespace xsk { namespace gsc { namespace iw5 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2102,6 +2174,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2147,6 +2223,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2409,6 +2493,51 @@ switch (yykind)
return symbol_type (token::IW5UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4118,8 +4247,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1590, ///< Last index in yytable_.
yynnts_ = 72, ///< Number of nonterminal symbols.
yylast_ = 1556, ///< Last index in yytable_.
yynnts_ = 75, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4276,6 +4405,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4321,6 +4454,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4540,6 +4681,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4585,6 +4730,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4709,7 +4862,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::iw5
#line 4713 "parser.hpp"
#line 4866 "parser.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 145 "lexer.lpp"
#line 148 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,85 +510,94 @@ namespace xsk { namespace gsc { namespace iw6 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waittill
char dummy43[sizeof (stmt_waittill_ptr)];
char dummy46[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy44[sizeof (stmt_waittillframeend_ptr)];
char dummy47[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy45[sizeof (stmt_waittillmatch_ptr)];
char dummy48[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy46[sizeof (stmt_while_ptr)];
char dummy49[sizeof (stmt_while_ptr)];
// string
char dummy47[sizeof (string_ptr)];
char dummy50[sizeof (string_ptr)];
// thisthread
char dummy48[sizeof (thisthread_ptr)];
char dummy51[sizeof (thisthread_ptr)];
// thread
char dummy49[sizeof (thread_ptr)];
char dummy52[sizeof (thread_ptr)];
// true
char dummy50[sizeof (true_ptr)];
char dummy53[sizeof (true_ptr)];
// undefined
char dummy51[sizeof (undefined_ptr)];
char dummy54[sizeof (undefined_ptr)];
// usingtree
char dummy52[sizeof (usingtree_ptr)];
char dummy55[sizeof (usingtree_ptr)];
// vector
char dummy53[sizeof (vector_ptr)];
char dummy56[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -640,97 +649,100 @@ namespace xsk { namespace gsc { namespace iw6 {
IW6EOF = 0, // "end of file"
IW6error = 1, // error
IW6UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
IF = 12, // "if"
ELSE = 13, // "else"
WHILE = 14, // "while"
FOR = 15, // "for"
FOREACH = 16, // "foreach"
IN = 17, // "in"
SWITCH = 18, // "switch"
CASE = 19, // "case"
DEFAULT = 20, // "default"
BREAK = 21, // "break"
CONTINUE = 22, // "continue"
RETURN = 23, // "return"
THREAD = 24, // "thread"
CHILDTHREAD = 25, // "childthread"
THISTHREAD = 26, // "thisthread"
CALL = 27, // "call"
TRUE = 28, // "true"
FALSE = 29, // "false"
UNDEFINED = 30, // "undefined"
SIZE = 31, // "size"
GAME = 32, // "game"
SELF = 33, // "self"
ANIM = 34, // "anim"
LEVEL = 35, // "level"
LPAREN = 36, // "("
RPAREN = 37, // ")"
LBRACE = 38, // "{"
RBRACE = 39, // "}"
LBRACKET = 40, // "["
RBRACKET = 41, // "]"
COMMA = 42, // ","
DOT = 43, // "."
DOUBLECOLON = 44, // "::"
COLON = 45, // ":"
SEMICOLON = 46, // ";"
INCREMENT = 47, // "++"
DECREMENT = 48, // "--"
LSHIFT = 49, // "<<"
RSHIFT = 50, // ">>"
OR = 51, // "||"
AND = 52, // "&&"
EQUALITY = 53, // "=="
INEQUALITY = 54, // "!="
LESS_EQUAL = 55, // "<="
GREATER_EQUAL = 56, // ">="
LESS = 57, // "<"
GREATER = 58, // ">"
NOT = 59, // "!"
COMPLEMENT = 60, // "~"
ASSIGN = 61, // "="
ASSIGN_ADD = 62, // "+="
ASSIGN_SUB = 63, // "-="
ASSIGN_MULT = 64, // "*="
ASSIGN_DIV = 65, // "/="
ASSIGN_MOD = 66, // "%="
ASSIGN_BITWISE_OR = 67, // "|="
ASSIGN_BITWISE_AND = 68, // "&="
ASSIGN_BITWISE_EXOR = 69, // "^="
ASSIGN_RSHIFT = 70, // ">>="
ASSIGN_LSHIFT = 71, // "<<="
BITWISE_OR = 72, // "|"
BITWISE_AND = 73, // "&"
BITWISE_EXOR = 74, // "^"
ADD = 75, // "+"
SUB = 76, // "-"
MULT = 77, // "*"
DIV = 78, // "/"
MOD = 79, // "%"
FILE = 80, // "file path"
NAME = 81, // "identifier"
STRING = 82, // "string literal"
ISTRING = 83, // "localized string"
FLOAT = 84, // "float"
INTEGER = 85, // "int"
ADD_ARRAY = 86, // ADD_ARRAY
THEN = 87, // THEN
NEG = 88, // NEG
ANIMREF = 89, // ANIMREF
PREINC = 90, // PREINC
PREDEC = 91, // PREDEC
POSTINC = 92, // POSTINC
POSTDEC = 93 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
IF = 15, // "if"
ELSE = 16, // "else"
WHILE = 17, // "while"
FOR = 18, // "for"
FOREACH = 19, // "foreach"
IN = 20, // "in"
SWITCH = 21, // "switch"
CASE = 22, // "case"
DEFAULT = 23, // "default"
BREAK = 24, // "break"
CONTINUE = 25, // "continue"
RETURN = 26, // "return"
THREAD = 27, // "thread"
CHILDTHREAD = 28, // "childthread"
THISTHREAD = 29, // "thisthread"
CALL = 30, // "call"
TRUE = 31, // "true"
FALSE = 32, // "false"
UNDEFINED = 33, // "undefined"
SIZE = 34, // ".size"
GAME = 35, // "game"
SELF = 36, // "self"
ANIM = 37, // "anim"
LEVEL = 38, // "level"
LPAREN = 39, // "("
RPAREN = 40, // ")"
LBRACE = 41, // "{"
RBRACE = 42, // "}"
LBRACKET = 43, // "["
RBRACKET = 44, // "]"
COMMA = 45, // ","
DOT = 46, // "."
DOUBLECOLON = 47, // "::"
COLON = 48, // ":"
SEMICOLON = 49, // ";"
INCREMENT = 50, // "++"
DECREMENT = 51, // "--"
LSHIFT = 52, // "<<"
RSHIFT = 53, // ">>"
OR = 54, // "||"
AND = 55, // "&&"
EQUALITY = 56, // "=="
INEQUALITY = 57, // "!="
LESS_EQUAL = 58, // "<="
GREATER_EQUAL = 59, // ">="
LESS = 60, // "<"
GREATER = 61, // ">"
NOT = 62, // "!"
COMPLEMENT = 63, // "~"
ASSIGN = 64, // "="
ASSIGN_ADD = 65, // "+="
ASSIGN_SUB = 66, // "-="
ASSIGN_MULT = 67, // "*="
ASSIGN_DIV = 68, // "/="
ASSIGN_MOD = 69, // "%="
ASSIGN_BITWISE_OR = 70, // "|="
ASSIGN_BITWISE_AND = 71, // "&="
ASSIGN_BITWISE_EXOR = 72, // "^="
ASSIGN_RSHIFT = 73, // ">>="
ASSIGN_LSHIFT = 74, // "<<="
BITWISE_OR = 75, // "|"
BITWISE_AND = 76, // "&"
BITWISE_EXOR = 77, // "^"
ADD = 78, // "+"
SUB = 79, // "-"
MULT = 80, // "*"
DIV = 81, // "/"
MOD = 82, // "%"
FILE = 83, // "file path"
NAME = 84, // "identifier"
STRING = 85, // "string literal"
ISTRING = 86, // "localized string"
FLOAT = 87, // "float"
INTEGER = 88, // "int"
ADD_ARRAY = 89, // ADD_ARRAY
THEN = 90, // THEN
NEG = 91, // NEG
ANIMREF = 92, // ANIMREF
PREINC = 93, // PREINC
PREDEC = 94, // PREDEC
POSTINC = 95, // POSTINC
POSTDEC = 96 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -747,174 +759,180 @@ namespace xsk { namespace gsc { namespace iw6 {
{
enum symbol_kind_type
{
YYNTOKENS = 94, ///< Number of tokens.
YYNTOKENS = 97, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_IF = 12, // "if"
S_ELSE = 13, // "else"
S_WHILE = 14, // "while"
S_FOR = 15, // "for"
S_FOREACH = 16, // "foreach"
S_IN = 17, // "in"
S_SWITCH = 18, // "switch"
S_CASE = 19, // "case"
S_DEFAULT = 20, // "default"
S_BREAK = 21, // "break"
S_CONTINUE = 22, // "continue"
S_RETURN = 23, // "return"
S_THREAD = 24, // "thread"
S_CHILDTHREAD = 25, // "childthread"
S_THISTHREAD = 26, // "thisthread"
S_CALL = 27, // "call"
S_TRUE = 28, // "true"
S_FALSE = 29, // "false"
S_UNDEFINED = 30, // "undefined"
S_SIZE = 31, // "size"
S_GAME = 32, // "game"
S_SELF = 33, // "self"
S_ANIM = 34, // "anim"
S_LEVEL = 35, // "level"
S_LPAREN = 36, // "("
S_RPAREN = 37, // ")"
S_LBRACE = 38, // "{"
S_RBRACE = 39, // "}"
S_LBRACKET = 40, // "["
S_RBRACKET = 41, // "]"
S_COMMA = 42, // ","
S_DOT = 43, // "."
S_DOUBLECOLON = 44, // "::"
S_COLON = 45, // ":"
S_SEMICOLON = 46, // ";"
S_INCREMENT = 47, // "++"
S_DECREMENT = 48, // "--"
S_LSHIFT = 49, // "<<"
S_RSHIFT = 50, // ">>"
S_OR = 51, // "||"
S_AND = 52, // "&&"
S_EQUALITY = 53, // "=="
S_INEQUALITY = 54, // "!="
S_LESS_EQUAL = 55, // "<="
S_GREATER_EQUAL = 56, // ">="
S_LESS = 57, // "<"
S_GREATER = 58, // ">"
S_NOT = 59, // "!"
S_COMPLEMENT = 60, // "~"
S_ASSIGN = 61, // "="
S_ASSIGN_ADD = 62, // "+="
S_ASSIGN_SUB = 63, // "-="
S_ASSIGN_MULT = 64, // "*="
S_ASSIGN_DIV = 65, // "/="
S_ASSIGN_MOD = 66, // "%="
S_ASSIGN_BITWISE_OR = 67, // "|="
S_ASSIGN_BITWISE_AND = 68, // "&="
S_ASSIGN_BITWISE_EXOR = 69, // "^="
S_ASSIGN_RSHIFT = 70, // ">>="
S_ASSIGN_LSHIFT = 71, // "<<="
S_BITWISE_OR = 72, // "|"
S_BITWISE_AND = 73, // "&"
S_BITWISE_EXOR = 74, // "^"
S_ADD = 75, // "+"
S_SUB = 76, // "-"
S_MULT = 77, // "*"
S_DIV = 78, // "/"
S_MOD = 79, // "%"
S_FILE = 80, // "file path"
S_NAME = 81, // "identifier"
S_STRING = 82, // "string literal"
S_ISTRING = 83, // "localized string"
S_FLOAT = 84, // "float"
S_INTEGER = 85, // "int"
S_ADD_ARRAY = 86, // ADD_ARRAY
S_THEN = 87, // THEN
S_NEG = 88, // NEG
S_ANIMREF = 89, // ANIMREF
S_PREINC = 90, // PREINC
S_PREDEC = 91, // PREDEC
S_POSTINC = 92, // POSTINC
S_POSTDEC = 93, // POSTDEC
S_YYACCEPT = 94, // $accept
S_root = 95, // root
S_program = 96, // program
S_include = 97, // include
S_define = 98, // define
S_usingtree = 99, // usingtree
S_constant = 100, // constant
S_thread = 101, // thread
S_parameters = 102, // parameters
S_stmt = 103, // stmt
S_stmt_block = 104, // stmt_block
S_stmt_list = 105, // stmt_list
S_stmt_call = 106, // stmt_call
S_stmt_assign = 107, // stmt_assign
S_stmt_endon = 108, // stmt_endon
S_stmt_notify = 109, // stmt_notify
S_stmt_wait = 110, // stmt_wait
S_stmt_waittill = 111, // stmt_waittill
S_stmt_waittillmatch = 112, // stmt_waittillmatch
S_stmt_waittillframeend = 113, // stmt_waittillframeend
S_stmt_if = 114, // stmt_if
S_stmt_ifelse = 115, // stmt_ifelse
S_stmt_while = 116, // stmt_while
S_stmt_for = 117, // stmt_for
S_stmt_foreach = 118, // stmt_foreach
S_stmt_switch = 119, // stmt_switch
S_stmt_case = 120, // stmt_case
S_stmt_default = 121, // stmt_default
S_stmt_break = 122, // stmt_break
S_stmt_continue = 123, // stmt_continue
S_stmt_return = 124, // stmt_return
S_for_stmt = 125, // for_stmt
S_for_expr = 126, // for_expr
S_expr = 127, // expr
S_expr_assign = 128, // expr_assign
S_expr_compare = 129, // expr_compare
S_expr_binary = 130, // expr_binary
S_expr_primitive = 131, // expr_primitive
S_expr_call = 132, // expr_call
S_expr_call_thread = 133, // expr_call_thread
S_expr_call_childthread = 134, // expr_call_childthread
S_expr_call_function = 135, // expr_call_function
S_expr_call_pointer = 136, // expr_call_pointer
S_expr_arguments = 137, // expr_arguments
S_expr_arguments_filled = 138, // expr_arguments_filled
S_expr_arguments_empty = 139, // expr_arguments_empty
S_expr_function = 140, // expr_function
S_expr_add_array = 141, // expr_add_array
S_expr_array = 142, // expr_array
S_expr_field = 143, // expr_field
S_expr_size = 144, // expr_size
S_object = 145, // object
S_thisthread = 146, // thisthread
S_empty_array = 147, // empty_array
S_undefined = 148, // undefined
S_game = 149, // game
S_self = 150, // self
S_anim = 151, // anim
S_level = 152, // level
S_animation = 153, // animation
S_animtree = 154, // animtree
S_name = 155, // name
S_file = 156, // file
S_istring = 157, // istring
S_string = 158, // string
S_vector = 159, // vector
S_neg_float = 160, // neg_float
S_neg_integer = 161, // neg_integer
S_float = 162, // float
S_integer = 163, // integer
S_false = 164, // false
S_true = 165 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_IF = 15, // "if"
S_ELSE = 16, // "else"
S_WHILE = 17, // "while"
S_FOR = 18, // "for"
S_FOREACH = 19, // "foreach"
S_IN = 20, // "in"
S_SWITCH = 21, // "switch"
S_CASE = 22, // "case"
S_DEFAULT = 23, // "default"
S_BREAK = 24, // "break"
S_CONTINUE = 25, // "continue"
S_RETURN = 26, // "return"
S_THREAD = 27, // "thread"
S_CHILDTHREAD = 28, // "childthread"
S_THISTHREAD = 29, // "thisthread"
S_CALL = 30, // "call"
S_TRUE = 31, // "true"
S_FALSE = 32, // "false"
S_UNDEFINED = 33, // "undefined"
S_SIZE = 34, // ".size"
S_GAME = 35, // "game"
S_SELF = 36, // "self"
S_ANIM = 37, // "anim"
S_LEVEL = 38, // "level"
S_LPAREN = 39, // "("
S_RPAREN = 40, // ")"
S_LBRACE = 41, // "{"
S_RBRACE = 42, // "}"
S_LBRACKET = 43, // "["
S_RBRACKET = 44, // "]"
S_COMMA = 45, // ","
S_DOT = 46, // "."
S_DOUBLECOLON = 47, // "::"
S_COLON = 48, // ":"
S_SEMICOLON = 49, // ";"
S_INCREMENT = 50, // "++"
S_DECREMENT = 51, // "--"
S_LSHIFT = 52, // "<<"
S_RSHIFT = 53, // ">>"
S_OR = 54, // "||"
S_AND = 55, // "&&"
S_EQUALITY = 56, // "=="
S_INEQUALITY = 57, // "!="
S_LESS_EQUAL = 58, // "<="
S_GREATER_EQUAL = 59, // ">="
S_LESS = 60, // "<"
S_GREATER = 61, // ">"
S_NOT = 62, // "!"
S_COMPLEMENT = 63, // "~"
S_ASSIGN = 64, // "="
S_ASSIGN_ADD = 65, // "+="
S_ASSIGN_SUB = 66, // "-="
S_ASSIGN_MULT = 67, // "*="
S_ASSIGN_DIV = 68, // "/="
S_ASSIGN_MOD = 69, // "%="
S_ASSIGN_BITWISE_OR = 70, // "|="
S_ASSIGN_BITWISE_AND = 71, // "&="
S_ASSIGN_BITWISE_EXOR = 72, // "^="
S_ASSIGN_RSHIFT = 73, // ">>="
S_ASSIGN_LSHIFT = 74, // "<<="
S_BITWISE_OR = 75, // "|"
S_BITWISE_AND = 76, // "&"
S_BITWISE_EXOR = 77, // "^"
S_ADD = 78, // "+"
S_SUB = 79, // "-"
S_MULT = 80, // "*"
S_DIV = 81, // "/"
S_MOD = 82, // "%"
S_FILE = 83, // "file path"
S_NAME = 84, // "identifier"
S_STRING = 85, // "string literal"
S_ISTRING = 86, // "localized string"
S_FLOAT = 87, // "float"
S_INTEGER = 88, // "int"
S_ADD_ARRAY = 89, // ADD_ARRAY
S_THEN = 90, // THEN
S_NEG = 91, // NEG
S_ANIMREF = 92, // ANIMREF
S_PREINC = 93, // PREINC
S_PREDEC = 94, // PREDEC
S_POSTINC = 95, // POSTINC
S_POSTDEC = 96, // POSTDEC
S_YYACCEPT = 97, // $accept
S_root = 98, // root
S_program = 99, // program
S_include = 100, // include
S_define = 101, // define
S_usingtree = 102, // usingtree
S_constant = 103, // constant
S_thread = 104, // thread
S_parameters = 105, // parameters
S_stmt = 106, // stmt
S_stmt_block = 107, // stmt_block
S_stmt_list = 108, // stmt_list
S_stmt_call = 109, // stmt_call
S_stmt_assign = 110, // stmt_assign
S_stmt_endon = 111, // stmt_endon
S_stmt_notify = 112, // stmt_notify
S_stmt_wait = 113, // stmt_wait
S_stmt_waittill = 114, // stmt_waittill
S_stmt_waittillmatch = 115, // stmt_waittillmatch
S_stmt_waittillframeend = 116, // stmt_waittillframeend
S_stmt_if = 117, // stmt_if
S_stmt_ifelse = 118, // stmt_ifelse
S_stmt_while = 119, // stmt_while
S_stmt_for = 120, // stmt_for
S_stmt_foreach = 121, // stmt_foreach
S_stmt_switch = 122, // stmt_switch
S_stmt_case = 123, // stmt_case
S_stmt_default = 124, // stmt_default
S_stmt_break = 125, // stmt_break
S_stmt_continue = 126, // stmt_continue
S_stmt_return = 127, // stmt_return
S_stmt_breakpoint = 128, // stmt_breakpoint
S_stmt_prof_begin = 129, // stmt_prof_begin
S_stmt_prof_end = 130, // stmt_prof_end
S_for_stmt = 131, // for_stmt
S_for_expr = 132, // for_expr
S_expr = 133, // expr
S_expr_assign = 134, // expr_assign
S_expr_compare = 135, // expr_compare
S_expr_binary = 136, // expr_binary
S_expr_primitive = 137, // expr_primitive
S_expr_call = 138, // expr_call
S_expr_call_thread = 139, // expr_call_thread
S_expr_call_childthread = 140, // expr_call_childthread
S_expr_call_function = 141, // expr_call_function
S_expr_call_pointer = 142, // expr_call_pointer
S_expr_arguments = 143, // expr_arguments
S_expr_arguments_filled = 144, // expr_arguments_filled
S_expr_arguments_empty = 145, // expr_arguments_empty
S_expr_function = 146, // expr_function
S_expr_add_array = 147, // expr_add_array
S_expr_array = 148, // expr_array
S_expr_field = 149, // expr_field
S_expr_size = 150, // expr_size
S_object = 151, // object
S_thisthread = 152, // thisthread
S_empty_array = 153, // empty_array
S_undefined = 154, // undefined
S_game = 155, // game
S_self = 156, // self
S_anim = 157, // anim
S_level = 158, // level
S_animation = 159, // animation
S_animtree = 160, // animtree
S_name = 161, // name
S_file = 162, // file
S_istring = 163, // istring
S_string = 164, // string
S_vector = 165, // vector
S_neg_float = 166, // neg_float
S_neg_integer = 167, // neg_integer
S_float = 168, // float
S_integer = 169, // integer
S_false = 170, // false
S_true = 171 // true
};
};
@ -1080,6 +1098,10 @@ namespace xsk { namespace gsc { namespace iw6 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1125,6 +1147,14 @@ namespace xsk { namespace gsc { namespace iw6 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1587,6 +1617,20 @@ namespace xsk { namespace gsc { namespace iw6 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1741,6 +1785,34 @@ namespace xsk { namespace gsc { namespace iw6 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2102,6 +2174,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2147,6 +2223,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2409,6 +2493,51 @@ switch (yykind)
return symbol_type (token::IW6UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4118,8 +4247,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1580, ///< Last index in yytable_.
yynnts_ = 72, ///< Number of nonterminal symbols.
yylast_ = 1591, ///< Last index in yytable_.
yynnts_ = 75, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4276,6 +4405,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4321,6 +4454,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4540,6 +4681,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4585,6 +4730,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4709,7 +4862,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::iw6
#line 4713 "parser.hpp"
#line 4866 "parser.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 145 "lexer.lpp"
#line 148 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,85 +510,94 @@ namespace xsk { namespace gsc { namespace iw7 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waittill
char dummy43[sizeof (stmt_waittill_ptr)];
char dummy46[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy44[sizeof (stmt_waittillframeend_ptr)];
char dummy47[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy45[sizeof (stmt_waittillmatch_ptr)];
char dummy48[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy46[sizeof (stmt_while_ptr)];
char dummy49[sizeof (stmt_while_ptr)];
// string
char dummy47[sizeof (string_ptr)];
char dummy50[sizeof (string_ptr)];
// thisthread
char dummy48[sizeof (thisthread_ptr)];
char dummy51[sizeof (thisthread_ptr)];
// thread
char dummy49[sizeof (thread_ptr)];
char dummy52[sizeof (thread_ptr)];
// true
char dummy50[sizeof (true_ptr)];
char dummy53[sizeof (true_ptr)];
// undefined
char dummy51[sizeof (undefined_ptr)];
char dummy54[sizeof (undefined_ptr)];
// usingtree
char dummy52[sizeof (usingtree_ptr)];
char dummy55[sizeof (usingtree_ptr)];
// vector
char dummy53[sizeof (vector_ptr)];
char dummy56[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -640,97 +649,100 @@ namespace xsk { namespace gsc { namespace iw7 {
IW7EOF = 0, // "end of file"
IW7error = 1, // error
IW7UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
IF = 12, // "if"
ELSE = 13, // "else"
WHILE = 14, // "while"
FOR = 15, // "for"
FOREACH = 16, // "foreach"
IN = 17, // "in"
SWITCH = 18, // "switch"
CASE = 19, // "case"
DEFAULT = 20, // "default"
BREAK = 21, // "break"
CONTINUE = 22, // "continue"
RETURN = 23, // "return"
THREAD = 24, // "thread"
CHILDTHREAD = 25, // "childthread"
THISTHREAD = 26, // "thisthread"
CALL = 27, // "call"
TRUE = 28, // "true"
FALSE = 29, // "false"
UNDEFINED = 30, // "undefined"
SIZE = 31, // "size"
GAME = 32, // "game"
SELF = 33, // "self"
ANIM = 34, // "anim"
LEVEL = 35, // "level"
LPAREN = 36, // "("
RPAREN = 37, // ")"
LBRACE = 38, // "{"
RBRACE = 39, // "}"
LBRACKET = 40, // "["
RBRACKET = 41, // "]"
COMMA = 42, // ","
DOT = 43, // "."
DOUBLECOLON = 44, // "::"
COLON = 45, // ":"
SEMICOLON = 46, // ";"
INCREMENT = 47, // "++"
DECREMENT = 48, // "--"
LSHIFT = 49, // "<<"
RSHIFT = 50, // ">>"
OR = 51, // "||"
AND = 52, // "&&"
EQUALITY = 53, // "=="
INEQUALITY = 54, // "!="
LESS_EQUAL = 55, // "<="
GREATER_EQUAL = 56, // ">="
LESS = 57, // "<"
GREATER = 58, // ">"
NOT = 59, // "!"
COMPLEMENT = 60, // "~"
ASSIGN = 61, // "="
ASSIGN_ADD = 62, // "+="
ASSIGN_SUB = 63, // "-="
ASSIGN_MULT = 64, // "*="
ASSIGN_DIV = 65, // "/="
ASSIGN_MOD = 66, // "%="
ASSIGN_BITWISE_OR = 67, // "|="
ASSIGN_BITWISE_AND = 68, // "&="
ASSIGN_BITWISE_EXOR = 69, // "^="
ASSIGN_RSHIFT = 70, // ">>="
ASSIGN_LSHIFT = 71, // "<<="
BITWISE_OR = 72, // "|"
BITWISE_AND = 73, // "&"
BITWISE_EXOR = 74, // "^"
ADD = 75, // "+"
SUB = 76, // "-"
MULT = 77, // "*"
DIV = 78, // "/"
MOD = 79, // "%"
FILE = 80, // "file path"
NAME = 81, // "identifier"
STRING = 82, // "string literal"
ISTRING = 83, // "localized string"
FLOAT = 84, // "float"
INTEGER = 85, // "int"
ADD_ARRAY = 86, // ADD_ARRAY
THEN = 87, // THEN
NEG = 88, // NEG
ANIMREF = 89, // ANIMREF
PREINC = 90, // PREINC
PREDEC = 91, // PREDEC
POSTINC = 92, // POSTINC
POSTDEC = 93 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
IF = 15, // "if"
ELSE = 16, // "else"
WHILE = 17, // "while"
FOR = 18, // "for"
FOREACH = 19, // "foreach"
IN = 20, // "in"
SWITCH = 21, // "switch"
CASE = 22, // "case"
DEFAULT = 23, // "default"
BREAK = 24, // "break"
CONTINUE = 25, // "continue"
RETURN = 26, // "return"
THREAD = 27, // "thread"
CHILDTHREAD = 28, // "childthread"
THISTHREAD = 29, // "thisthread"
CALL = 30, // "call"
TRUE = 31, // "true"
FALSE = 32, // "false"
UNDEFINED = 33, // "undefined"
SIZE = 34, // ".size"
GAME = 35, // "game"
SELF = 36, // "self"
ANIM = 37, // "anim"
LEVEL = 38, // "level"
LPAREN = 39, // "("
RPAREN = 40, // ")"
LBRACE = 41, // "{"
RBRACE = 42, // "}"
LBRACKET = 43, // "["
RBRACKET = 44, // "]"
COMMA = 45, // ","
DOT = 46, // "."
DOUBLECOLON = 47, // "::"
COLON = 48, // ":"
SEMICOLON = 49, // ";"
INCREMENT = 50, // "++"
DECREMENT = 51, // "--"
LSHIFT = 52, // "<<"
RSHIFT = 53, // ">>"
OR = 54, // "||"
AND = 55, // "&&"
EQUALITY = 56, // "=="
INEQUALITY = 57, // "!="
LESS_EQUAL = 58, // "<="
GREATER_EQUAL = 59, // ">="
LESS = 60, // "<"
GREATER = 61, // ">"
NOT = 62, // "!"
COMPLEMENT = 63, // "~"
ASSIGN = 64, // "="
ASSIGN_ADD = 65, // "+="
ASSIGN_SUB = 66, // "-="
ASSIGN_MULT = 67, // "*="
ASSIGN_DIV = 68, // "/="
ASSIGN_MOD = 69, // "%="
ASSIGN_BITWISE_OR = 70, // "|="
ASSIGN_BITWISE_AND = 71, // "&="
ASSIGN_BITWISE_EXOR = 72, // "^="
ASSIGN_RSHIFT = 73, // ">>="
ASSIGN_LSHIFT = 74, // "<<="
BITWISE_OR = 75, // "|"
BITWISE_AND = 76, // "&"
BITWISE_EXOR = 77, // "^"
ADD = 78, // "+"
SUB = 79, // "-"
MULT = 80, // "*"
DIV = 81, // "/"
MOD = 82, // "%"
FILE = 83, // "file path"
NAME = 84, // "identifier"
STRING = 85, // "string literal"
ISTRING = 86, // "localized string"
FLOAT = 87, // "float"
INTEGER = 88, // "int"
ADD_ARRAY = 89, // ADD_ARRAY
THEN = 90, // THEN
NEG = 91, // NEG
ANIMREF = 92, // ANIMREF
PREINC = 93, // PREINC
PREDEC = 94, // PREDEC
POSTINC = 95, // POSTINC
POSTDEC = 96 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -747,174 +759,180 @@ namespace xsk { namespace gsc { namespace iw7 {
{
enum symbol_kind_type
{
YYNTOKENS = 94, ///< Number of tokens.
YYNTOKENS = 97, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_IF = 12, // "if"
S_ELSE = 13, // "else"
S_WHILE = 14, // "while"
S_FOR = 15, // "for"
S_FOREACH = 16, // "foreach"
S_IN = 17, // "in"
S_SWITCH = 18, // "switch"
S_CASE = 19, // "case"
S_DEFAULT = 20, // "default"
S_BREAK = 21, // "break"
S_CONTINUE = 22, // "continue"
S_RETURN = 23, // "return"
S_THREAD = 24, // "thread"
S_CHILDTHREAD = 25, // "childthread"
S_THISTHREAD = 26, // "thisthread"
S_CALL = 27, // "call"
S_TRUE = 28, // "true"
S_FALSE = 29, // "false"
S_UNDEFINED = 30, // "undefined"
S_SIZE = 31, // "size"
S_GAME = 32, // "game"
S_SELF = 33, // "self"
S_ANIM = 34, // "anim"
S_LEVEL = 35, // "level"
S_LPAREN = 36, // "("
S_RPAREN = 37, // ")"
S_LBRACE = 38, // "{"
S_RBRACE = 39, // "}"
S_LBRACKET = 40, // "["
S_RBRACKET = 41, // "]"
S_COMMA = 42, // ","
S_DOT = 43, // "."
S_DOUBLECOLON = 44, // "::"
S_COLON = 45, // ":"
S_SEMICOLON = 46, // ";"
S_INCREMENT = 47, // "++"
S_DECREMENT = 48, // "--"
S_LSHIFT = 49, // "<<"
S_RSHIFT = 50, // ">>"
S_OR = 51, // "||"
S_AND = 52, // "&&"
S_EQUALITY = 53, // "=="
S_INEQUALITY = 54, // "!="
S_LESS_EQUAL = 55, // "<="
S_GREATER_EQUAL = 56, // ">="
S_LESS = 57, // "<"
S_GREATER = 58, // ">"
S_NOT = 59, // "!"
S_COMPLEMENT = 60, // "~"
S_ASSIGN = 61, // "="
S_ASSIGN_ADD = 62, // "+="
S_ASSIGN_SUB = 63, // "-="
S_ASSIGN_MULT = 64, // "*="
S_ASSIGN_DIV = 65, // "/="
S_ASSIGN_MOD = 66, // "%="
S_ASSIGN_BITWISE_OR = 67, // "|="
S_ASSIGN_BITWISE_AND = 68, // "&="
S_ASSIGN_BITWISE_EXOR = 69, // "^="
S_ASSIGN_RSHIFT = 70, // ">>="
S_ASSIGN_LSHIFT = 71, // "<<="
S_BITWISE_OR = 72, // "|"
S_BITWISE_AND = 73, // "&"
S_BITWISE_EXOR = 74, // "^"
S_ADD = 75, // "+"
S_SUB = 76, // "-"
S_MULT = 77, // "*"
S_DIV = 78, // "/"
S_MOD = 79, // "%"
S_FILE = 80, // "file path"
S_NAME = 81, // "identifier"
S_STRING = 82, // "string literal"
S_ISTRING = 83, // "localized string"
S_FLOAT = 84, // "float"
S_INTEGER = 85, // "int"
S_ADD_ARRAY = 86, // ADD_ARRAY
S_THEN = 87, // THEN
S_NEG = 88, // NEG
S_ANIMREF = 89, // ANIMREF
S_PREINC = 90, // PREINC
S_PREDEC = 91, // PREDEC
S_POSTINC = 92, // POSTINC
S_POSTDEC = 93, // POSTDEC
S_YYACCEPT = 94, // $accept
S_root = 95, // root
S_program = 96, // program
S_include = 97, // include
S_define = 98, // define
S_usingtree = 99, // usingtree
S_constant = 100, // constant
S_thread = 101, // thread
S_parameters = 102, // parameters
S_stmt = 103, // stmt
S_stmt_block = 104, // stmt_block
S_stmt_list = 105, // stmt_list
S_stmt_call = 106, // stmt_call
S_stmt_assign = 107, // stmt_assign
S_stmt_endon = 108, // stmt_endon
S_stmt_notify = 109, // stmt_notify
S_stmt_wait = 110, // stmt_wait
S_stmt_waittill = 111, // stmt_waittill
S_stmt_waittillmatch = 112, // stmt_waittillmatch
S_stmt_waittillframeend = 113, // stmt_waittillframeend
S_stmt_if = 114, // stmt_if
S_stmt_ifelse = 115, // stmt_ifelse
S_stmt_while = 116, // stmt_while
S_stmt_for = 117, // stmt_for
S_stmt_foreach = 118, // stmt_foreach
S_stmt_switch = 119, // stmt_switch
S_stmt_case = 120, // stmt_case
S_stmt_default = 121, // stmt_default
S_stmt_break = 122, // stmt_break
S_stmt_continue = 123, // stmt_continue
S_stmt_return = 124, // stmt_return
S_for_stmt = 125, // for_stmt
S_for_expr = 126, // for_expr
S_expr = 127, // expr
S_expr_assign = 128, // expr_assign
S_expr_compare = 129, // expr_compare
S_expr_binary = 130, // expr_binary
S_expr_primitive = 131, // expr_primitive
S_expr_call = 132, // expr_call
S_expr_call_thread = 133, // expr_call_thread
S_expr_call_childthread = 134, // expr_call_childthread
S_expr_call_function = 135, // expr_call_function
S_expr_call_pointer = 136, // expr_call_pointer
S_expr_arguments = 137, // expr_arguments
S_expr_arguments_filled = 138, // expr_arguments_filled
S_expr_arguments_empty = 139, // expr_arguments_empty
S_expr_function = 140, // expr_function
S_expr_add_array = 141, // expr_add_array
S_expr_array = 142, // expr_array
S_expr_field = 143, // expr_field
S_expr_size = 144, // expr_size
S_object = 145, // object
S_thisthread = 146, // thisthread
S_empty_array = 147, // empty_array
S_undefined = 148, // undefined
S_game = 149, // game
S_self = 150, // self
S_anim = 151, // anim
S_level = 152, // level
S_animation = 153, // animation
S_animtree = 154, // animtree
S_name = 155, // name
S_file = 156, // file
S_istring = 157, // istring
S_string = 158, // string
S_vector = 159, // vector
S_neg_float = 160, // neg_float
S_neg_integer = 161, // neg_integer
S_float = 162, // float
S_integer = 163, // integer
S_false = 164, // false
S_true = 165 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_IF = 15, // "if"
S_ELSE = 16, // "else"
S_WHILE = 17, // "while"
S_FOR = 18, // "for"
S_FOREACH = 19, // "foreach"
S_IN = 20, // "in"
S_SWITCH = 21, // "switch"
S_CASE = 22, // "case"
S_DEFAULT = 23, // "default"
S_BREAK = 24, // "break"
S_CONTINUE = 25, // "continue"
S_RETURN = 26, // "return"
S_THREAD = 27, // "thread"
S_CHILDTHREAD = 28, // "childthread"
S_THISTHREAD = 29, // "thisthread"
S_CALL = 30, // "call"
S_TRUE = 31, // "true"
S_FALSE = 32, // "false"
S_UNDEFINED = 33, // "undefined"
S_SIZE = 34, // ".size"
S_GAME = 35, // "game"
S_SELF = 36, // "self"
S_ANIM = 37, // "anim"
S_LEVEL = 38, // "level"
S_LPAREN = 39, // "("
S_RPAREN = 40, // ")"
S_LBRACE = 41, // "{"
S_RBRACE = 42, // "}"
S_LBRACKET = 43, // "["
S_RBRACKET = 44, // "]"
S_COMMA = 45, // ","
S_DOT = 46, // "."
S_DOUBLECOLON = 47, // "::"
S_COLON = 48, // ":"
S_SEMICOLON = 49, // ";"
S_INCREMENT = 50, // "++"
S_DECREMENT = 51, // "--"
S_LSHIFT = 52, // "<<"
S_RSHIFT = 53, // ">>"
S_OR = 54, // "||"
S_AND = 55, // "&&"
S_EQUALITY = 56, // "=="
S_INEQUALITY = 57, // "!="
S_LESS_EQUAL = 58, // "<="
S_GREATER_EQUAL = 59, // ">="
S_LESS = 60, // "<"
S_GREATER = 61, // ">"
S_NOT = 62, // "!"
S_COMPLEMENT = 63, // "~"
S_ASSIGN = 64, // "="
S_ASSIGN_ADD = 65, // "+="
S_ASSIGN_SUB = 66, // "-="
S_ASSIGN_MULT = 67, // "*="
S_ASSIGN_DIV = 68, // "/="
S_ASSIGN_MOD = 69, // "%="
S_ASSIGN_BITWISE_OR = 70, // "|="
S_ASSIGN_BITWISE_AND = 71, // "&="
S_ASSIGN_BITWISE_EXOR = 72, // "^="
S_ASSIGN_RSHIFT = 73, // ">>="
S_ASSIGN_LSHIFT = 74, // "<<="
S_BITWISE_OR = 75, // "|"
S_BITWISE_AND = 76, // "&"
S_BITWISE_EXOR = 77, // "^"
S_ADD = 78, // "+"
S_SUB = 79, // "-"
S_MULT = 80, // "*"
S_DIV = 81, // "/"
S_MOD = 82, // "%"
S_FILE = 83, // "file path"
S_NAME = 84, // "identifier"
S_STRING = 85, // "string literal"
S_ISTRING = 86, // "localized string"
S_FLOAT = 87, // "float"
S_INTEGER = 88, // "int"
S_ADD_ARRAY = 89, // ADD_ARRAY
S_THEN = 90, // THEN
S_NEG = 91, // NEG
S_ANIMREF = 92, // ANIMREF
S_PREINC = 93, // PREINC
S_PREDEC = 94, // PREDEC
S_POSTINC = 95, // POSTINC
S_POSTDEC = 96, // POSTDEC
S_YYACCEPT = 97, // $accept
S_root = 98, // root
S_program = 99, // program
S_include = 100, // include
S_define = 101, // define
S_usingtree = 102, // usingtree
S_constant = 103, // constant
S_thread = 104, // thread
S_parameters = 105, // parameters
S_stmt = 106, // stmt
S_stmt_block = 107, // stmt_block
S_stmt_list = 108, // stmt_list
S_stmt_call = 109, // stmt_call
S_stmt_assign = 110, // stmt_assign
S_stmt_endon = 111, // stmt_endon
S_stmt_notify = 112, // stmt_notify
S_stmt_wait = 113, // stmt_wait
S_stmt_waittill = 114, // stmt_waittill
S_stmt_waittillmatch = 115, // stmt_waittillmatch
S_stmt_waittillframeend = 116, // stmt_waittillframeend
S_stmt_if = 117, // stmt_if
S_stmt_ifelse = 118, // stmt_ifelse
S_stmt_while = 119, // stmt_while
S_stmt_for = 120, // stmt_for
S_stmt_foreach = 121, // stmt_foreach
S_stmt_switch = 122, // stmt_switch
S_stmt_case = 123, // stmt_case
S_stmt_default = 124, // stmt_default
S_stmt_break = 125, // stmt_break
S_stmt_continue = 126, // stmt_continue
S_stmt_return = 127, // stmt_return
S_stmt_breakpoint = 128, // stmt_breakpoint
S_stmt_prof_begin = 129, // stmt_prof_begin
S_stmt_prof_end = 130, // stmt_prof_end
S_for_stmt = 131, // for_stmt
S_for_expr = 132, // for_expr
S_expr = 133, // expr
S_expr_assign = 134, // expr_assign
S_expr_compare = 135, // expr_compare
S_expr_binary = 136, // expr_binary
S_expr_primitive = 137, // expr_primitive
S_expr_call = 138, // expr_call
S_expr_call_thread = 139, // expr_call_thread
S_expr_call_childthread = 140, // expr_call_childthread
S_expr_call_function = 141, // expr_call_function
S_expr_call_pointer = 142, // expr_call_pointer
S_expr_arguments = 143, // expr_arguments
S_expr_arguments_filled = 144, // expr_arguments_filled
S_expr_arguments_empty = 145, // expr_arguments_empty
S_expr_function = 146, // expr_function
S_expr_add_array = 147, // expr_add_array
S_expr_array = 148, // expr_array
S_expr_field = 149, // expr_field
S_expr_size = 150, // expr_size
S_object = 151, // object
S_thisthread = 152, // thisthread
S_empty_array = 153, // empty_array
S_undefined = 154, // undefined
S_game = 155, // game
S_self = 156, // self
S_anim = 157, // anim
S_level = 158, // level
S_animation = 159, // animation
S_animtree = 160, // animtree
S_name = 161, // name
S_file = 162, // file
S_istring = 163, // istring
S_string = 164, // string
S_vector = 165, // vector
S_neg_float = 166, // neg_float
S_neg_integer = 167, // neg_integer
S_float = 168, // float
S_integer = 169, // integer
S_false = 170, // false
S_true = 171 // true
};
};
@ -1080,6 +1098,10 @@ namespace xsk { namespace gsc { namespace iw7 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1125,6 +1147,14 @@ namespace xsk { namespace gsc { namespace iw7 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1587,6 +1617,20 @@ namespace xsk { namespace gsc { namespace iw7 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1741,6 +1785,34 @@ namespace xsk { namespace gsc { namespace iw7 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2102,6 +2174,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2147,6 +2223,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2409,6 +2493,51 @@ switch (yykind)
return symbol_type (token::IW7UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4118,8 +4247,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1580, ///< Last index in yytable_.
yynnts_ = 72, ///< Number of nonterminal symbols.
yylast_ = 1591, ///< Last index in yytable_.
yynnts_ = 75, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4276,6 +4405,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4321,6 +4454,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4540,6 +4681,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4585,6 +4730,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4709,7 +4862,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::iw7
#line 4713 "parser.hpp"
#line 4866 "parser.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 146 "lexer.lpp"
#line 149 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,88 +510,97 @@ namespace xsk { namespace gsc { namespace s1 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waitframe
char dummy43[sizeof (stmt_waitframe_ptr)];
char dummy46[sizeof (stmt_waitframe_ptr)];
// stmt_waittill
char dummy44[sizeof (stmt_waittill_ptr)];
char dummy47[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy45[sizeof (stmt_waittillframeend_ptr)];
char dummy48[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy46[sizeof (stmt_waittillmatch_ptr)];
char dummy49[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy47[sizeof (stmt_while_ptr)];
char dummy50[sizeof (stmt_while_ptr)];
// string
char dummy48[sizeof (string_ptr)];
char dummy51[sizeof (string_ptr)];
// thisthread
char dummy49[sizeof (thisthread_ptr)];
char dummy52[sizeof (thisthread_ptr)];
// thread
char dummy50[sizeof (thread_ptr)];
char dummy53[sizeof (thread_ptr)];
// true
char dummy51[sizeof (true_ptr)];
char dummy54[sizeof (true_ptr)];
// undefined
char dummy52[sizeof (undefined_ptr)];
char dummy55[sizeof (undefined_ptr)];
// usingtree
char dummy53[sizeof (usingtree_ptr)];
char dummy56[sizeof (usingtree_ptr)];
// vector
char dummy54[sizeof (vector_ptr)];
char dummy57[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -643,98 +652,101 @@ namespace xsk { namespace gsc { namespace s1 {
S1EOF = 0, // "end of file"
S1error = 1, // error
S1UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
WAITFRAME = 12, // "waitframe"
IF = 13, // "if"
ELSE = 14, // "else"
WHILE = 15, // "while"
FOR = 16, // "for"
FOREACH = 17, // "foreach"
IN = 18, // "in"
SWITCH = 19, // "switch"
CASE = 20, // "case"
DEFAULT = 21, // "default"
BREAK = 22, // "break"
CONTINUE = 23, // "continue"
RETURN = 24, // "return"
THREAD = 25, // "thread"
CHILDTHREAD = 26, // "childthread"
THISTHREAD = 27, // "thisthread"
CALL = 28, // "call"
TRUE = 29, // "true"
FALSE = 30, // "false"
UNDEFINED = 31, // "undefined"
SIZE = 32, // "size"
GAME = 33, // "game"
SELF = 34, // "self"
ANIM = 35, // "anim"
LEVEL = 36, // "level"
LPAREN = 37, // "("
RPAREN = 38, // ")"
LBRACE = 39, // "{"
RBRACE = 40, // "}"
LBRACKET = 41, // "["
RBRACKET = 42, // "]"
COMMA = 43, // ","
DOT = 44, // "."
DOUBLECOLON = 45, // "::"
COLON = 46, // ":"
SEMICOLON = 47, // ";"
INCREMENT = 48, // "++"
DECREMENT = 49, // "--"
LSHIFT = 50, // "<<"
RSHIFT = 51, // ">>"
OR = 52, // "||"
AND = 53, // "&&"
EQUALITY = 54, // "=="
INEQUALITY = 55, // "!="
LESS_EQUAL = 56, // "<="
GREATER_EQUAL = 57, // ">="
LESS = 58, // "<"
GREATER = 59, // ">"
NOT = 60, // "!"
COMPLEMENT = 61, // "~"
ASSIGN = 62, // "="
ASSIGN_ADD = 63, // "+="
ASSIGN_SUB = 64, // "-="
ASSIGN_MULT = 65, // "*="
ASSIGN_DIV = 66, // "/="
ASSIGN_MOD = 67, // "%="
ASSIGN_BITWISE_OR = 68, // "|="
ASSIGN_BITWISE_AND = 69, // "&="
ASSIGN_BITWISE_EXOR = 70, // "^="
ASSIGN_RSHIFT = 71, // ">>="
ASSIGN_LSHIFT = 72, // "<<="
BITWISE_OR = 73, // "|"
BITWISE_AND = 74, // "&"
BITWISE_EXOR = 75, // "^"
ADD = 76, // "+"
SUB = 77, // "-"
MULT = 78, // "*"
DIV = 79, // "/"
MOD = 80, // "%"
FILE = 81, // "file path"
NAME = 82, // "identifier"
STRING = 83, // "string literal"
ISTRING = 84, // "localized string"
FLOAT = 85, // "float"
INTEGER = 86, // "int"
ADD_ARRAY = 87, // ADD_ARRAY
THEN = 88, // THEN
NEG = 89, // NEG
ANIMREF = 90, // ANIMREF
PREINC = 91, // PREINC
PREDEC = 92, // PREDEC
POSTINC = 93, // POSTINC
POSTDEC = 94 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
WAITFRAME = 15, // "waitframe"
IF = 16, // "if"
ELSE = 17, // "else"
WHILE = 18, // "while"
FOR = 19, // "for"
FOREACH = 20, // "foreach"
IN = 21, // "in"
SWITCH = 22, // "switch"
CASE = 23, // "case"
DEFAULT = 24, // "default"
BREAK = 25, // "break"
CONTINUE = 26, // "continue"
RETURN = 27, // "return"
THREAD = 28, // "thread"
CHILDTHREAD = 29, // "childthread"
THISTHREAD = 30, // "thisthread"
CALL = 31, // "call"
TRUE = 32, // "true"
FALSE = 33, // "false"
UNDEFINED = 34, // "undefined"
SIZE = 35, // ".size"
GAME = 36, // "game"
SELF = 37, // "self"
ANIM = 38, // "anim"
LEVEL = 39, // "level"
LPAREN = 40, // "("
RPAREN = 41, // ")"
LBRACE = 42, // "{"
RBRACE = 43, // "}"
LBRACKET = 44, // "["
RBRACKET = 45, // "]"
COMMA = 46, // ","
DOT = 47, // "."
DOUBLECOLON = 48, // "::"
COLON = 49, // ":"
SEMICOLON = 50, // ";"
INCREMENT = 51, // "++"
DECREMENT = 52, // "--"
LSHIFT = 53, // "<<"
RSHIFT = 54, // ">>"
OR = 55, // "||"
AND = 56, // "&&"
EQUALITY = 57, // "=="
INEQUALITY = 58, // "!="
LESS_EQUAL = 59, // "<="
GREATER_EQUAL = 60, // ">="
LESS = 61, // "<"
GREATER = 62, // ">"
NOT = 63, // "!"
COMPLEMENT = 64, // "~"
ASSIGN = 65, // "="
ASSIGN_ADD = 66, // "+="
ASSIGN_SUB = 67, // "-="
ASSIGN_MULT = 68, // "*="
ASSIGN_DIV = 69, // "/="
ASSIGN_MOD = 70, // "%="
ASSIGN_BITWISE_OR = 71, // "|="
ASSIGN_BITWISE_AND = 72, // "&="
ASSIGN_BITWISE_EXOR = 73, // "^="
ASSIGN_RSHIFT = 74, // ">>="
ASSIGN_LSHIFT = 75, // "<<="
BITWISE_OR = 76, // "|"
BITWISE_AND = 77, // "&"
BITWISE_EXOR = 78, // "^"
ADD = 79, // "+"
SUB = 80, // "-"
MULT = 81, // "*"
DIV = 82, // "/"
MOD = 83, // "%"
FILE = 84, // "file path"
NAME = 85, // "identifier"
STRING = 86, // "string literal"
ISTRING = 87, // "localized string"
FLOAT = 88, // "float"
INTEGER = 89, // "int"
ADD_ARRAY = 90, // ADD_ARRAY
THEN = 91, // THEN
NEG = 92, // NEG
ANIMREF = 93, // ANIMREF
PREINC = 94, // PREINC
PREDEC = 95, // PREDEC
POSTINC = 96, // POSTINC
POSTDEC = 97 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -751,176 +763,182 @@ namespace xsk { namespace gsc { namespace s1 {
{
enum symbol_kind_type
{
YYNTOKENS = 95, ///< Number of tokens.
YYNTOKENS = 98, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_WAITFRAME = 12, // "waitframe"
S_IF = 13, // "if"
S_ELSE = 14, // "else"
S_WHILE = 15, // "while"
S_FOR = 16, // "for"
S_FOREACH = 17, // "foreach"
S_IN = 18, // "in"
S_SWITCH = 19, // "switch"
S_CASE = 20, // "case"
S_DEFAULT = 21, // "default"
S_BREAK = 22, // "break"
S_CONTINUE = 23, // "continue"
S_RETURN = 24, // "return"
S_THREAD = 25, // "thread"
S_CHILDTHREAD = 26, // "childthread"
S_THISTHREAD = 27, // "thisthread"
S_CALL = 28, // "call"
S_TRUE = 29, // "true"
S_FALSE = 30, // "false"
S_UNDEFINED = 31, // "undefined"
S_SIZE = 32, // "size"
S_GAME = 33, // "game"
S_SELF = 34, // "self"
S_ANIM = 35, // "anim"
S_LEVEL = 36, // "level"
S_LPAREN = 37, // "("
S_RPAREN = 38, // ")"
S_LBRACE = 39, // "{"
S_RBRACE = 40, // "}"
S_LBRACKET = 41, // "["
S_RBRACKET = 42, // "]"
S_COMMA = 43, // ","
S_DOT = 44, // "."
S_DOUBLECOLON = 45, // "::"
S_COLON = 46, // ":"
S_SEMICOLON = 47, // ";"
S_INCREMENT = 48, // "++"
S_DECREMENT = 49, // "--"
S_LSHIFT = 50, // "<<"
S_RSHIFT = 51, // ">>"
S_OR = 52, // "||"
S_AND = 53, // "&&"
S_EQUALITY = 54, // "=="
S_INEQUALITY = 55, // "!="
S_LESS_EQUAL = 56, // "<="
S_GREATER_EQUAL = 57, // ">="
S_LESS = 58, // "<"
S_GREATER = 59, // ">"
S_NOT = 60, // "!"
S_COMPLEMENT = 61, // "~"
S_ASSIGN = 62, // "="
S_ASSIGN_ADD = 63, // "+="
S_ASSIGN_SUB = 64, // "-="
S_ASSIGN_MULT = 65, // "*="
S_ASSIGN_DIV = 66, // "/="
S_ASSIGN_MOD = 67, // "%="
S_ASSIGN_BITWISE_OR = 68, // "|="
S_ASSIGN_BITWISE_AND = 69, // "&="
S_ASSIGN_BITWISE_EXOR = 70, // "^="
S_ASSIGN_RSHIFT = 71, // ">>="
S_ASSIGN_LSHIFT = 72, // "<<="
S_BITWISE_OR = 73, // "|"
S_BITWISE_AND = 74, // "&"
S_BITWISE_EXOR = 75, // "^"
S_ADD = 76, // "+"
S_SUB = 77, // "-"
S_MULT = 78, // "*"
S_DIV = 79, // "/"
S_MOD = 80, // "%"
S_FILE = 81, // "file path"
S_NAME = 82, // "identifier"
S_STRING = 83, // "string literal"
S_ISTRING = 84, // "localized string"
S_FLOAT = 85, // "float"
S_INTEGER = 86, // "int"
S_ADD_ARRAY = 87, // ADD_ARRAY
S_THEN = 88, // THEN
S_NEG = 89, // NEG
S_ANIMREF = 90, // ANIMREF
S_PREINC = 91, // PREINC
S_PREDEC = 92, // PREDEC
S_POSTINC = 93, // POSTINC
S_POSTDEC = 94, // POSTDEC
S_YYACCEPT = 95, // $accept
S_root = 96, // root
S_program = 97, // program
S_include = 98, // include
S_define = 99, // define
S_usingtree = 100, // usingtree
S_constant = 101, // constant
S_thread = 102, // thread
S_parameters = 103, // parameters
S_stmt = 104, // stmt
S_stmt_block = 105, // stmt_block
S_stmt_list = 106, // stmt_list
S_stmt_call = 107, // stmt_call
S_stmt_assign = 108, // stmt_assign
S_stmt_endon = 109, // stmt_endon
S_stmt_notify = 110, // stmt_notify
S_stmt_wait = 111, // stmt_wait
S_stmt_waittill = 112, // stmt_waittill
S_stmt_waittillmatch = 113, // stmt_waittillmatch
S_stmt_waittillframeend = 114, // stmt_waittillframeend
S_stmt_waitframe = 115, // stmt_waitframe
S_stmt_if = 116, // stmt_if
S_stmt_ifelse = 117, // stmt_ifelse
S_stmt_while = 118, // stmt_while
S_stmt_for = 119, // stmt_for
S_stmt_foreach = 120, // stmt_foreach
S_stmt_switch = 121, // stmt_switch
S_stmt_case = 122, // stmt_case
S_stmt_default = 123, // stmt_default
S_stmt_break = 124, // stmt_break
S_stmt_continue = 125, // stmt_continue
S_stmt_return = 126, // stmt_return
S_for_stmt = 127, // for_stmt
S_for_expr = 128, // for_expr
S_expr = 129, // expr
S_expr_assign = 130, // expr_assign
S_expr_compare = 131, // expr_compare
S_expr_binary = 132, // expr_binary
S_expr_primitive = 133, // expr_primitive
S_expr_call = 134, // expr_call
S_expr_call_thread = 135, // expr_call_thread
S_expr_call_childthread = 136, // expr_call_childthread
S_expr_call_function = 137, // expr_call_function
S_expr_call_pointer = 138, // expr_call_pointer
S_expr_arguments = 139, // expr_arguments
S_expr_arguments_filled = 140, // expr_arguments_filled
S_expr_arguments_empty = 141, // expr_arguments_empty
S_expr_function = 142, // expr_function
S_expr_add_array = 143, // expr_add_array
S_expr_array = 144, // expr_array
S_expr_field = 145, // expr_field
S_expr_size = 146, // expr_size
S_object = 147, // object
S_thisthread = 148, // thisthread
S_empty_array = 149, // empty_array
S_undefined = 150, // undefined
S_game = 151, // game
S_self = 152, // self
S_anim = 153, // anim
S_level = 154, // level
S_animation = 155, // animation
S_animtree = 156, // animtree
S_name = 157, // name
S_file = 158, // file
S_istring = 159, // istring
S_string = 160, // string
S_vector = 161, // vector
S_neg_float = 162, // neg_float
S_neg_integer = 163, // neg_integer
S_float = 164, // float
S_integer = 165, // integer
S_false = 166, // false
S_true = 167 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_WAITFRAME = 15, // "waitframe"
S_IF = 16, // "if"
S_ELSE = 17, // "else"
S_WHILE = 18, // "while"
S_FOR = 19, // "for"
S_FOREACH = 20, // "foreach"
S_IN = 21, // "in"
S_SWITCH = 22, // "switch"
S_CASE = 23, // "case"
S_DEFAULT = 24, // "default"
S_BREAK = 25, // "break"
S_CONTINUE = 26, // "continue"
S_RETURN = 27, // "return"
S_THREAD = 28, // "thread"
S_CHILDTHREAD = 29, // "childthread"
S_THISTHREAD = 30, // "thisthread"
S_CALL = 31, // "call"
S_TRUE = 32, // "true"
S_FALSE = 33, // "false"
S_UNDEFINED = 34, // "undefined"
S_SIZE = 35, // ".size"
S_GAME = 36, // "game"
S_SELF = 37, // "self"
S_ANIM = 38, // "anim"
S_LEVEL = 39, // "level"
S_LPAREN = 40, // "("
S_RPAREN = 41, // ")"
S_LBRACE = 42, // "{"
S_RBRACE = 43, // "}"
S_LBRACKET = 44, // "["
S_RBRACKET = 45, // "]"
S_COMMA = 46, // ","
S_DOT = 47, // "."
S_DOUBLECOLON = 48, // "::"
S_COLON = 49, // ":"
S_SEMICOLON = 50, // ";"
S_INCREMENT = 51, // "++"
S_DECREMENT = 52, // "--"
S_LSHIFT = 53, // "<<"
S_RSHIFT = 54, // ">>"
S_OR = 55, // "||"
S_AND = 56, // "&&"
S_EQUALITY = 57, // "=="
S_INEQUALITY = 58, // "!="
S_LESS_EQUAL = 59, // "<="
S_GREATER_EQUAL = 60, // ">="
S_LESS = 61, // "<"
S_GREATER = 62, // ">"
S_NOT = 63, // "!"
S_COMPLEMENT = 64, // "~"
S_ASSIGN = 65, // "="
S_ASSIGN_ADD = 66, // "+="
S_ASSIGN_SUB = 67, // "-="
S_ASSIGN_MULT = 68, // "*="
S_ASSIGN_DIV = 69, // "/="
S_ASSIGN_MOD = 70, // "%="
S_ASSIGN_BITWISE_OR = 71, // "|="
S_ASSIGN_BITWISE_AND = 72, // "&="
S_ASSIGN_BITWISE_EXOR = 73, // "^="
S_ASSIGN_RSHIFT = 74, // ">>="
S_ASSIGN_LSHIFT = 75, // "<<="
S_BITWISE_OR = 76, // "|"
S_BITWISE_AND = 77, // "&"
S_BITWISE_EXOR = 78, // "^"
S_ADD = 79, // "+"
S_SUB = 80, // "-"
S_MULT = 81, // "*"
S_DIV = 82, // "/"
S_MOD = 83, // "%"
S_FILE = 84, // "file path"
S_NAME = 85, // "identifier"
S_STRING = 86, // "string literal"
S_ISTRING = 87, // "localized string"
S_FLOAT = 88, // "float"
S_INTEGER = 89, // "int"
S_ADD_ARRAY = 90, // ADD_ARRAY
S_THEN = 91, // THEN
S_NEG = 92, // NEG
S_ANIMREF = 93, // ANIMREF
S_PREINC = 94, // PREINC
S_PREDEC = 95, // PREDEC
S_POSTINC = 96, // POSTINC
S_POSTDEC = 97, // POSTDEC
S_YYACCEPT = 98, // $accept
S_root = 99, // root
S_program = 100, // program
S_include = 101, // include
S_define = 102, // define
S_usingtree = 103, // usingtree
S_constant = 104, // constant
S_thread = 105, // thread
S_parameters = 106, // parameters
S_stmt = 107, // stmt
S_stmt_block = 108, // stmt_block
S_stmt_list = 109, // stmt_list
S_stmt_call = 110, // stmt_call
S_stmt_assign = 111, // stmt_assign
S_stmt_endon = 112, // stmt_endon
S_stmt_notify = 113, // stmt_notify
S_stmt_wait = 114, // stmt_wait
S_stmt_waittill = 115, // stmt_waittill
S_stmt_waittillmatch = 116, // stmt_waittillmatch
S_stmt_waittillframeend = 117, // stmt_waittillframeend
S_stmt_waitframe = 118, // stmt_waitframe
S_stmt_if = 119, // stmt_if
S_stmt_ifelse = 120, // stmt_ifelse
S_stmt_while = 121, // stmt_while
S_stmt_for = 122, // stmt_for
S_stmt_foreach = 123, // stmt_foreach
S_stmt_switch = 124, // stmt_switch
S_stmt_case = 125, // stmt_case
S_stmt_default = 126, // stmt_default
S_stmt_break = 127, // stmt_break
S_stmt_continue = 128, // stmt_continue
S_stmt_return = 129, // stmt_return
S_stmt_breakpoint = 130, // stmt_breakpoint
S_stmt_prof_begin = 131, // stmt_prof_begin
S_stmt_prof_end = 132, // stmt_prof_end
S_for_stmt = 133, // for_stmt
S_for_expr = 134, // for_expr
S_expr = 135, // expr
S_expr_assign = 136, // expr_assign
S_expr_compare = 137, // expr_compare
S_expr_binary = 138, // expr_binary
S_expr_primitive = 139, // expr_primitive
S_expr_call = 140, // expr_call
S_expr_call_thread = 141, // expr_call_thread
S_expr_call_childthread = 142, // expr_call_childthread
S_expr_call_function = 143, // expr_call_function
S_expr_call_pointer = 144, // expr_call_pointer
S_expr_arguments = 145, // expr_arguments
S_expr_arguments_filled = 146, // expr_arguments_filled
S_expr_arguments_empty = 147, // expr_arguments_empty
S_expr_function = 148, // expr_function
S_expr_add_array = 149, // expr_add_array
S_expr_array = 150, // expr_array
S_expr_field = 151, // expr_field
S_expr_size = 152, // expr_size
S_object = 153, // object
S_thisthread = 154, // thisthread
S_empty_array = 155, // empty_array
S_undefined = 156, // undefined
S_game = 157, // game
S_self = 158, // self
S_anim = 159, // anim
S_level = 160, // level
S_animation = 161, // animation
S_animtree = 162, // animtree
S_name = 163, // name
S_file = 164, // file
S_istring = 165, // istring
S_string = 166, // string
S_vector = 167, // vector
S_neg_float = 168, // neg_float
S_neg_integer = 169, // neg_integer
S_float = 170, // float
S_integer = 171, // integer
S_false = 172, // false
S_true = 173 // true
};
};
@ -1086,6 +1104,10 @@ namespace xsk { namespace gsc { namespace s1 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1131,6 +1153,14 @@ namespace xsk { namespace gsc { namespace s1 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1597,6 +1627,20 @@ namespace xsk { namespace gsc { namespace s1 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1751,6 +1795,34 @@ namespace xsk { namespace gsc { namespace s1 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2126,6 +2198,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2171,6 +2247,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2437,6 +2521,51 @@ switch (yykind)
return symbol_type (token::S1UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4161,8 +4290,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1581, ///< Last index in yytable_.
yynnts_ = 73, ///< Number of nonterminal symbols.
yylast_ = 1646, ///< Last index in yytable_.
yynnts_ = 76, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4319,6 +4448,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4364,6 +4497,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4587,6 +4728,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4632,6 +4777,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4760,7 +4913,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::s1
#line 4764 "parser.hpp"
#line 4917 "parser.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -700,7 +700,7 @@ extern int yylex (yyscan_t yyscanner);
#undef yyTABLES_NAME
#endif
#line 146 "lexer.lpp"
#line 149 "lexer.lpp"
#line 706 "lexer.hpp"

File diff suppressed because it is too large Load Diff

View File

@ -510,88 +510,97 @@ namespace xsk { namespace gsc { namespace s2 {
// stmt_break
char dummy27[sizeof (stmt_break_ptr)];
// stmt_breakpoint
char dummy28[sizeof (stmt_breakpoint_ptr)];
// stmt_call
char dummy28[sizeof (stmt_call_ptr)];
char dummy29[sizeof (stmt_call_ptr)];
// stmt_case
char dummy29[sizeof (stmt_case_ptr)];
char dummy30[sizeof (stmt_case_ptr)];
// stmt_continue
char dummy30[sizeof (stmt_continue_ptr)];
char dummy31[sizeof (stmt_continue_ptr)];
// stmt_default
char dummy31[sizeof (stmt_default_ptr)];
char dummy32[sizeof (stmt_default_ptr)];
// stmt_endon
char dummy32[sizeof (stmt_endon_ptr)];
char dummy33[sizeof (stmt_endon_ptr)];
// stmt_for
char dummy33[sizeof (stmt_for_ptr)];
char dummy34[sizeof (stmt_for_ptr)];
// stmt_foreach
char dummy34[sizeof (stmt_foreach_ptr)];
char dummy35[sizeof (stmt_foreach_ptr)];
// stmt_if
char dummy35[sizeof (stmt_if_ptr)];
char dummy36[sizeof (stmt_if_ptr)];
// stmt_ifelse
char dummy36[sizeof (stmt_ifelse_ptr)];
char dummy37[sizeof (stmt_ifelse_ptr)];
// stmt_block
// stmt_list
char dummy37[sizeof (stmt_list_ptr)];
char dummy38[sizeof (stmt_list_ptr)];
// stmt_notify
char dummy38[sizeof (stmt_notify_ptr)];
char dummy39[sizeof (stmt_notify_ptr)];
// stmt_prof_begin
char dummy40[sizeof (stmt_prof_begin_ptr)];
// stmt_prof_end
char dummy41[sizeof (stmt_prof_end_ptr)];
// stmt
// for_stmt
char dummy39[sizeof (stmt_ptr)];
char dummy42[sizeof (stmt_ptr)];
// stmt_return
char dummy40[sizeof (stmt_return_ptr)];
char dummy43[sizeof (stmt_return_ptr)];
// stmt_switch
char dummy41[sizeof (stmt_switch_ptr)];
char dummy44[sizeof (stmt_switch_ptr)];
// stmt_wait
char dummy42[sizeof (stmt_wait_ptr)];
char dummy45[sizeof (stmt_wait_ptr)];
// stmt_waitframe
char dummy43[sizeof (stmt_waitframe_ptr)];
char dummy46[sizeof (stmt_waitframe_ptr)];
// stmt_waittill
char dummy44[sizeof (stmt_waittill_ptr)];
char dummy47[sizeof (stmt_waittill_ptr)];
// stmt_waittillframeend
char dummy45[sizeof (stmt_waittillframeend_ptr)];
char dummy48[sizeof (stmt_waittillframeend_ptr)];
// stmt_waittillmatch
char dummy46[sizeof (stmt_waittillmatch_ptr)];
char dummy49[sizeof (stmt_waittillmatch_ptr)];
// stmt_while
char dummy47[sizeof (stmt_while_ptr)];
char dummy50[sizeof (stmt_while_ptr)];
// string
char dummy48[sizeof (string_ptr)];
char dummy51[sizeof (string_ptr)];
// thisthread
char dummy49[sizeof (thisthread_ptr)];
char dummy52[sizeof (thisthread_ptr)];
// thread
char dummy50[sizeof (thread_ptr)];
char dummy53[sizeof (thread_ptr)];
// true
char dummy51[sizeof (true_ptr)];
char dummy54[sizeof (true_ptr)];
// undefined
char dummy52[sizeof (undefined_ptr)];
char dummy55[sizeof (undefined_ptr)];
// usingtree
char dummy53[sizeof (usingtree_ptr)];
char dummy56[sizeof (usingtree_ptr)];
// vector
char dummy54[sizeof (vector_ptr)];
char dummy57[sizeof (vector_ptr)];
};
/// The size of the largest semantic type.
@ -643,98 +652,101 @@ namespace xsk { namespace gsc { namespace s2 {
S2EOF = 0, // "end of file"
S2error = 1, // error
S2UNDEF = 2, // "invalid token"
INCLUDE = 3, // "#include"
USINGTREE = 4, // "#using_animtree"
ANIMTREE = 5, // "#animtree"
ENDON = 6, // "endon"
NOTIFY = 7, // "notify"
WAIT = 8, // "wait"
WAITTILL = 9, // "waittill"
WAITTILLMATCH = 10, // "waittillmatch"
WAITTILLFRAMEEND = 11, // "waittillframeend"
WAITFRAME = 12, // "waitframe"
IF = 13, // "if"
ELSE = 14, // "else"
WHILE = 15, // "while"
FOR = 16, // "for"
FOREACH = 17, // "foreach"
IN = 18, // "in"
SWITCH = 19, // "switch"
CASE = 20, // "case"
DEFAULT = 21, // "default"
BREAK = 22, // "break"
CONTINUE = 23, // "continue"
RETURN = 24, // "return"
THREAD = 25, // "thread"
CHILDTHREAD = 26, // "childthread"
THISTHREAD = 27, // "thisthread"
CALL = 28, // "call"
TRUE = 29, // "true"
FALSE = 30, // "false"
UNDEFINED = 31, // "undefined"
SIZE = 32, // "size"
GAME = 33, // "game"
SELF = 34, // "self"
ANIM = 35, // "anim"
LEVEL = 36, // "level"
LPAREN = 37, // "("
RPAREN = 38, // ")"
LBRACE = 39, // "{"
RBRACE = 40, // "}"
LBRACKET = 41, // "["
RBRACKET = 42, // "]"
COMMA = 43, // ","
DOT = 44, // "."
DOUBLECOLON = 45, // "::"
COLON = 46, // ":"
SEMICOLON = 47, // ";"
INCREMENT = 48, // "++"
DECREMENT = 49, // "--"
LSHIFT = 50, // "<<"
RSHIFT = 51, // ">>"
OR = 52, // "||"
AND = 53, // "&&"
EQUALITY = 54, // "=="
INEQUALITY = 55, // "!="
LESS_EQUAL = 56, // "<="
GREATER_EQUAL = 57, // ">="
LESS = 58, // "<"
GREATER = 59, // ">"
NOT = 60, // "!"
COMPLEMENT = 61, // "~"
ASSIGN = 62, // "="
ASSIGN_ADD = 63, // "+="
ASSIGN_SUB = 64, // "-="
ASSIGN_MULT = 65, // "*="
ASSIGN_DIV = 66, // "/="
ASSIGN_MOD = 67, // "%="
ASSIGN_BITWISE_OR = 68, // "|="
ASSIGN_BITWISE_AND = 69, // "&="
ASSIGN_BITWISE_EXOR = 70, // "^="
ASSIGN_RSHIFT = 71, // ">>="
ASSIGN_LSHIFT = 72, // "<<="
BITWISE_OR = 73, // "|"
BITWISE_AND = 74, // "&"
BITWISE_EXOR = 75, // "^"
ADD = 76, // "+"
SUB = 77, // "-"
MULT = 78, // "*"
DIV = 79, // "/"
MOD = 80, // "%"
FILE = 81, // "file path"
NAME = 82, // "identifier"
STRING = 83, // "string literal"
ISTRING = 84, // "localized string"
FLOAT = 85, // "float"
INTEGER = 86, // "int"
ADD_ARRAY = 87, // ADD_ARRAY
THEN = 88, // THEN
NEG = 89, // NEG
ANIMREF = 90, // ANIMREF
PREINC = 91, // PREINC
PREDEC = 92, // PREDEC
POSTINC = 93, // POSTINC
POSTDEC = 94 // POSTDEC
BREAKPOINT = 3, // "breakpoint"
PROFBEGIN = 4, // "prof_begin"
PROFEND = 5, // "prof_end"
INCLUDE = 6, // "#include"
USINGTREE = 7, // "#using_animtree"
ANIMTREE = 8, // "#animtree"
ENDON = 9, // "endon"
NOTIFY = 10, // "notify"
WAIT = 11, // "wait"
WAITTILL = 12, // "waittill"
WAITTILLMATCH = 13, // "waittillmatch"
WAITTILLFRAMEEND = 14, // "waittillframeend"
WAITFRAME = 15, // "waitframe"
IF = 16, // "if"
ELSE = 17, // "else"
WHILE = 18, // "while"
FOR = 19, // "for"
FOREACH = 20, // "foreach"
IN = 21, // "in"
SWITCH = 22, // "switch"
CASE = 23, // "case"
DEFAULT = 24, // "default"
BREAK = 25, // "break"
CONTINUE = 26, // "continue"
RETURN = 27, // "return"
THREAD = 28, // "thread"
CHILDTHREAD = 29, // "childthread"
THISTHREAD = 30, // "thisthread"
CALL = 31, // "call"
TRUE = 32, // "true"
FALSE = 33, // "false"
UNDEFINED = 34, // "undefined"
SIZE = 35, // ".size"
GAME = 36, // "game"
SELF = 37, // "self"
ANIM = 38, // "anim"
LEVEL = 39, // "level"
LPAREN = 40, // "("
RPAREN = 41, // ")"
LBRACE = 42, // "{"
RBRACE = 43, // "}"
LBRACKET = 44, // "["
RBRACKET = 45, // "]"
COMMA = 46, // ","
DOT = 47, // "."
DOUBLECOLON = 48, // "::"
COLON = 49, // ":"
SEMICOLON = 50, // ";"
INCREMENT = 51, // "++"
DECREMENT = 52, // "--"
LSHIFT = 53, // "<<"
RSHIFT = 54, // ">>"
OR = 55, // "||"
AND = 56, // "&&"
EQUALITY = 57, // "=="
INEQUALITY = 58, // "!="
LESS_EQUAL = 59, // "<="
GREATER_EQUAL = 60, // ">="
LESS = 61, // "<"
GREATER = 62, // ">"
NOT = 63, // "!"
COMPLEMENT = 64, // "~"
ASSIGN = 65, // "="
ASSIGN_ADD = 66, // "+="
ASSIGN_SUB = 67, // "-="
ASSIGN_MULT = 68, // "*="
ASSIGN_DIV = 69, // "/="
ASSIGN_MOD = 70, // "%="
ASSIGN_BITWISE_OR = 71, // "|="
ASSIGN_BITWISE_AND = 72, // "&="
ASSIGN_BITWISE_EXOR = 73, // "^="
ASSIGN_RSHIFT = 74, // ">>="
ASSIGN_LSHIFT = 75, // "<<="
BITWISE_OR = 76, // "|"
BITWISE_AND = 77, // "&"
BITWISE_EXOR = 78, // "^"
ADD = 79, // "+"
SUB = 80, // "-"
MULT = 81, // "*"
DIV = 82, // "/"
MOD = 83, // "%"
FILE = 84, // "file path"
NAME = 85, // "identifier"
STRING = 86, // "string literal"
ISTRING = 87, // "localized string"
FLOAT = 88, // "float"
INTEGER = 89, // "int"
ADD_ARRAY = 90, // ADD_ARRAY
THEN = 91, // THEN
NEG = 92, // NEG
ANIMREF = 93, // ANIMREF
PREINC = 94, // PREINC
PREDEC = 95, // PREDEC
POSTINC = 96, // POSTINC
POSTDEC = 97 // POSTDEC
};
/// Backward compatibility alias (Bison 3.6).
typedef token_kind_type yytokentype;
@ -751,176 +763,182 @@ namespace xsk { namespace gsc { namespace s2 {
{
enum symbol_kind_type
{
YYNTOKENS = 95, ///< Number of tokens.
YYNTOKENS = 98, ///< Number of tokens.
S_YYEMPTY = -2,
S_YYEOF = 0, // "end of file"
S_YYerror = 1, // error
S_YYUNDEF = 2, // "invalid token"
S_INCLUDE = 3, // "#include"
S_USINGTREE = 4, // "#using_animtree"
S_ANIMTREE = 5, // "#animtree"
S_ENDON = 6, // "endon"
S_NOTIFY = 7, // "notify"
S_WAIT = 8, // "wait"
S_WAITTILL = 9, // "waittill"
S_WAITTILLMATCH = 10, // "waittillmatch"
S_WAITTILLFRAMEEND = 11, // "waittillframeend"
S_WAITFRAME = 12, // "waitframe"
S_IF = 13, // "if"
S_ELSE = 14, // "else"
S_WHILE = 15, // "while"
S_FOR = 16, // "for"
S_FOREACH = 17, // "foreach"
S_IN = 18, // "in"
S_SWITCH = 19, // "switch"
S_CASE = 20, // "case"
S_DEFAULT = 21, // "default"
S_BREAK = 22, // "break"
S_CONTINUE = 23, // "continue"
S_RETURN = 24, // "return"
S_THREAD = 25, // "thread"
S_CHILDTHREAD = 26, // "childthread"
S_THISTHREAD = 27, // "thisthread"
S_CALL = 28, // "call"
S_TRUE = 29, // "true"
S_FALSE = 30, // "false"
S_UNDEFINED = 31, // "undefined"
S_SIZE = 32, // "size"
S_GAME = 33, // "game"
S_SELF = 34, // "self"
S_ANIM = 35, // "anim"
S_LEVEL = 36, // "level"
S_LPAREN = 37, // "("
S_RPAREN = 38, // ")"
S_LBRACE = 39, // "{"
S_RBRACE = 40, // "}"
S_LBRACKET = 41, // "["
S_RBRACKET = 42, // "]"
S_COMMA = 43, // ","
S_DOT = 44, // "."
S_DOUBLECOLON = 45, // "::"
S_COLON = 46, // ":"
S_SEMICOLON = 47, // ";"
S_INCREMENT = 48, // "++"
S_DECREMENT = 49, // "--"
S_LSHIFT = 50, // "<<"
S_RSHIFT = 51, // ">>"
S_OR = 52, // "||"
S_AND = 53, // "&&"
S_EQUALITY = 54, // "=="
S_INEQUALITY = 55, // "!="
S_LESS_EQUAL = 56, // "<="
S_GREATER_EQUAL = 57, // ">="
S_LESS = 58, // "<"
S_GREATER = 59, // ">"
S_NOT = 60, // "!"
S_COMPLEMENT = 61, // "~"
S_ASSIGN = 62, // "="
S_ASSIGN_ADD = 63, // "+="
S_ASSIGN_SUB = 64, // "-="
S_ASSIGN_MULT = 65, // "*="
S_ASSIGN_DIV = 66, // "/="
S_ASSIGN_MOD = 67, // "%="
S_ASSIGN_BITWISE_OR = 68, // "|="
S_ASSIGN_BITWISE_AND = 69, // "&="
S_ASSIGN_BITWISE_EXOR = 70, // "^="
S_ASSIGN_RSHIFT = 71, // ">>="
S_ASSIGN_LSHIFT = 72, // "<<="
S_BITWISE_OR = 73, // "|"
S_BITWISE_AND = 74, // "&"
S_BITWISE_EXOR = 75, // "^"
S_ADD = 76, // "+"
S_SUB = 77, // "-"
S_MULT = 78, // "*"
S_DIV = 79, // "/"
S_MOD = 80, // "%"
S_FILE = 81, // "file path"
S_NAME = 82, // "identifier"
S_STRING = 83, // "string literal"
S_ISTRING = 84, // "localized string"
S_FLOAT = 85, // "float"
S_INTEGER = 86, // "int"
S_ADD_ARRAY = 87, // ADD_ARRAY
S_THEN = 88, // THEN
S_NEG = 89, // NEG
S_ANIMREF = 90, // ANIMREF
S_PREINC = 91, // PREINC
S_PREDEC = 92, // PREDEC
S_POSTINC = 93, // POSTINC
S_POSTDEC = 94, // POSTDEC
S_YYACCEPT = 95, // $accept
S_root = 96, // root
S_program = 97, // program
S_include = 98, // include
S_define = 99, // define
S_usingtree = 100, // usingtree
S_constant = 101, // constant
S_thread = 102, // thread
S_parameters = 103, // parameters
S_stmt = 104, // stmt
S_stmt_block = 105, // stmt_block
S_stmt_list = 106, // stmt_list
S_stmt_call = 107, // stmt_call
S_stmt_assign = 108, // stmt_assign
S_stmt_endon = 109, // stmt_endon
S_stmt_notify = 110, // stmt_notify
S_stmt_wait = 111, // stmt_wait
S_stmt_waittill = 112, // stmt_waittill
S_stmt_waittillmatch = 113, // stmt_waittillmatch
S_stmt_waittillframeend = 114, // stmt_waittillframeend
S_stmt_waitframe = 115, // stmt_waitframe
S_stmt_if = 116, // stmt_if
S_stmt_ifelse = 117, // stmt_ifelse
S_stmt_while = 118, // stmt_while
S_stmt_for = 119, // stmt_for
S_stmt_foreach = 120, // stmt_foreach
S_stmt_switch = 121, // stmt_switch
S_stmt_case = 122, // stmt_case
S_stmt_default = 123, // stmt_default
S_stmt_break = 124, // stmt_break
S_stmt_continue = 125, // stmt_continue
S_stmt_return = 126, // stmt_return
S_for_stmt = 127, // for_stmt
S_for_expr = 128, // for_expr
S_expr = 129, // expr
S_expr_assign = 130, // expr_assign
S_expr_compare = 131, // expr_compare
S_expr_binary = 132, // expr_binary
S_expr_primitive = 133, // expr_primitive
S_expr_call = 134, // expr_call
S_expr_call_thread = 135, // expr_call_thread
S_expr_call_childthread = 136, // expr_call_childthread
S_expr_call_function = 137, // expr_call_function
S_expr_call_pointer = 138, // expr_call_pointer
S_expr_arguments = 139, // expr_arguments
S_expr_arguments_filled = 140, // expr_arguments_filled
S_expr_arguments_empty = 141, // expr_arguments_empty
S_expr_function = 142, // expr_function
S_expr_add_array = 143, // expr_add_array
S_expr_array = 144, // expr_array
S_expr_field = 145, // expr_field
S_expr_size = 146, // expr_size
S_object = 147, // object
S_thisthread = 148, // thisthread
S_empty_array = 149, // empty_array
S_undefined = 150, // undefined
S_game = 151, // game
S_self = 152, // self
S_anim = 153, // anim
S_level = 154, // level
S_animation = 155, // animation
S_animtree = 156, // animtree
S_name = 157, // name
S_file = 158, // file
S_istring = 159, // istring
S_string = 160, // string
S_vector = 161, // vector
S_neg_float = 162, // neg_float
S_neg_integer = 163, // neg_integer
S_float = 164, // float
S_integer = 165, // integer
S_false = 166, // false
S_true = 167 // true
S_BREAKPOINT = 3, // "breakpoint"
S_PROFBEGIN = 4, // "prof_begin"
S_PROFEND = 5, // "prof_end"
S_INCLUDE = 6, // "#include"
S_USINGTREE = 7, // "#using_animtree"
S_ANIMTREE = 8, // "#animtree"
S_ENDON = 9, // "endon"
S_NOTIFY = 10, // "notify"
S_WAIT = 11, // "wait"
S_WAITTILL = 12, // "waittill"
S_WAITTILLMATCH = 13, // "waittillmatch"
S_WAITTILLFRAMEEND = 14, // "waittillframeend"
S_WAITFRAME = 15, // "waitframe"
S_IF = 16, // "if"
S_ELSE = 17, // "else"
S_WHILE = 18, // "while"
S_FOR = 19, // "for"
S_FOREACH = 20, // "foreach"
S_IN = 21, // "in"
S_SWITCH = 22, // "switch"
S_CASE = 23, // "case"
S_DEFAULT = 24, // "default"
S_BREAK = 25, // "break"
S_CONTINUE = 26, // "continue"
S_RETURN = 27, // "return"
S_THREAD = 28, // "thread"
S_CHILDTHREAD = 29, // "childthread"
S_THISTHREAD = 30, // "thisthread"
S_CALL = 31, // "call"
S_TRUE = 32, // "true"
S_FALSE = 33, // "false"
S_UNDEFINED = 34, // "undefined"
S_SIZE = 35, // ".size"
S_GAME = 36, // "game"
S_SELF = 37, // "self"
S_ANIM = 38, // "anim"
S_LEVEL = 39, // "level"
S_LPAREN = 40, // "("
S_RPAREN = 41, // ")"
S_LBRACE = 42, // "{"
S_RBRACE = 43, // "}"
S_LBRACKET = 44, // "["
S_RBRACKET = 45, // "]"
S_COMMA = 46, // ","
S_DOT = 47, // "."
S_DOUBLECOLON = 48, // "::"
S_COLON = 49, // ":"
S_SEMICOLON = 50, // ";"
S_INCREMENT = 51, // "++"
S_DECREMENT = 52, // "--"
S_LSHIFT = 53, // "<<"
S_RSHIFT = 54, // ">>"
S_OR = 55, // "||"
S_AND = 56, // "&&"
S_EQUALITY = 57, // "=="
S_INEQUALITY = 58, // "!="
S_LESS_EQUAL = 59, // "<="
S_GREATER_EQUAL = 60, // ">="
S_LESS = 61, // "<"
S_GREATER = 62, // ">"
S_NOT = 63, // "!"
S_COMPLEMENT = 64, // "~"
S_ASSIGN = 65, // "="
S_ASSIGN_ADD = 66, // "+="
S_ASSIGN_SUB = 67, // "-="
S_ASSIGN_MULT = 68, // "*="
S_ASSIGN_DIV = 69, // "/="
S_ASSIGN_MOD = 70, // "%="
S_ASSIGN_BITWISE_OR = 71, // "|="
S_ASSIGN_BITWISE_AND = 72, // "&="
S_ASSIGN_BITWISE_EXOR = 73, // "^="
S_ASSIGN_RSHIFT = 74, // ">>="
S_ASSIGN_LSHIFT = 75, // "<<="
S_BITWISE_OR = 76, // "|"
S_BITWISE_AND = 77, // "&"
S_BITWISE_EXOR = 78, // "^"
S_ADD = 79, // "+"
S_SUB = 80, // "-"
S_MULT = 81, // "*"
S_DIV = 82, // "/"
S_MOD = 83, // "%"
S_FILE = 84, // "file path"
S_NAME = 85, // "identifier"
S_STRING = 86, // "string literal"
S_ISTRING = 87, // "localized string"
S_FLOAT = 88, // "float"
S_INTEGER = 89, // "int"
S_ADD_ARRAY = 90, // ADD_ARRAY
S_THEN = 91, // THEN
S_NEG = 92, // NEG
S_ANIMREF = 93, // ANIMREF
S_PREINC = 94, // PREINC
S_PREDEC = 95, // PREDEC
S_POSTINC = 96, // POSTINC
S_POSTDEC = 97, // POSTDEC
S_YYACCEPT = 98, // $accept
S_root = 99, // root
S_program = 100, // program
S_include = 101, // include
S_define = 102, // define
S_usingtree = 103, // usingtree
S_constant = 104, // constant
S_thread = 105, // thread
S_parameters = 106, // parameters
S_stmt = 107, // stmt
S_stmt_block = 108, // stmt_block
S_stmt_list = 109, // stmt_list
S_stmt_call = 110, // stmt_call
S_stmt_assign = 111, // stmt_assign
S_stmt_endon = 112, // stmt_endon
S_stmt_notify = 113, // stmt_notify
S_stmt_wait = 114, // stmt_wait
S_stmt_waittill = 115, // stmt_waittill
S_stmt_waittillmatch = 116, // stmt_waittillmatch
S_stmt_waittillframeend = 117, // stmt_waittillframeend
S_stmt_waitframe = 118, // stmt_waitframe
S_stmt_if = 119, // stmt_if
S_stmt_ifelse = 120, // stmt_ifelse
S_stmt_while = 121, // stmt_while
S_stmt_for = 122, // stmt_for
S_stmt_foreach = 123, // stmt_foreach
S_stmt_switch = 124, // stmt_switch
S_stmt_case = 125, // stmt_case
S_stmt_default = 126, // stmt_default
S_stmt_break = 127, // stmt_break
S_stmt_continue = 128, // stmt_continue
S_stmt_return = 129, // stmt_return
S_stmt_breakpoint = 130, // stmt_breakpoint
S_stmt_prof_begin = 131, // stmt_prof_begin
S_stmt_prof_end = 132, // stmt_prof_end
S_for_stmt = 133, // for_stmt
S_for_expr = 134, // for_expr
S_expr = 135, // expr
S_expr_assign = 136, // expr_assign
S_expr_compare = 137, // expr_compare
S_expr_binary = 138, // expr_binary
S_expr_primitive = 139, // expr_primitive
S_expr_call = 140, // expr_call
S_expr_call_thread = 141, // expr_call_thread
S_expr_call_childthread = 142, // expr_call_childthread
S_expr_call_function = 143, // expr_call_function
S_expr_call_pointer = 144, // expr_call_pointer
S_expr_arguments = 145, // expr_arguments
S_expr_arguments_filled = 146, // expr_arguments_filled
S_expr_arguments_empty = 147, // expr_arguments_empty
S_expr_function = 148, // expr_function
S_expr_add_array = 149, // expr_add_array
S_expr_array = 150, // expr_array
S_expr_field = 151, // expr_field
S_expr_size = 152, // expr_size
S_object = 153, // object
S_thisthread = 154, // thisthread
S_empty_array = 155, // empty_array
S_undefined = 156, // undefined
S_game = 157, // game
S_self = 158, // self
S_anim = 159, // anim
S_level = 160, // level
S_animation = 161, // animation
S_animtree = 162, // animtree
S_name = 163, // name
S_file = 164, // file
S_istring = 165, // istring
S_string = 166, // string
S_vector = 167, // vector
S_neg_float = 168, // neg_float
S_neg_integer = 169, // neg_integer
S_float = 170, // float
S_integer = 171, // integer
S_false = 172, // false
S_true = 173 // true
};
};
@ -1086,6 +1104,10 @@ namespace xsk { namespace gsc { namespace s2 {
value.move< stmt_break_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (std::move (that.value));
break;
@ -1131,6 +1153,14 @@ namespace xsk { namespace gsc { namespace s2 {
value.move< stmt_notify_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (std::move (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (std::move (that.value));
@ -1597,6 +1627,20 @@ namespace xsk { namespace gsc { namespace s2 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_breakpoint_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_breakpoint_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_call_ptr&& v, location_type&& l)
: Base (t)
@ -1751,6 +1795,34 @@ namespace xsk { namespace gsc { namespace s2 {
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_begin_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_begin_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_prof_end_ptr&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
basic_symbol (typename Base::kind_type t, const stmt_prof_end_ptr& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
{}
#endif
#if 201103L <= YY_CPLUSPLUS
basic_symbol (typename Base::kind_type t, stmt_ptr&& v, location_type&& l)
: Base (t)
@ -2126,6 +2198,10 @@ switch (yykind)
value.template destroy< stmt_break_ptr > ();
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.template destroy< stmt_breakpoint_ptr > ();
break;
case symbol_kind::S_stmt_call: // stmt_call
value.template destroy< stmt_call_ptr > ();
break;
@ -2171,6 +2247,14 @@ switch (yykind)
value.template destroy< stmt_notify_ptr > ();
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.template destroy< stmt_prof_begin_ptr > ();
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.template destroy< stmt_prof_end_ptr > ();
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.template destroy< stmt_ptr > ();
@ -2437,6 +2521,51 @@ switch (yykind)
return symbol_type (token::S2UNDEF, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_BREAKPOINT (location_type l)
{
return symbol_type (token::BREAKPOINT, std::move (l));
}
#else
static
symbol_type
make_BREAKPOINT (const location_type& l)
{
return symbol_type (token::BREAKPOINT, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFBEGIN (location_type l)
{
return symbol_type (token::PROFBEGIN, std::move (l));
}
#else
static
symbol_type
make_PROFBEGIN (const location_type& l)
{
return symbol_type (token::PROFBEGIN, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
make_PROFEND (location_type l)
{
return symbol_type (token::PROFEND, std::move (l));
}
#else
static
symbol_type
make_PROFEND (const location_type& l)
{
return symbol_type (token::PROFEND, l);
}
#endif
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
@ -4161,8 +4290,8 @@ switch (yykind)
/// Constants.
enum
{
yylast_ = 1581, ///< Last index in yytable_.
yynnts_ = 73, ///< Number of nonterminal symbols.
yylast_ = 1646, ///< Last index in yytable_.
yynnts_ = 76, ///< Number of nonterminal symbols.
yyfinal_ = 15 ///< Termination state number.
};
@ -4319,6 +4448,10 @@ switch (yykind)
value.copy< stmt_break_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.copy< stmt_breakpoint_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.copy< stmt_call_ptr > (YY_MOVE (that.value));
break;
@ -4364,6 +4497,14 @@ switch (yykind)
value.copy< stmt_notify_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.copy< stmt_prof_begin_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.copy< stmt_prof_end_ptr > (YY_MOVE (that.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.copy< stmt_ptr > (YY_MOVE (that.value));
@ -4587,6 +4728,10 @@ switch (yykind)
value.move< stmt_break_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_breakpoint: // stmt_breakpoint
value.move< stmt_breakpoint_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_call: // stmt_call
value.move< stmt_call_ptr > (YY_MOVE (s.value));
break;
@ -4632,6 +4777,14 @@ switch (yykind)
value.move< stmt_notify_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_begin: // stmt_prof_begin
value.move< stmt_prof_begin_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt_prof_end: // stmt_prof_end
value.move< stmt_prof_end_ptr > (YY_MOVE (s.value));
break;
case symbol_kind::S_stmt: // stmt
case symbol_kind::S_for_stmt: // for_stmt
value.move< stmt_ptr > (YY_MOVE (s.value));
@ -4760,7 +4913,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::s2
#line 4764 "parser.hpp"
#line 4917 "parser.hpp"

View File

@ -93,6 +93,9 @@ enum class node_t
stmt_break,
stmt_continue,
stmt_return,
stmt_breakpoint,
stmt_prof_begin,
stmt_prof_end,
parameters,
thread,
constant,
@ -201,6 +204,9 @@ struct node_stmt_default;
struct node_stmt_break;
struct node_stmt_continue;
struct node_stmt_return;
struct node_stmt_breakpoint;
struct node_stmt_prof_begin;
struct node_stmt_prof_end;
struct node_parameters;
struct node_thread;
struct node_constant;
@ -305,6 +311,9 @@ using stmt_default_ptr = std::unique_ptr<node_stmt_default>;
using stmt_break_ptr = std::unique_ptr<node_stmt_break>;
using stmt_continue_ptr = std::unique_ptr<node_stmt_continue>;
using stmt_return_ptr = std::unique_ptr<node_stmt_return>;
using stmt_breakpoint_ptr = std::unique_ptr<node_stmt_breakpoint>;
using stmt_prof_begin_ptr = std::unique_ptr<node_stmt_prof_begin>;
using stmt_prof_end_ptr = std::unique_ptr<node_stmt_prof_end>;
using parameters_ptr = std::unique_ptr<node_parameters>;
using thread_ptr = std::unique_ptr<node_thread>;
using constant_ptr = std::unique_ptr<node_constant>;
@ -447,6 +456,9 @@ union stmt_ptr
stmt_break_ptr as_break;
stmt_continue_ptr as_continue;
stmt_return_ptr as_return;
stmt_breakpoint_ptr as_breakpoint;
stmt_prof_begin_ptr as_prof_begin;
stmt_prof_end_ptr as_prof_end;
asm_loc_ptr as_loc;
asm_jump_cond_ptr as_cond;
asm_jump_ptr as_jump;
@ -2208,6 +2220,52 @@ struct node_stmt_return : public node
};
};
struct node_stmt_breakpoint : public node
{
node_stmt_breakpoint()
: node(node_t::stmt_breakpoint) {}
node_stmt_breakpoint(const location& loc)
: node(node_t::stmt_breakpoint, loc) {}
auto print() -> std::string override
{
return "breakpoint;";
};
};
struct node_stmt_prof_begin : public node
{
expr_arguments_ptr args;
node_stmt_prof_begin(expr_arguments_ptr args)
: node(node_t::stmt_prof_begin), args(std::move(args)) {}
node_stmt_prof_begin(const location& loc, expr_arguments_ptr args)
: node(node_t::stmt_prof_begin, loc), args(std::move(args)) {}
auto print() -> std::string override
{
return "prof_begin(" + args->print() + ");";
};
};
struct node_stmt_prof_end : public node
{
expr_arguments_ptr args;
node_stmt_prof_end(expr_arguments_ptr args)
: node(node_t::stmt_prof_end), args(std::move(args)) {}
node_stmt_prof_end(const location& loc, expr_arguments_ptr args)
: node(node_t::stmt_prof_end, loc), args(std::move(args)) {}
auto print() -> std::string override
{
return "prof_end(" + args->print() + ");";
};
};
struct node_parameters : public node
{
std::vector<name_ptr> list;