diff --git a/gen/h1/parser.ypp b/gen/h1/parser.ypp index 25a81c07..eef184d7 100644 --- a/gen/h1/parser.ypp +++ b/gen/h1/parser.ypp @@ -201,6 +201,9 @@ xsk::gsc::h1::parser::symbol_type H1lex(xsk::gsc::h1::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -528,7 +531,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -732,6 +737,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/h2/parser.ypp b/gen/h2/parser.ypp index 7e7b34e2..39645a2e 100644 --- a/gen/h2/parser.ypp +++ b/gen/h2/parser.ypp @@ -201,6 +201,9 @@ xsk::gsc::h2::parser::symbol_type H2lex(xsk::gsc::h2::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -528,7 +531,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -732,6 +737,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/iw5/parser.ypp b/gen/iw5/parser.ypp index 674d4075..440050eb 100644 --- a/gen/iw5/parser.ypp +++ b/gen/iw5/parser.ypp @@ -199,6 +199,9 @@ xsk::gsc::iw5::parser::symbol_type IW5lex(xsk::gsc::iw5::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -518,7 +521,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -722,6 +727,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/iw6/parser.ypp b/gen/iw6/parser.ypp index 942c6205..634a684d 100644 --- a/gen/iw6/parser.ypp +++ b/gen/iw6/parser.ypp @@ -199,6 +199,9 @@ xsk::gsc::iw6::parser::symbol_type IW6lex(xsk::gsc::iw6::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -518,7 +521,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -722,6 +727,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/iw7/parser.ypp b/gen/iw7/parser.ypp index 88ac12b5..c48b346a 100644 --- a/gen/iw7/parser.ypp +++ b/gen/iw7/parser.ypp @@ -199,6 +199,9 @@ xsk::gsc::iw7::parser::symbol_type IW7lex(xsk::gsc::iw7::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -518,7 +521,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -722,6 +727,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/iw8/parser.ypp b/gen/iw8/parser.ypp index c2619d29..f30846fc 100644 --- a/gen/iw8/parser.ypp +++ b/gen/iw8/parser.ypp @@ -205,6 +205,9 @@ xsk::gsc::iw8::parser::symbol_type IW8lex(xsk::gsc::iw8::lexer& lexer); %type expr_isdefined %type expr_istrue %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -532,7 +535,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -748,6 +753,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/s1/parser.ypp b/gen/s1/parser.ypp index c7080d02..385a2e5f 100644 --- a/gen/s1/parser.ypp +++ b/gen/s1/parser.ypp @@ -201,6 +201,9 @@ xsk::gsc::s1::parser::symbol_type S1lex(xsk::gsc::s1::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -528,7 +531,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -732,6 +737,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/s2/parser.ypp b/gen/s2/parser.ypp index 12f0e498..f19166b5 100644 --- a/gen/s2/parser.ypp +++ b/gen/s2/parser.ypp @@ -201,6 +201,9 @@ xsk::gsc::s2::parser::symbol_type S2lex(xsk::gsc::s2::lexer& lexer); %type expr_arguments %type expr_arguments_no_empty %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -528,7 +531,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -732,6 +737,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/gen/s4/parser.ypp b/gen/s4/parser.ypp index e5f52cf2..7bd6731e 100644 --- a/gen/s4/parser.ypp +++ b/gen/s4/parser.ypp @@ -205,6 +205,9 @@ xsk::gsc::s4::parser::symbol_type S4lex(xsk::gsc::s4::lexer& lexer); %type expr_isdefined %type expr_istrue %type expr_reference +%type expr_tuple +%type expr_tuple_arguments +%type expr_tuple_types %type expr_array %type expr_field %type expr_size @@ -532,7 +535,9 @@ expr_or_empty ; expr_assign - : expr_object ASSIGN expr + : expr_tuple ASSIGN expr + { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } + | expr_object ASSIGN expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } | expr_object ASSIGN_BW_OR expr { $$.as_node = std::make_unique(@$, std::move($1), std::move($3)); } @@ -748,6 +753,24 @@ expr_reference { $$ = std::make_unique(@$, std::move($1), std::move($3)); } ; +expr_tuple + : LBRACKET expr_tuple_arguments RBRACKET + { $$.as_node = std::move($2); } + ; + +expr_tuple_arguments + : expr_tuple_arguments COMMA expr_tuple_types + { $$ = std::move($1); $$->list.push_back(std::move($3)); } + | expr_tuple_types + { $$ = std::make_unique(@$); $$->list.push_back(std::move($1)); } + ; + +expr_tuple_types + : expr_array { $$.as_node = std::move($1); } + | expr_field { $$.as_node = std::move($1); } + | expr_identifier { $$.as_node = std::move($1); } + ; + expr_array : expr_object LBRACKET expr RBRACKET { $$ = std::make_unique(@$, std::move($1), std::move($3)); } diff --git a/src/h1/xsk/assembler.cpp b/src/h1/xsk/assembler.cpp index 8f3da4ce..c0d6be69 100644 --- a/src/h1/xsk/assembler.cpp +++ b/src/h1/xsk/assembler.cpp @@ -385,7 +385,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -492,6 +492,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -555,7 +559,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -568,7 +572,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::h1 diff --git a/src/h1/xsk/compiler.cpp b/src/h1/xsk/compiler.cpp index 308b125b..1f71ea07 100644 --- a/src/h1/xsk/compiler.cpp +++ b/src/h1/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -395,7 +400,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1038,11 +1043,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1548,7 +1560,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1593,6 +1605,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1632,7 +1667,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1718,7 +1753,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2248,7 +2283,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2315,11 +2350,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2342,11 +2377,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2374,7 +2409,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2383,7 +2418,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2391,8 +2426,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2424,13 +2459,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2590,23 +2625,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if(blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2633,7 +2685,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2647,7 +2699,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2660,7 +2711,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2838,8 +2889,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2854,7 +2904,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2887,7 +2937,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/h1/xsk/compiler.hpp b/src/h1/xsk/compiler.hpp index a88a12b2..857520bd 100644 --- a/src/h1/xsk/compiler.hpp +++ b/src/h1/xsk/compiler.hpp @@ -96,6 +96,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -137,10 +138,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/h1/xsk/decompiler.cpp b/src/h1/xsk/decompiler.cpp index 69f2a6cf..d63e84f0 100644 --- a/src/h1/xsk/decompiler.cpp +++ b/src/h1/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -493,8 +490,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto expr = std::make_unique(loc, std::move(call)); stack_.push(std::move(expr)); - } break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,39 +1228,39 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waitFrame: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); @@ -1278,69 +1275,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(expr), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1349,98 +1345,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); stack_.push(std::move(stmt)); - } break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1448,256 +1446,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1717,7 +1702,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1744,7 +1729,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1771,7 +1756,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1779,9 +1763,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1792,60 +1777,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1975,7 +1938,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2009,7 +1972,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2026,7 +1989,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2155,7 +2118,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2215,7 +2178,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2247,7 +2210,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2378,17 +2341,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2421,7 +2384,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2432,17 +2395,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2486,7 +2449,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2638,7 +2601,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2742,8 +2705,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2987,7 +2950,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3016,7 +2979,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3056,7 +3019,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3178,9 +3141,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3429,11 +3389,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3451,7 +3406,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3469,7 +3424,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/h1/xsk/decompiler.hpp b/src/h1/xsk/decompiler.hpp index be5080d9..c3e5f53c 100644 --- a/src/h1/xsk/decompiler.hpp +++ b/src/h1/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/h1/xsk/disassembler.cpp b/src/h1/xsk/disassembler.cpp index ee66ca2b..99baf7be 100644 --- a/src/h1/xsk/disassembler.cpp +++ b/src/h1/xsk/disassembler.cpp @@ -300,7 +300,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -494,7 +494,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -517,7 +517,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/h1/xsk/h1.cpp b/src/h1/xsk/h1.cpp index f0049676..9b713134 100644 --- a/src/h1/xsk/h1.cpp +++ b/src/h1/xsk/h1.cpp @@ -175,7 +175,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/h1/xsk/lexer.cpp b/src/h1/xsk/lexer.cpp index 4443b23d..d5d2d8e9 100644 --- a/src/h1/xsk/lexer.cpp +++ b/src/h1/xsk/lexer.cpp @@ -683,7 +683,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -717,7 +717,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -751,7 +751,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/h1/xsk/parser.cpp b/src/h1/xsk/parser.cpp index ab127403..54bf41c2 100644 --- a/src/h1/xsk/parser.cpp +++ b/src/h1/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace h1 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -550,6 +556,8 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -672,6 +680,10 @@ namespace xsk { namespace gsc { namespace h1 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -856,6 +868,8 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -978,6 +992,10 @@ namespace xsk { namespace gsc { namespace h1 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1161,6 +1179,8 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1283,6 +1303,10 @@ namespace xsk { namespace gsc { namespace h1 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1721,6 +1745,8 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1843,6 +1869,10 @@ namespace xsk { namespace gsc { namespace h1 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -2004,1351 +2034,1393 @@ namespace xsk { namespace gsc { namespace h1 { switch (yyn) { case 2: // root: program -#line 260 "parser.ypp" +#line 263 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2010 "parser.cpp" - break; - - case 3: // root: %empty -#line 261 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 2016 "parser.cpp" - break; - - case 4: // program: program inline -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2022 "parser.cpp" - break; - - case 5: // program: program include -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2028 "parser.cpp" - break; - - case 6: // program: program declaration -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2034 "parser.cpp" - break; - - case 7: // program: inline -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2040 "parser.cpp" break; - case 8: // program: include -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 264 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2046 "parser.cpp" break; - case 9: // program: declaration -#line 276 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2052 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 280 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2058 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 285 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2064 "parser.cpp" break; - case 12: // declaration: "/#" -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2070 "parser.cpp" break; - case 13: // declaration: "#/" -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2076 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 279 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2082 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 292 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 283 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2088 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 293 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 288 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2094 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 298 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2100 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 303 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2106 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 308 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2112 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 295 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2118 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 296 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2124 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 301 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2130 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 306 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2136 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 311 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2142 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2148 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2154 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2160 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2166 "parser.cpp" break; - case 29: // stmt: stmt_waitframe -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } + case 24: // stmt: stmt_notify +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2172 "parser.cpp" break; - case 30: // stmt: stmt_if -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 25: // stmt: stmt_wait +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2178 "parser.cpp" break; - case 31: // stmt: stmt_ifelse -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2184 "parser.cpp" break; - case 32: // stmt: stmt_while -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2190 "parser.cpp" break; - case 33: // stmt: stmt_dowhile -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2196 "parser.cpp" break; - case 34: // stmt: stmt_for -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 29: // stmt: stmt_waitframe +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2202 "parser.cpp" break; - case 35: // stmt: stmt_foreach -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 30: // stmt: stmt_if +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2208 "parser.cpp" break; - case 36: // stmt: stmt_switch -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 31: // stmt: stmt_ifelse +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2214 "parser.cpp" break; - case 37: // stmt: stmt_case -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 32: // stmt: stmt_while +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2220 "parser.cpp" break; - case 38: // stmt: stmt_default -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 33: // stmt: stmt_dowhile +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2226 "parser.cpp" break; - case 39: // stmt: stmt_break -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 34: // stmt: stmt_for +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2232 "parser.cpp" break; - case 40: // stmt: stmt_continue -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 35: // stmt: stmt_foreach +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2238 "parser.cpp" break; - case 41: // stmt: stmt_return -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 36: // stmt: stmt_switch +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2244 "parser.cpp" break; - case 42: // stmt: stmt_breakpoint -#line 334 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 37: // stmt: stmt_case +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2250 "parser.cpp" break; - case 43: // stmt: stmt_prof_begin -#line 335 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 38: // stmt: stmt_default +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2256 "parser.cpp" break; - case 44: // stmt: stmt_prof_end -#line 336 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 39: // stmt: stmt_break +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2262 "parser.cpp" break; - case 45: // stmt_or_dev: stmt -#line 340 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 40: // stmt: stmt_continue +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2268 "parser.cpp" break; - case 46: // stmt_or_dev: stmt_dev -#line 341 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 41: // stmt: stmt_return +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2274 "parser.cpp" break; - case 47: // stmt_list: stmt_list stmt -#line 346 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_breakpoint +#line 337 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2280 "parser.cpp" break; - case 48: // stmt_list: stmt -#line 348 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_begin +#line 338 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2286 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 353 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt: stmt_prof_end +#line 339 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2292 "parser.cpp" break; - case 50: // stmt_or_dev_list: stmt_or_dev -#line 355 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 45: // stmt_or_dev: stmt +#line 343 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2298 "parser.cpp" break; - case 51: // stmt_dev: "/#" stmt_list "#/" -#line 359 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 46: // stmt_or_dev: stmt_dev +#line 344 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2304 "parser.cpp" break; - case 52: // stmt_dev: "/#" "#/" -#line 360 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 47: // stmt_list: stmt_list stmt +#line 349 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2310 "parser.cpp" break; - case 53: // stmt_block: "{" stmt_or_dev_list "}" -#line 364 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 48: // stmt_list: stmt +#line 351 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2316 "parser.cpp" break; - case 54: // stmt_block: "{" "}" -#line 365 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 356 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2322 "parser.cpp" break; - case 55: // stmt_expr: expr_assign -#line 370 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_or_dev_list: stmt_or_dev +#line 358 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2328 "parser.cpp" break; - case 56: // stmt_expr: expr_increment -#line 372 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" stmt_list "#/" +#line 362 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2334 "parser.cpp" break; - case 57: // stmt_expr: expr_decrement -#line 374 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 52: // stmt_dev: "/#" "#/" +#line 363 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2340 "parser.cpp" break; - case 58: // stmt_expr: %empty -#line 376 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 53: // stmt_block: "{" stmt_or_dev_list "}" +#line 367 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2346 "parser.cpp" break; - case 59: // stmt_call: expr_call ";" -#line 381 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 54: // stmt_block: "{" "}" +#line 368 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2352 "parser.cpp" break; - case 60: // stmt_call: expr_method ";" -#line 383 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 55: // stmt_expr: expr_assign +#line 373 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2358 "parser.cpp" break; - case 61: // stmt_assign: expr_assign ";" -#line 388 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_increment +#line 375 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2364 "parser.cpp" break; - case 62: // stmt_assign: expr_increment ";" -#line 390 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: expr_decrement +#line 377 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2370 "parser.cpp" break; - case 63: // stmt_assign: expr_decrement ";" -#line 392 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 58: // stmt_expr: %empty +#line 379 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2376 "parser.cpp" break; - case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 397 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 59: // stmt_call: expr_call ";" +#line 384 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2382 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 402 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 60: // stmt_call: expr_method ";" +#line 386 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2388 "parser.cpp" break; - case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 404 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 61: // stmt_assign: expr_assign ";" +#line 391 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2394 "parser.cpp" break; - case 67: // stmt_wait: "wait" expr ";" -#line 409 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 62: // stmt_assign: expr_increment ";" +#line 393 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2400 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 414 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 63: // stmt_assign: expr_decrement ";" +#line 395 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2406 "parser.cpp" break; - case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 416 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 400 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2412 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 421 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 405 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2418 "parser.cpp" break; - case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 423 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 407 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2424 "parser.cpp" break; - case 72: // stmt_waittillframeend: "waittillframeend" ";" -#line 428 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 67: // stmt_wait: "wait" expr ";" +#line 412 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2430 "parser.cpp" break; - case 73: // stmt_waitframe: "waitframe" ";" -#line 433 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 417 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2436 "parser.cpp" break; - case 74: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 419 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2442 "parser.cpp" break; - case 75: // stmt_if: "if" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 424 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2448 "parser.cpp" break; - case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 426 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2454 "parser.cpp" break; - case 77: // stmt_while: "while" "(" expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_waittillframeend: "waittillframeend" ";" +#line 431 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2460 "parser.cpp" break; - case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 73: // stmt_waitframe: "waitframe" ";" +#line 436 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2466 "parser.cpp" break; - case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 460 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 74: // stmt_waitframe: "waitframe" "(" ")" ";" +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2472 "parser.cpp" break; - case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 465 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 75: // stmt_if: "if" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2478 "parser.cpp" break; - case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2484 "parser.cpp" break; - case 82: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 472 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 77: // stmt_while: "while" "(" expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2490 "parser.cpp" break; - case 83: // stmt_case: "case" expr_integer ":" -#line 477 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2496 "parser.cpp" break; - case 84: // stmt_case: "case" expr_string ":" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 463 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2502 "parser.cpp" break; - case 85: // stmt_default: "default" ":" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 468 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2508 "parser.cpp" break; - case 86: // stmt_break: "break" ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2514 "parser.cpp" break; - case 87: // stmt_continue: "continue" ";" -#line 494 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 475 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2520 "parser.cpp" break; - case 88: // stmt_return: "return" expr ";" -#line 499 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 83: // stmt_case: "case" expr_integer ":" +#line 480 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2526 "parser.cpp" break; - case 89: // stmt_return: "return" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 84: // stmt_case: "case" expr_string ":" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2532 "parser.cpp" break; - case 90: // stmt_breakpoint: "breakpoint" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 85: // stmt_default: "default" ":" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2538 "parser.cpp" break; - case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 511 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 86: // stmt_break: "break" ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2544 "parser.cpp" break; - case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 516 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 87: // stmt_continue: "continue" ";" +#line 497 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2550 "parser.cpp" break; - case 93: // expr: expr_ternary -#line 520 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_return: "return" expr ";" +#line 502 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2556 "parser.cpp" break; - case 94: // expr: expr_binary -#line 521 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 89: // stmt_return: "return" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2562 "parser.cpp" break; - case 95: // expr: expr_primitive -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 90: // stmt_breakpoint: "breakpoint" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2568 "parser.cpp" break; - case 96: // expr_or_empty: expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 514 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2574 "parser.cpp" break; - case 97: // expr_or_empty: %empty -#line 527 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 519 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2580 "parser.cpp" break; - case 98: // expr_assign: expr_object "=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr: expr_ternary +#line 523 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2586 "parser.cpp" break; - case 99: // expr_assign: expr_object "|=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 94: // expr: expr_binary +#line 524 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2592 "parser.cpp" break; - case 100: // expr_assign: expr_object "&=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr: expr_primitive +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2598 "parser.cpp" break; - case 101: // expr_assign: expr_object "^=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_or_empty: expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2604 "parser.cpp" break; - case 102: // expr_assign: expr_object "<<=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_or_empty: %empty +#line 530 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2610 "parser.cpp" break; - case 103: // expr_assign: expr_object ">>=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_tuple "=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2616 "parser.cpp" break; - case 104: // expr_assign: expr_object "+=" expr -#line 544 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2622 "parser.cpp" break; - case 105: // expr_assign: expr_object "-=" expr -#line 546 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "|=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2628 "parser.cpp" break; - case 106: // expr_assign: expr_object "*=" expr -#line 548 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 101: // expr_assign: expr_object "&=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2634 "parser.cpp" break; - case 107: // expr_assign: expr_object "/=" expr -#line 550 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 102: // expr_assign: expr_object "^=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2640 "parser.cpp" break; - case 108: // expr_assign: expr_object "%=" expr -#line 552 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 103: // expr_assign: expr_object "<<=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2646 "parser.cpp" break; - case 109: // expr_increment: "++" expr_object -#line 557 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 104: // expr_assign: expr_object ">>=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2652 "parser.cpp" break; - case 110: // expr_increment: expr_object "++" -#line 559 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 105: // expr_assign: expr_object "+=" expr +#line 549 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2658 "parser.cpp" break; - case 111: // expr_decrement: "--" expr_object -#line 564 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 106: // expr_assign: expr_object "-=" expr +#line 551 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2664 "parser.cpp" break; - case 112: // expr_decrement: expr_object "--" -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 107: // expr_assign: expr_object "*=" expr +#line 553 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2670 "parser.cpp" break; - case 113: // expr_ternary: expr "?" expr ":" expr -#line 571 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_assign: expr_object "/=" expr +#line 555 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2676 "parser.cpp" break; - case 114: // expr_binary: expr "||" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_assign: expr_object "%=" expr +#line 557 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2682 "parser.cpp" break; - case 115: // expr_binary: expr "&&" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_increment: "++" expr_object +#line 562 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2688 "parser.cpp" break; - case 116: // expr_binary: expr "==" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_increment: expr_object "++" +#line 564 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2694 "parser.cpp" break; - case 117: // expr_binary: expr "!=" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_decrement: "--" expr_object +#line 569 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2700 "parser.cpp" break; - case 118: // expr_binary: expr "<=" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_decrement: expr_object "--" +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2706 "parser.cpp" break; - case 119: // expr_binary: expr ">=" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_ternary: expr "?" expr ":" expr +#line 576 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2712 "parser.cpp" break; - case 120: // expr_binary: expr "<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "||" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2718 "parser.cpp" break; - case 121: // expr_binary: expr ">" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "&&" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2724 "parser.cpp" break; - case 122: // expr_binary: expr "|" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr "==" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2730 "parser.cpp" break; - case 123: // expr_binary: expr "&" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "!=" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2736 "parser.cpp" break; - case 124: // expr_binary: expr "^" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr "<=" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2742 "parser.cpp" break; - case 125: // expr_binary: expr "<<" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr ">=" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2748 "parser.cpp" break; - case 126: // expr_binary: expr ">>" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2754 "parser.cpp" break; - case 127: // expr_binary: expr "+" expr -#line 602 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr ">" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2760 "parser.cpp" break; - case 128: // expr_binary: expr "-" expr -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "|" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2766 "parser.cpp" break; - case 129: // expr_binary: expr "*" expr -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 124: // expr_binary: expr "&" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2772 "parser.cpp" break; - case 130: // expr_binary: expr "/" expr -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 125: // expr_binary: expr "^" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2778 "parser.cpp" break; - case 131: // expr_binary: expr "%" expr -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 126: // expr_binary: expr "<<" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2784 "parser.cpp" break; - case 132: // expr_primitive: expr_complement -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 127: // expr_binary: expr ">>" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2790 "parser.cpp" break; - case 133: // expr_primitive: expr_negate -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 128: // expr_binary: expr "+" expr +#line 607 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2796 "parser.cpp" break; - case 134: // expr_primitive: expr_not -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 129: // expr_binary: expr "-" expr +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2802 "parser.cpp" break; - case 135: // expr_primitive: expr_call -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 130: // expr_binary: expr "*" expr +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2808 "parser.cpp" break; - case 136: // expr_primitive: expr_method -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 131: // expr_binary: expr "/" expr +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2814 "parser.cpp" break; - case 137: // expr_primitive: expr_add_array -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 132: // expr_binary: expr "%" expr +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2820 "parser.cpp" break; - case 138: // expr_primitive: expr_reference -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 133: // expr_primitive: expr_complement +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2826 "parser.cpp" break; - case 139: // expr_primitive: expr_array -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 134: // expr_primitive: expr_negate +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2832 "parser.cpp" break; - case 140: // expr_primitive: expr_field -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 135: // expr_primitive: expr_not +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2838 "parser.cpp" break; - case 141: // expr_primitive: expr_size -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 136: // expr_primitive: expr_call +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2844 "parser.cpp" break; - case 142: // expr_primitive: expr_paren -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 137: // expr_primitive: expr_method +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2850 "parser.cpp" break; - case 143: // expr_primitive: expr_thisthread -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 138: // expr_primitive: expr_add_array +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2856 "parser.cpp" break; - case 144: // expr_primitive: expr_empty_array -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 139: // expr_primitive: expr_reference +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2862 "parser.cpp" break; - case 145: // expr_primitive: expr_undefined -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 140: // expr_primitive: expr_array +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2868 "parser.cpp" break; - case 146: // expr_primitive: expr_game -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 141: // expr_primitive: expr_field +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2874 "parser.cpp" break; - case 147: // expr_primitive: expr_self -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 142: // expr_primitive: expr_size +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2880 "parser.cpp" break; - case 148: // expr_primitive: expr_anim -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 143: // expr_primitive: expr_paren +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2886 "parser.cpp" break; - case 149: // expr_primitive: expr_level -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 144: // expr_primitive: expr_thisthread +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2892 "parser.cpp" break; - case 150: // expr_primitive: expr_animation -#line 632 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 145: // expr_primitive: expr_empty_array +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2898 "parser.cpp" break; - case 151: // expr_primitive: expr_animtree -#line 633 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 146: // expr_primitive: expr_undefined +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2904 "parser.cpp" break; - case 152: // expr_primitive: expr_identifier -#line 634 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 147: // expr_primitive: expr_game +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2910 "parser.cpp" break; - case 153: // expr_primitive: expr_istring -#line 635 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 148: // expr_primitive: expr_self +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2916 "parser.cpp" break; - case 154: // expr_primitive: expr_string -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 149: // expr_primitive: expr_anim +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2922 "parser.cpp" break; - case 155: // expr_primitive: expr_vector -#line 637 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 150: // expr_primitive: expr_level +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2928 "parser.cpp" break; - case 156: // expr_primitive: expr_float -#line 638 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 151: // expr_primitive: expr_animation +#line 637 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2934 "parser.cpp" break; - case 157: // expr_primitive: expr_integer -#line 639 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 152: // expr_primitive: expr_animtree +#line 638 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2940 "parser.cpp" break; - case 158: // expr_primitive: expr_false -#line 640 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 153: // expr_primitive: expr_identifier +#line 639 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2946 "parser.cpp" break; - case 159: // expr_primitive: expr_true -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 154: // expr_primitive: expr_istring +#line 640 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2952 "parser.cpp" break; - case 160: // expr_complement: "~" expr -#line 646 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 155: // expr_primitive: expr_string +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2958 "parser.cpp" break; - case 161: // expr_negate: "-" expr_identifier -#line 651 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 156: // expr_primitive: expr_vector +#line 642 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2964 "parser.cpp" break; - case 162: // expr_negate: "-" expr_paren -#line 653 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 157: // expr_primitive: expr_float +#line 643 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2970 "parser.cpp" break; - case 163: // expr_negate: "-" expr_array -#line 655 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 158: // expr_primitive: expr_integer +#line 644 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2976 "parser.cpp" break; - case 164: // expr_negate: "-" expr_field -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 159: // expr_primitive: expr_false +#line 645 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2982 "parser.cpp" break; - case 165: // expr_not: "!" expr -#line 662 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 160: // expr_primitive: expr_true +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2988 "parser.cpp" break; - case 166: // expr_call: expr_function -#line 666 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_complement: "~" expr +#line 651 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2994 "parser.cpp" break; - case 167: // expr_call: expr_pointer -#line 667 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 162: // expr_negate: "-" expr_identifier +#line 656 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 3000 "parser.cpp" break; - case 168: // expr_method: expr_object expr_function -#line 670 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 163: // expr_negate: "-" expr_paren +#line 658 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 3006 "parser.cpp" break; - case 169: // expr_method: expr_object expr_pointer -#line 671 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 164: // expr_negate: "-" expr_array +#line 660 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 3012 "parser.cpp" break; - case 170: // expr_function: expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 165: // expr_negate: "-" expr_field +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 3018 "parser.cpp" break; - case 171: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 678 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 166: // expr_not: "!" expr +#line 667 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3024 "parser.cpp" break; - case 172: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 680 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 167: // expr_call: expr_function +#line 671 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3030 "parser.cpp" break; - case 173: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 682 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 168: // expr_call: expr_pointer +#line 672 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3036 "parser.cpp" break; - case 174: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 684 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 169: // expr_method: expr_object expr_function +#line 675 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3042 "parser.cpp" break; - case 175: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 686 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_method: expr_object expr_pointer +#line 676 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3048 "parser.cpp" break; - case 176: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 691 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 171: // expr_function: expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3054 "parser.cpp" break; - case 177: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 693 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 172: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 683 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3060 "parser.cpp" break; - case 178: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 695 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 173: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 685 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3066 "parser.cpp" break; - case 179: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 697 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 174: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 687 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3072 "parser.cpp" break; - case 180: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 702 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 175: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 689 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3078 "parser.cpp" break; - case 181: // expr_parameters: expr_parameters "," expr_identifier -#line 707 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 176: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 691 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3084 "parser.cpp" break; - case 182: // expr_parameters: expr_identifier -#line 709 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 177: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 696 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3090 "parser.cpp" break; - case 183: // expr_parameters: %empty -#line 711 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 178: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 698 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3096 "parser.cpp" break; - case 184: // expr_arguments: expr_arguments_no_empty -#line 716 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 179: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 700 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3102 "parser.cpp" break; - case 185: // expr_arguments: %empty -#line 718 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 180: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 702 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3108 "parser.cpp" break; - case 186: // expr_arguments_no_empty: expr_arguments "," expr -#line 723 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 181: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 707 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3114 "parser.cpp" break; - case 187: // expr_arguments_no_empty: expr -#line 725 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 182: // expr_parameters: expr_parameters "," expr_identifier +#line 712 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3120 "parser.cpp" break; - case 188: // expr_reference: "::" expr_identifier -#line 730 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_parameters: expr_identifier +#line 714 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3126 "parser.cpp" break; - case 189: // expr_reference: expr_path "::" expr_identifier -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 184: // expr_parameters: %empty +#line 716 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3132 "parser.cpp" break; - case 190: // expr_array: expr_object "[" expr "]" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments: expr_arguments_no_empty +#line 721 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3138 "parser.cpp" break; - case 191: // expr_field: expr_object "." expr_identifier_nosize -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 186: // expr_arguments: %empty +#line 723 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3144 "parser.cpp" break; - case 192: // expr_size: expr_object "." "size" -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 187: // expr_arguments_no_empty: expr_arguments "," expr +#line 728 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3150 "parser.cpp" break; - case 193: // expr_paren: "(" expr ")" -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 188: // expr_arguments_no_empty: expr +#line 730 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3156 "parser.cpp" break; - case 194: // expr_object: expr_call -#line 756 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 189: // expr_reference: "::" expr_identifier +#line 735 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3162 "parser.cpp" break; - case 195: // expr_object: expr_method -#line 757 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 190: // expr_reference: expr_path "::" expr_identifier +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3168 "parser.cpp" break; - case 196: // expr_object: expr_array -#line 758 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 191: // expr_tuple: "[" expr_tuple_arguments "]" +#line 742 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3174 "parser.cpp" break; - case 197: // expr_object: expr_field -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 192: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 747 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3180 "parser.cpp" break; - case 198: // expr_object: expr_game -#line 760 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 193: // expr_tuple_arguments: expr_tuple_types +#line 749 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3186 "parser.cpp" break; - case 199: // expr_object: expr_self -#line 761 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 194: // expr_tuple_types: expr_array +#line 753 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3192 "parser.cpp" break; - case 200: // expr_object: expr_anim -#line 762 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 195: // expr_tuple_types: expr_field +#line 754 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3198 "parser.cpp" break; - case 201: // expr_object: expr_level -#line 763 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 196: // expr_tuple_types: expr_identifier +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3204 "parser.cpp" break; - case 202: // expr_object: expr_identifier -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 197: // expr_array: expr_object "[" expr "]" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3210 "parser.cpp" break; - case 203: // expr_thisthread: "thisthread" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_field: expr_object "." expr_identifier_nosize +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3216 "parser.cpp" break; - case 204: // expr_empty_array: "[" "]" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_size: expr_object "." "size" +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3222 "parser.cpp" break; - case 205: // expr_undefined: "undefined" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_paren: "(" expr ")" +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3228 "parser.cpp" break; - case 206: // expr_game: "game" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_call +#line 779 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3234 "parser.cpp" break; - case 207: // expr_self: "self" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 202: // expr_object: expr_method +#line 780 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3240 "parser.cpp" break; - case 208: // expr_anim: "anim" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_array +#line 781 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3246 "parser.cpp" break; - case 209: // expr_level: "level" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 204: // expr_object: expr_field +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3252 "parser.cpp" break; - case 210: // expr_animation: "%" "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_game +#line 783 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3258 "parser.cpp" break; - case 211: // expr_animtree: "#animtree" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 206: // expr_object: expr_self +#line 784 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3264 "parser.cpp" break; - case 212: // expr_identifier_nosize: "identifier" -#line 814 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_object: expr_anim +#line 785 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3270 "parser.cpp" break; - case 213: // expr_identifier: "identifier" -#line 819 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_object: expr_level +#line 786 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3276 "parser.cpp" break; - case 214: // expr_identifier: "size" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 209: // expr_object: expr_identifier +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3282 "parser.cpp" break; - case 215: // expr_path: "identifier" -#line 826 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_thisthread: "thisthread" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3288 "parser.cpp" break; - case 216: // expr_path: "path" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 211: // expr_empty_array: "[" "]" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3294 "parser.cpp" break; - case 217: // expr_istring: "localized string" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 212: // expr_undefined: "undefined" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3300 "parser.cpp" break; - case 218: // expr_string: "string literal" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_game: "game" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3306 "parser.cpp" break; - case 219: // expr_vector: "(" expr "," expr "," expr ")" -#line 843 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 214: // expr_self: "self" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3312 "parser.cpp" break; - case 220: // expr_float: "-" "float" -#line 848 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 215: // expr_anim: "anim" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3318 "parser.cpp" break; - case 221: // expr_float: "float" -#line 850 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 216: // expr_level: "level" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3324 "parser.cpp" break; - case 222: // expr_integer: "-" "integer" -#line 855 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 217: // expr_animation: "%" "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3330 "parser.cpp" break; - case 223: // expr_integer: "integer" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 218: // expr_animtree: "#animtree" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3336 "parser.cpp" break; - case 224: // expr_false: "false" -#line 862 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 219: // expr_identifier_nosize: "identifier" +#line 837 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3342 "parser.cpp" break; - case 225: // expr_true: "true" -#line 867 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 220: // expr_identifier: "identifier" +#line 842 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3348 "parser.cpp" break; + case 221: // expr_identifier: "size" +#line 844 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3354 "parser.cpp" + break; -#line 3352 "parser.cpp" + case 222: // expr_path: "identifier" +#line 849 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3360 "parser.cpp" + break; + + case 223: // expr_path: "path" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3366 "parser.cpp" + break; + + case 224: // expr_istring: "localized string" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3372 "parser.cpp" + break; + + case 225: // expr_string: "string literal" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3378 "parser.cpp" + break; + + case 226: // expr_vector: "(" expr "," expr "," expr ")" +#line 866 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3384 "parser.cpp" + break; + + case 227: // expr_float: "-" "float" +#line 871 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3390 "parser.cpp" + break; + + case 228: // expr_float: "float" +#line 873 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3396 "parser.cpp" + break; + + case 229: // expr_integer: "-" "integer" +#line 878 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3402 "parser.cpp" + break; + + case 230: // expr_integer: "integer" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3408 "parser.cpp" + break; + + case 231: // expr_false: "false" +#line 885 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3414 "parser.cpp" + break; + + case 232: // expr_true: "true" +#line 890 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3420 "parser.cpp" + break; + + +#line 3424 "parser.cpp" default: break; @@ -3559,7 +3631,8 @@ namespace xsk { namespace gsc { namespace h1 { "expr_binary", "expr_primitive", "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", - "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_arguments_no_empty", "expr_reference", "expr_tuple", + "expr_tuple_arguments", "expr_tuple_types", "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", @@ -3836,366 +3909,375 @@ namespace xsk { namespace gsc { namespace h1 { const short parser::yypact_ninf_ = -287; - const short parser::yytable_ninf_ = -216; + const short parser::yytable_ninf_ = -223; const short parser::yypact_[] = { - 9, -287, -287, -65, -65, -40, -287, -287, 41, 9, - -287, -287, -287, -287, -287, -287, -25, -287, -287, -12, - -8, -55, -287, -287, -287, -287, -34, 1152, -287, -287, - -287, 12, -19, -287, -287, -28, -18, -287, 4, -287, - -287, -287, -287, -287, -287, -287, 1152, 1026, -34, 1152, - 1152, 35, -27, 28, -287, -287, -287, 2117, -287, -287, - -287, -287, -287, -287, 543, 557, -287, -287, -287, -287, - 604, 666, -287, -287, 677, -287, -287, -287, 878, 955, - 1113, 1176, -287, -287, 215, 33, -287, -287, -287, -287, - -287, -287, -287, 32, 57, -34, 59, 52, 62, 67, - 75, 74, 85, 1408, 1026, -287, 2200, 92, 99, -287, - -287, -287, 1152, 102, -287, -287, -287, -287, 604, 666, - -287, 1375, -287, -287, -287, -287, 215, 100, -287, -287, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1215, - -31, -287, -287, 109, 1152, -34, -287, 769, -287, -287, - 1152, 1152, -34, 1152, 1152, -34, 1152, -287, 1152, 1886, - 1152, -287, 1574, 1152, 65, -34, 2082, 84, 84, 2231, - 2241, 2323, 2323, 249, 249, 249, 249, 2272, 2313, 2282, - 76, 76, -287, -287, -287, 1926, -287, -287, -287, -1, - -287, 116, 923, 1152, 111, -15, 129, 1339, 131, 132, - 134, 135, -53, 130, 128, 136, 1089, 137, 142, 145, - -287, 69, 69, -287, -287, 846, -287, -287, -287, -287, + 6, -287, -287, 5, 5, -24, -287, -287, 37, 6, + -287, -287, -287, -287, -287, -287, -8, -287, -287, -13, + -10, -54, -287, -287, -287, -287, -23, 1223, -287, -287, + -287, 11, -12, -287, -287, -42, 3, -287, 17, -287, + -287, -287, -287, -287, -287, -287, 1223, 821, -23, 1223, + 1223, -18, -36, 26, -287, -287, -287, 2187, -287, -287, + -287, -287, -287, -287, 413, 667, -287, -287, -287, -287, + 699, 729, -287, -287, 1012, -287, -287, -287, 1089, 1187, + 1247, 1317, -287, -287, 574, 39, -287, -287, -287, -287, + -287, -287, -287, 15, 96, -23, 49, 75, 81, 114, + 100, 124, 129, 1439, 821, -287, 2270, 134, 136, -287, + -287, -287, 1223, 142, -287, -287, -287, -287, 699, 729, + -287, 1406, -287, -287, -287, -287, 574, 140, -287, -287, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1286, + -20, -287, -287, 152, 1223, -23, -287, 928, -287, -287, + 1223, 1223, -23, 1223, 1223, -23, 1223, -287, 1223, 1917, + 1223, -287, 1605, 1223, 107, -23, 2152, 179, 179, 2301, + 2311, 2383, 2383, 30, 30, 30, 30, 2342, 728, 2352, + 73, 73, -287, -287, -287, 1957, -287, -287, -287, 35, + -287, 154, 1057, 1223, 146, -5, 161, 1370, 165, 166, + 167, 168, -17, 163, 169, 172, 1160, 183, 173, 175, + -287, 139, 548, 548, -287, -287, 980, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - -287, -287, 141, 143, 146, 148, 149, -287, -287, 1262, - 109, 1966, 8, 160, 2006, 15, 161, 2046, 1021, 163, - 2200, 1886, 116, 1152, -287, -287, 1152, -287, -287, 1000, - 2152, -287, 164, -287, 1152, 196, 1152, 49, -34, 1152, - 122, 165, 166, -287, -287, -287, -287, 2187, -287, 1152, - 1152, 1375, 1375, -287, -287, -287, -287, -287, -287, -287, - 178, 181, 182, 186, -287, -287, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 187, -287, 1152, - 193, -287, 1152, 195, 1152, 201, 2200, 19, -287, -287, - -287, 177, 1608, 205, 1642, 198, -287, -287, -287, 1365, - 1, 1676, -287, -287, -287, 48, 50, 1152, 1152, 1152, - 1152, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, - 2200, 2200, 209, 73, 211, 77, 218, 1710, 1152, -287, - -287, 1339, 1152, 1339, 1152, 1152, -34, 57, 203, 210, - 1744, 1452, 1496, 1540, 1152, -287, 1152, -287, 1152, -287, - 87, 250, 1778, -287, 2200, 214, 1812, 248, -287, -287, - -287, 220, 222, 1152, 223, 1152, 227, 1152, 90, 91, - 101, -287, 1339, 230, 49, 1339, 1152, -287, -287, 224, - -287, 244, -287, 246, -287, -287, -287, -287, -287, 251, - -287, 1846, 231, 238, 243, 1339, 1339, -287, -287, -287, - -287, -287 + -287, -287, -287, 184, 185, 188, 191, 192, 177, -287, + -287, 51, 152, 1997, 53, 205, 2037, 56, 206, 2077, + 2116, 203, 2270, 1917, 154, 1223, -287, -287, 1223, -287, + -287, 1134, 2222, -287, 209, -287, 1223, 236, 1223, 639, + -23, 1223, 164, 208, 215, -287, -287, -287, -287, 2257, + -287, 1223, 1223, 1286, 32, -287, 62, 86, 8, 1406, + 1406, -287, -287, -287, -287, -287, -287, -287, 1223, 225, + 227, 228, 230, -287, -287, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 210, -287, 1223, 226, + -287, 1223, 229, 1223, 232, 2270, 59, -287, -287, -287, + 223, 1639, 235, 1673, 233, -287, -287, -287, 1396, 9, + 1707, -287, -287, -287, 60, 87, -287, 548, 2270, 1223, + 1223, 1223, 1223, 2270, 2270, 2270, 2270, 2270, 2270, 2270, + 2270, 2270, 2270, 2270, 240, 89, 242, 101, 245, 1741, + 1223, -287, -287, 1370, 1223, 1370, 1223, 1223, -23, 96, + 237, 241, -287, 1775, 1483, 1527, 1571, 1223, -287, 1223, + -287, 1223, -287, 103, 273, 1809, -287, 2270, 243, 1843, + 272, -287, -287, -287, 246, 249, 1223, 250, 1223, 251, + 1223, 113, 123, 125, -287, 1370, 252, 639, 1370, 1223, + -287, -287, 254, -287, 262, -287, 286, -287, -287, -287, + -287, -287, 287, -287, 1877, 279, 280, 281, 1370, 1370, + -287, -287, -287, -287, -287 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 214, 213, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 216, 215, 0, - 0, 0, 1, 4, 5, 6, 183, 0, 10, 11, - 218, 0, 0, 182, 211, 0, 0, 203, 0, 225, - 224, 205, 206, 207, 208, 209, 0, 185, 0, 0, - 0, 0, 0, 213, 217, 221, 223, 0, 93, 94, - 95, 132, 133, 134, 135, 136, 166, 167, 137, 138, - 139, 140, 141, 142, 0, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 0, 153, 154, 155, 156, - 157, 158, 159, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 204, 187, 0, 184, 188, - 165, 160, 0, 0, 220, 222, 194, 195, 163, 164, - 162, 0, 198, 199, 200, 201, 161, 0, 210, 18, + 3, 12, 13, 0, 0, 0, 221, 220, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 223, 222, 0, + 0, 0, 1, 4, 5, 6, 184, 0, 10, 11, + 225, 0, 0, 183, 218, 0, 0, 210, 0, 232, + 231, 212, 213, 214, 215, 216, 0, 186, 0, 0, + 0, 0, 0, 220, 224, 228, 230, 0, 93, 94, + 95, 133, 134, 135, 136, 137, 167, 168, 138, 139, + 140, 141, 142, 143, 0, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 0, 154, 155, 156, 157, + 158, 159, 160, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 186, 211, 188, 0, 185, 189, + 166, 161, 0, 0, 227, 229, 201, 202, 164, 165, + 163, 0, 205, 206, 207, 208, 162, 0, 217, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 168, 169, 0, 185, 0, 17, 0, 19, 181, - 0, 185, 0, 0, 185, 0, 0, 193, 0, 187, - 0, 180, 0, 0, 0, 0, 0, 125, 126, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 127, 128, 129, 130, 131, 0, 192, 212, 191, 0, - 184, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 169, 170, 0, 186, 0, 17, 0, 19, 182, + 0, 186, 0, 0, 186, 0, 0, 200, 0, 188, + 0, 181, 0, 0, 0, 0, 0, 126, 127, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 128, 129, 130, 131, 132, 0, 199, 219, 198, 0, + 185, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 54, 0, 0, 45, 50, 0, 46, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 0, 0, 0, 194, 195, 196, 197, 0, - 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 186, 0, 0, 0, 190, 170, 185, 52, 48, 0, - 0, 72, 0, 73, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 85, 86, 87, 89, 0, 90, 185, - 185, 109, 111, 53, 49, 61, 62, 63, 59, 60, - 0, 0, 0, 0, 110, 112, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 172, 185, - 0, 174, 185, 0, 0, 0, 113, 0, 51, 47, - 67, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 84, 83, 88, 0, 0, 0, 0, 0, - 0, 98, 104, 105, 106, 107, 108, 99, 100, 101, - 103, 102, 0, 0, 0, 0, 0, 0, 185, 171, - 74, 0, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 173, 185, 175, 185, 219, - 0, 75, 0, 77, 96, 0, 0, 0, 82, 91, - 92, 0, 0, 185, 0, 185, 0, 185, 0, 0, - 0, 176, 0, 0, 58, 0, 0, 64, 66, 184, - 69, 184, 71, 184, 177, 178, 179, 76, 78, 0, - 80, 0, 0, 0, 0, 0, 0, 65, 68, 70, - 79, 81 + 54, 0, 0, 0, 45, 50, 0, 46, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 201, 202, 0, 203, + 204, 0, 209, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 187, 0, 0, 0, 197, 171, 186, 52, + 48, 0, 0, 72, 0, 73, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 85, 86, 87, 89, 0, + 90, 186, 186, 0, 0, 193, 203, 204, 209, 110, + 112, 53, 49, 61, 62, 63, 59, 60, 0, 0, + 0, 0, 0, 111, 113, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 173, 186, 0, + 175, 186, 0, 0, 0, 114, 0, 51, 47, 67, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 84, 83, 88, 0, 0, 191, 0, 98, 0, + 0, 0, 0, 99, 105, 106, 107, 108, 109, 100, + 101, 102, 104, 103, 0, 0, 0, 0, 0, 0, + 186, 172, 74, 0, 0, 0, 97, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 186, 174, 186, + 176, 186, 226, 0, 75, 0, 77, 96, 0, 0, + 0, 82, 91, 92, 0, 0, 186, 0, 186, 0, + 186, 0, 0, 0, 177, 0, 0, 58, 0, 0, + 64, 66, 185, 69, 185, 71, 185, 178, 179, 180, + 76, 78, 0, 80, 0, 0, 0, 0, 0, 0, + 65, 68, 70, 79, 81 }; const short parser::yypgoto_[] = { - -287, -287, -287, 271, 297, 298, -287, -287, -287, -177, - 86, -287, -287, -287, -91, -114, -287, -287, -287, -287, + -287, -287, -287, 295, 336, 338, -287, -287, -287, -194, + 122, -287, -287, -287, -93, -87, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - 191, -287, -286, -285, -282, -287, -287, -287, -287, -287, - -287, -33, -6, -66, -59, -287, -287, -147, -41, -287, - 213, 240, -287, 263, 247, -287, -287, -287, 316, 322, - 333, 404, -287, -287, -287, 0, 7, -287, -17, -287, - -287, 105, -287, -287 + 189, -287, -286, -277, -274, -287, -287, -287, -287, -287, + -287, -49, -11, -67, -58, -287, -287, 95, -43, -287, + -287, -287, -16, 197, 324, -287, 302, 355, -287, -287, + -287, 380, 417, 452, 490, -287, -287, -287, 0, 7, + -287, -15, -287, -287, 148, -287, -287 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, - 224, 279, 225, 226, 227, 345, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 106, 405, 252, 253, 254, 58, 59, 60, 61, 62, + 0, 8, 9, 10, 11, 12, 13, 14, 15, 224, + 225, 281, 226, 227, 228, 354, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 106, 418, 253, 254, 255, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 32, 107, 200, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 198, 84, 85, 86, 87, 88, - 89, 90, 91, 92 + 258, 304, 305, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 198, 84, 85, + 86, 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 346, 347, 158, 31, 348, 108, 199, 151, 16, - 19, 20, 21, 6, 262, 152, 196, 265, 116, 6, - 1, 2, 3, 4, 5, 278, 33, 26, 96, 6, - 285, 385, 17, 18, 94, 97, 100, 282, 99, 95, - 290, 22, 98, 101, 30, 117, 30, 283, 109, 56, - 28, 126, 275, 27, 29, 151, 6, 170, 127, 386, - 102, 328, 152, 108, 7, 93, 170, 197, 331, 17, - 53, 128, 379, 170, 153, 35, 36, 170, 38, 17, - 53, 127, 6, 42, 43, 44, 45, 112, -215, 35, - 36, 113, 38, 155, 156, 159, 6, 42, 43, 44, - 45, 388, 339, 389, 161, 113, 170, 7, 170, 35, - 36, 157, 38, 221, 222, 160, 6, 42, 43, 44, - 45, 153, 162, 163, 255, 113, 395, 164, 127, 337, - 397, 170, 17, 53, 165, 170, 114, 115, 346, 347, - 421, 166, 348, 434, 435, 170, 17, 53, 170, 170, - 170, 256, 355, 356, 436, 201, 171, 260, 173, 170, - 175, 154, 263, 197, 127, 266, 17, 53, 276, 255, - 146, 147, 148, 281, 255, 272, 144, 145, 146, 147, - 148, 284, 373, 286, 287, 375, 288, 289, 116, 116, - 294, 293, 255, 151, 299, 291, 256, 300, 295, 298, - 152, 256, 260, 305, 401, 306, 403, 260, 307, 127, - 308, 309, 329, 332, 127, 117, 117, 341, 57, 256, - 335, 260, 260, 343, 115, 260, 352, 353, 127, 127, - 357, 400, 127, 358, 359, 151, 151, 103, 360, 380, - 110, 111, 152, 152, 372, 437, 255, 418, 440, 419, - 374, 420, 376, 378, 116, -202, -202, 382, -202, 153, - 384, 394, -202, 396, 118, 409, 127, 154, 450, 451, - 398, -202, 410, 256, -202, 422, 424, 442, 426, 260, - 23, 117, 427, 151, 428, 430, 127, 260, 350, 432, - 152, 119, 438, 447, 127, 169, 408, 443, 121, 444, - 448, 153, 153, 172, 445, 449, 24, 25, 127, 127, - 439, 304, -202, -202, 120, 131, 132, 292, 0, 0, - 0, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 144, 145, 146, 147, 148, 0, 0, 255, 153, - 255, 261, 0, 0, 264, 0, 127, 267, 0, 268, - 0, 270, 0, 0, 271, 0, 0, 122, 0, 0, - 257, 0, 429, 123, 431, 256, 433, 256, 0, 0, - 0, 260, 0, 260, 124, 0, 407, 0, 127, 255, - 127, 116, 255, 0, 280, 0, 0, 258, 0, 0, - 0, 0, 0, 0, 259, 0, 0, 297, 0, 0, - 0, 0, 255, 255, 0, 257, 256, 0, 117, 256, - 257, 0, 260, 0, 260, 260, 0, 0, 0, 127, - 0, 127, 127, 0, 257, 257, 0, 0, 257, 256, - 256, 0, 258, 0, 0, 260, 260, 258, 0, 259, - 0, 0, 127, 127, 259, 125, 0, 0, 0, 0, - 0, 258, 258, 0, 336, 258, 0, 0, 301, 302, - 0, 0, 259, 122, 0, 342, 0, 344, 0, 123, - 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 124, 0, 257, 0, 0, 0, 0, 0, 0, 0, - 257, 0, 0, 0, 0, 0, 0, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 122, 258, - 0, 0, 0, 122, 123, 377, 259, 258, 0, 123, - 0, 0, 0, 0, 349, 124, 0, 122, 122, 0, - 124, 122, 0, 123, 123, 0, 0, 123, 390, 391, - 392, 393, 0, 0, 124, 124, 0, 0, 124, 0, - 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 402, 0, 404, 406, 0, 0, 0, - 0, 0, 0, -194, -194, 0, -194, 0, 0, 0, - -194, 0, 0, 0, 257, 122, 257, -195, -195, -194, - -195, 123, -194, 122, -195, 0, 125, 0, 0, 123, - 0, 125, 124, -195, 0, 0, -195, 441, 0, 0, - 124, 258, 0, 258, 0, 125, 125, 0, 259, 125, - 259, 0, 0, 0, 0, 257, 0, 257, 257, 0, - -194, -194, 0, 0, -196, -196, 0, -196, 0, 0, - 0, -196, 0, 0, -195, -195, 0, 0, 257, 257, - -196, 0, 258, -196, 258, 258, 0, 0, 0, 259, - 0, 349, 259, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 125, 0, 258, 258, 0, 0, 0, - 0, 125, 259, 259, 0, 0, 0, 122, 0, 122, - 0, -196, -196, 123, 0, 123, -197, -197, 0, -197, - 0, 0, 0, -197, 124, 0, 124, 35, 36, 0, - 38, 0, -197, 0, 6, -197, 0, 0, 0, 0, - 0, 0, 0, 149, 0, 0, 150, 0, 122, 0, - 122, 122, 0, 0, 123, 0, 123, 123, 0, 0, - 0, 0, 0, 0, 0, 124, 0, 124, 124, 0, - 0, 122, 122, -197, -197, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 17, 53, 0, 0, 124, 124, - 202, 0, 0, 0, 0, 125, 0, 125, 203, 0, - 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, + 16, 158, 116, 355, 108, 6, 31, 151, 280, 16, + 19, 20, 356, 287, 96, 357, 152, 1, 2, 3, + 4, 5, 35, 36, 6, 38, 33, 196, 21, 6, + 42, 43, 44, 45, 112, 97, 100, 22, 113, 397, + 117, 94, 98, 101, 26, 30, 95, 284, 109, 28, + 6, 126, 29, 6, 151, 17, 53, 285, 127, 99, + 154, 108, 128, 152, 93, -196, -196, 398, 319, 320, + 27, 321, 322, 102, 153, 7, 292, 156, 197, 17, + 53, 127, 30, 114, 115, 56, -222, 348, 277, 366, + 367, 35, 36, 170, 38, 159, 131, 132, 6, 155, + 17, 53, 17, 18, 7, 160, 337, 149, 256, 340, + 174, 170, 391, 400, 170, 323, 324, 170, 170, -194, + -194, 153, 144, 145, 146, 147, 148, 161, 127, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 401, 162, 408, -195, -195, 170, 257, 170, 17, 53, + 157, 355, 164, 256, 410, 201, 434, 262, 256, 170, + 356, 170, 265, 357, 127, 268, 447, 146, 147, 148, + 163, 170, 116, 116, 116, 274, 448, 256, 449, 35, + 36, 170, 38, 170, 165, 166, 6, 42, 43, 44, + 45, 257, 170, 171, 151, 303, 257, 293, 173, 414, + 175, 416, 262, 152, 154, 197, 278, 262, 283, 127, + 117, 117, 117, 286, 127, 257, 57, 288, 289, 290, + 291, 308, 262, 262, 295, 301, 262, 302, 127, 127, + 127, 296, 256, 127, 297, 103, 17, 53, 110, 111, + 116, 450, 151, 151, 453, 300, 313, 314, 118, 199, + 315, 152, 152, 316, 317, 318, 264, 338, 341, 267, + 344, 153, 350, 352, 463, 464, 115, 384, 127, 361, + 257, 144, 145, 146, 147, 148, 362, 369, 117, 370, + 371, 262, 372, 386, 390, 392, 388, 394, 127, 262, + 359, 151, 407, 169, 409, 396, 127, 411, 435, 422, + 152, 172, 439, 423, 23, 437, 421, 455, 440, 153, + 153, 441, 443, 445, 451, 456, 127, 127, 116, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 457, + 458, 460, 461, 462, 256, 24, 256, 25, 312, 263, + 452, 402, 266, 120, 259, 269, 117, 270, 153, 272, + 294, 0, 273, 0, 0, 127, 0, 308, 0, 0, + 0, 0, 0, 346, 127, 119, 0, 0, 0, 0, + 0, 0, 257, 442, 257, 444, 256, 446, 116, 256, + 0, 0, 282, 262, 0, 262, 364, 365, 420, 259, + 127, 0, 127, 0, 259, 299, 121, 0, 0, 256, + 256, 0, 0, 0, 0, 0, 0, 0, 306, 259, + 259, 0, 0, 259, 257, 0, 117, 257, 0, 0, + 0, 122, 0, 385, 0, 262, 387, 262, 262, 0, + 0, 0, 127, 0, 127, 127, 0, 257, 257, 0, + 0, 0, 0, -201, -201, 0, -201, 0, 262, 262, + -201, 0, 0, 0, 345, 127, 127, 0, 123, -201, + 0, 0, -201, 0, 0, 351, 0, 353, 259, 0, + 360, 260, 0, 0, 0, 413, 259, 0, 0, 0, + 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 431, 124, 432, 0, 433, 368, 0, 0, + -201, -201, 261, 0, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 0, 260, 0, 0, 0, + 0, 260, 389, 0, 0, 0, 0, 122, 0, 0, + 0, 125, 0, 0, 0, 307, 260, 260, 0, 0, + 260, 0, 0, 0, 0, 0, 0, 261, 403, 404, + 405, 406, 261, 0, 306, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 123, 0, 121, 309, 310, 0, + 0, 261, 122, 415, 0, 417, 419, 122, 35, 36, + 259, 38, 259, 0, 0, 6, 42, 43, 44, 45, + 0, 122, 122, 122, 113, 260, 122, 0, 0, 124, + 0, 0, 0, 260, -209, -209, 0, -209, 0, 123, + 0, -209, 0, 0, 123, 0, 154, 0, 454, 0, + -209, 0, 259, -209, 259, 259, 261, 0, 123, 123, + 123, 0, 0, 123, 358, 17, 53, 125, 0, 0, + 0, 0, 0, 0, 124, 259, 259, 0, 0, 124, + 0, 122, 0, 0, 0, 0, 0, 0, 0, 122, + 0, -209, -209, 124, 124, 124, 0, 0, 124, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 220, 113, 125, 0, 125, 125, - 0, 0, 0, 221, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, - 125, 0, 0, 0, 0, 0, 0, 202, 0, 0, - 0, 0, 0, 0, 0, 203, 17, 53, 204, 205, - 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, 0, 0, - 157, 303, 113, 0, 0, 0, 0, 0, 0, 0, - 221, 222, 0, 0, 0, 0, 0, 0, -198, -198, - 0, -198, 0, 0, 0, -198, 0, 0, 0, 0, - 0, 0, 0, 0, -198, 277, 0, -198, 0, 0, - 0, 0, 203, 17, 53, 204, 205, 206, 0, 207, - 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, -198, -198, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 0, 221, 222, 0, - 0, 0, 0, 0, 0, -199, -199, 0, -199, 0, - 0, 0, -199, 0, 0, 0, 0, 0, 0, 0, - 0, -199, 338, 0, -199, 0, 0, 0, 0, 203, - 17, 53, 204, 205, 206, 0, 207, 208, 209, 210, + 45, 307, 125, 0, 0, 221, 0, 125, 123, 0, + 0, 0, 0, 222, 223, 0, 123, -202, -202, 0, + -202, 125, 125, 125, -202, 0, 125, 260, 0, 260, + 0, 0, 121, -202, 0, 0, -202, 0, 0, 0, + 0, 0, 0, 124, 0, 0, 17, 53, 0, -203, + -203, 124, -203, 0, 0, 0, -203, 122, 261, 0, + 261, 0, 0, 0, 0, -203, 0, 0, -203, 260, + 0, 260, 260, 0, -202, -202, 0, 0, 0, -204, + -204, 125, -204, 122, 0, 122, -204, 0, 0, 125, + 0, 0, 260, 260, 123, -204, 0, 0, -204, 0, + 261, 0, 358, 261, 131, 132, -203, -203, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 123, 0, 123, 261, 261, 122, 0, 122, 122, 124, + 144, 145, 146, 147, 148, 0, -204, -204, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34, 122, 122, + 0, 0, 0, 0, 0, 124, 0, 124, 0, 0, + 0, 0, 123, 0, 123, 123, 0, 125, 0, 0, + 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 123, 123, 104, 105, 0, + 0, 48, 0, 125, 0, 125, 0, 124, 0, 124, + 124, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 124, 124, 0, 0, 51, 0, 0, 52, 17, 53, + 30, 54, 55, 56, 0, 125, 0, 125, 125, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 0, 0, 0, 0, 203, 125, 125, + 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 35, 36, + 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, + 0, 0, 157, 220, 221, 0, 0, 0, 0, 0, + 0, 202, 222, 223, 0, 0, 0, 0, 0, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 35, 36, 34, 38, 0, 0, 0, 6, 42, 43, - 44, 45, -199, -199, 157, 0, 113, 0, 0, 0, - 0, 0, 0, 0, 221, 222, 35, 36, 37, 38, - 39, 40, 41, 6, 42, 43, 44, 45, 46, 334, - 0, 0, 104, 105, 130, 0, 48, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 17, 53, 0, - 0, 0, 49, 50, 0, 34, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 51, - 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, - 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, - 45, 46, 0, 0, 0, 47, 0, 0, 0, 48, - 0, 296, 0, -200, -200, 0, -200, 0, 0, 0, - -200, 0, 0, 0, 0, 49, 50, 0, 34, -200, - 0, 0, -200, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, - 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, - 42, 43, 44, 45, 46, 0, 0, 0, 47, 0, - -200, -200, 48, 0, 0, 0, -201, -201, 0, -201, - 0, 0, 0, -201, 0, 0, 0, 0, 49, 50, - 0, 34, -201, 0, 0, -201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 51, 0, 0, 52, 17, - 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, - 40, 41, 6, 42, 43, 44, 45, 46, 0, 0, - 0, 104, 0, -201, -201, 48, 0, 0, 0, 310, - 311, 0, 312, 313, 0, 0, 0, 0, 0, 0, - 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 35, 36, 0, 38, 0, 0, 51, 6, - 0, 52, 17, 53, 30, 54, 55, 56, 149, 0, - 0, 174, 0, 0, 0, 0, 314, 315, 0, 0, + 35, 36, 0, 38, 0, 17, 53, 6, 42, 43, + 44, 45, 0, 0, 157, 311, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 0, 0, 0, 0, + 0, 0, 35, 36, 0, 38, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 279, + 0, 150, 0, 0, 0, 0, 203, 17, 53, 204, + 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 35, 36, 0, + 38, 0, 0, 0, 6, 42, 43, 44, 45, 17, + 53, 157, 0, 221, 0, 0, 0, 0, 0, 0, + 0, 222, 223, 0, 0, 0, 0, 0, 0, -205, + -205, 0, -205, 0, 0, 0, -205, 0, 0, 0, + 0, 0, 0, 0, 0, -205, 347, 0, -205, 0, + 0, 0, 0, 203, 17, 53, 204, 205, 206, 0, + 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 35, 36, 34, 38, 0, 0, + 0, 6, 42, 43, 44, 45, -205, -205, 157, 0, + 221, 0, 0, 0, 0, 0, 0, 0, 222, 223, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 0, 0, 0, 47, 0, 0, 0, + 48, 0, 298, 0, 0, 0, 0, -206, -206, 0, + -206, 17, 53, 0, -206, 0, 49, 50, 0, 34, + 0, 0, 0, -206, 0, 0, -206, 0, 0, 0, + 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, + 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, + 6, 42, 43, 44, 45, 46, 0, 0, 0, 47, + 0, 0, 0, 48, -206, -206, 0, -207, -207, 0, + -207, 0, 0, 0, -207, 0, 0, 0, 0, 49, + 50, 0, 34, -207, 0, 0, -207, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 0, 0, 52, + 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, + 39, 40, 41, 6, 42, 43, 44, 45, 46, 0, + 0, 0, 104, 0, -207, -207, 48, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -208, -208, 0, + -208, 0, 49, 50, -208, 0, 0, 0, 0, 0, + 0, 0, 0, -208, 0, 0, -208, 0, 0, 51, + 0, 0, 52, 17, 53, 30, 54, 55, 56, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, + 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 35, 36, 0, 38, -208, -208, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 35, 36, 0, 38, + 0, 0, 149, 6, 0, 174, 0, 0, 0, 0, + 323, 324, 149, 0, 0, 174, 0, 17, 53, 0, + 0, 0, 0, 0, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 0, 0, 0, 0, 0, + 0, 0, 167, 17, 53, 0, 0, 168, 0, 0, + 0, 0, 130, 17, 53, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 425, 0, 0, 0, + 0, 426, 0, 0, 0, 0, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 0, 0, 0, 0, 0, 0, 0, 203, 17, - 53, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, - 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 221, 222, 35, 36, 0, 38, 0, - 0, 0, 6, 0, 0, 35, 36, 0, 38, 0, - 0, 149, 6, 0, 174, 0, 0, 0, 0, 314, - 315, 149, 0, 0, 174, 0, 17, 53, 0, 0, - 0, 0, 0, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 0, 0, 0, 0, 0, 0, - 0, 167, 17, 53, 0, 0, 168, 0, 0, 0, - 0, 130, 17, 53, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 412, 0, 0, 0, 0, - 413, 0, 0, 0, 0, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 427, 0, 0, 0, 0, 428, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 429, 0, 0, 0, 0, 430, + 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 393, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 395, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 414, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 416, 0, 0, 0, 0, 417, 0, - 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 167, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 399, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 412, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 436, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 438, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 381, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 383, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 387, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 399, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 425, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 459, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 271, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 276, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 336, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 339, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 342, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 343, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 269, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 274, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 327, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 330, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 333, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 273, 0, 130, 0, 0, 131, 132, + 146, 147, 148, 275, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 340, 130, 0, 0, 131, 132, + 145, 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 354, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 363, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, @@ -4209,226 +4291,232 @@ namespace xsk { namespace gsc { namespace h1 { 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, 146, 147, 148, 131, - 132, 0, 0, 135, 136, 137, 138, 139, 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 144, 145, 146, 147, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 147, 148 }; const short parser::yycheck_[] = { - 0, 287, 287, 94, 21, 287, 47, 154, 74, 9, - 3, 4, 52, 47, 161, 74, 47, 164, 51, 47, - 11, 12, 13, 14, 15, 202, 26, 52, 56, 47, - 207, 30, 97, 98, 53, 35, 36, 52, 56, 58, - 93, 0, 35, 36, 99, 51, 99, 62, 48, 102, - 62, 51, 53, 78, 62, 121, 47, 58, 51, 58, - 56, 53, 121, 104, 98, 53, 58, 98, 53, 97, - 98, 98, 53, 58, 74, 40, 41, 58, 43, 97, - 98, 74, 47, 48, 49, 50, 51, 52, 60, 40, - 41, 56, 43, 60, 62, 95, 47, 48, 49, 50, - 51, 53, 279, 53, 52, 56, 58, 98, 58, 40, - 41, 54, 43, 64, 65, 56, 47, 48, 49, 50, - 51, 121, 60, 56, 157, 56, 53, 52, 121, 276, - 53, 58, 97, 98, 60, 58, 101, 102, 424, 424, - 53, 56, 424, 53, 53, 58, 97, 98, 58, 58, - 58, 157, 299, 300, 53, 155, 57, 157, 56, 58, - 60, 52, 162, 98, 157, 165, 97, 98, 52, 202, - 94, 95, 96, 62, 207, 175, 92, 93, 94, 95, - 96, 52, 329, 52, 52, 332, 52, 52, 221, 222, - 62, 61, 225, 259, 52, 212, 202, 52, 62, 62, - 259, 207, 202, 62, 381, 62, 383, 207, 62, 202, - 62, 62, 52, 52, 207, 221, 222, 53, 27, 225, - 57, 221, 222, 27, 102, 225, 61, 61, 221, 222, - 52, 378, 225, 52, 52, 301, 302, 46, 52, 62, - 49, 50, 301, 302, 57, 422, 279, 394, 425, 396, - 57, 398, 57, 52, 287, 40, 41, 52, 43, 259, - 62, 52, 47, 52, 51, 62, 259, 52, 445, 446, - 52, 56, 62, 279, 59, 25, 62, 53, 30, 279, - 9, 287, 62, 349, 62, 62, 279, 287, 288, 62, - 349, 51, 62, 62, 287, 104, 387, 53, 51, 53, - 62, 301, 302, 112, 53, 62, 9, 9, 301, 302, - 424, 225, 97, 98, 51, 66, 67, 212, -1, -1, - -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 92, 93, 94, 95, 96, -1, -1, 381, 349, - 383, 160, -1, -1, 163, -1, 349, 166, -1, 168, - -1, 170, -1, -1, 173, -1, -1, 51, -1, -1, - 157, -1, 413, 51, 415, 381, 417, 383, -1, -1, - -1, 381, -1, 383, 51, -1, 386, -1, 381, 422, - 383, 424, 425, -1, 203, -1, -1, 157, -1, -1, - -1, -1, -1, -1, 157, -1, -1, 216, -1, -1, - -1, -1, 445, 446, -1, 202, 422, -1, 424, 425, - 207, -1, 422, -1, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, 221, 222, -1, -1, 225, 445, - 446, -1, 202, -1, -1, 445, 446, 207, -1, 202, - -1, -1, 445, 446, 207, 51, -1, -1, -1, -1, - -1, 221, 222, -1, 273, 225, -1, -1, 221, 222, - -1, -1, 225, 157, -1, 284, -1, 286, -1, 157, - 289, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 157, -1, 279, -1, -1, -1, -1, -1, -1, -1, - 287, -1, -1, -1, -1, -1, -1, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 202, 279, - -1, -1, -1, 207, 202, 334, 279, 287, -1, 207, - -1, -1, -1, -1, 287, 202, -1, 221, 222, -1, - 207, 225, -1, 221, 222, -1, -1, 225, 357, 358, - 359, 360, -1, -1, 221, 222, -1, -1, 225, -1, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 382, -1, 384, 385, -1, -1, -1, - -1, -1, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, 381, 279, 383, 40, 41, 56, - 43, 279, 59, 287, 47, -1, 202, -1, -1, 287, - -1, 207, 279, 56, -1, -1, 59, 426, -1, -1, - 287, 381, -1, 383, -1, 221, 222, -1, 381, 225, - 383, -1, -1, -1, -1, 422, -1, 424, 425, -1, - 97, 98, -1, -1, 40, 41, -1, 43, -1, -1, - -1, 47, -1, -1, 97, 98, -1, -1, 445, 446, - 56, -1, 422, 59, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 279, -1, 445, 446, -1, -1, -1, - -1, 287, 445, 446, -1, -1, -1, 381, -1, 383, - -1, 97, 98, 381, -1, 383, 40, 41, -1, 43, - -1, -1, -1, 47, 381, -1, 383, 40, 41, -1, - 43, -1, 56, -1, 47, 59, -1, -1, -1, -1, - -1, -1, -1, 56, -1, -1, 59, -1, 422, -1, - 424, 425, -1, -1, 422, -1, 424, 425, -1, -1, - -1, -1, -1, -1, -1, 422, -1, 424, 425, -1, - -1, 445, 446, 97, 98, -1, -1, 445, 446, -1, - -1, -1, -1, -1, 97, 98, -1, -1, 445, 446, - 11, -1, -1, -1, -1, 381, -1, 383, 19, -1, - -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 94, 51, 289, 47, 47, 21, 74, 202, 9, + 3, 4, 289, 207, 56, 289, 74, 11, 12, 13, + 14, 15, 40, 41, 47, 43, 26, 47, 52, 47, + 48, 49, 50, 51, 52, 35, 36, 0, 56, 30, + 51, 53, 35, 36, 52, 99, 58, 52, 48, 62, + 47, 51, 62, 47, 121, 97, 98, 62, 51, 56, + 52, 104, 98, 121, 53, 57, 58, 58, 17, 18, + 78, 20, 21, 56, 74, 98, 93, 62, 98, 97, + 98, 74, 99, 101, 102, 102, 60, 281, 53, 57, + 58, 40, 41, 58, 43, 95, 66, 67, 47, 60, + 97, 98, 97, 98, 98, 56, 53, 56, 157, 53, + 59, 58, 53, 53, 58, 64, 65, 58, 58, 57, + 58, 121, 92, 93, 94, 95, 96, 52, 121, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 53, 60, 53, 57, 58, 58, 157, 58, 97, 98, + 54, 437, 52, 202, 53, 155, 53, 157, 207, 58, + 437, 58, 162, 437, 157, 165, 53, 94, 95, 96, + 56, 58, 221, 222, 223, 175, 53, 226, 53, 40, + 41, 58, 43, 58, 60, 56, 47, 48, 49, 50, + 51, 202, 58, 57, 261, 56, 207, 212, 56, 393, + 60, 395, 202, 261, 52, 98, 52, 207, 62, 202, + 221, 222, 223, 52, 207, 226, 27, 52, 52, 52, + 52, 221, 222, 223, 61, 52, 226, 52, 221, 222, + 223, 62, 281, 226, 62, 46, 97, 98, 49, 50, + 289, 435, 309, 310, 438, 62, 62, 62, 51, 154, + 62, 309, 310, 62, 62, 78, 161, 52, 52, 164, + 57, 261, 53, 27, 458, 459, 102, 57, 261, 61, + 281, 92, 93, 94, 95, 96, 61, 52, 289, 52, + 52, 281, 52, 57, 52, 62, 57, 52, 281, 289, + 290, 358, 52, 104, 52, 62, 289, 52, 25, 62, + 358, 112, 30, 62, 9, 62, 399, 53, 62, 309, + 310, 62, 62, 62, 62, 53, 309, 310, 367, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 53, + 53, 62, 62, 62, 393, 9, 395, 9, 226, 160, + 437, 367, 163, 51, 157, 166, 367, 168, 358, 170, + 212, -1, 173, -1, -1, 358, -1, 367, -1, -1, + -1, -1, -1, 278, 367, 51, -1, -1, -1, -1, + -1, -1, 393, 426, 395, 428, 435, 430, 437, 438, + -1, -1, 203, 393, -1, 395, 301, 302, 398, 202, + 393, -1, 395, -1, 207, 216, 51, -1, -1, 458, + 459, -1, -1, -1, -1, -1, -1, -1, 221, 222, + 223, -1, -1, 226, 435, -1, 437, 438, -1, -1, + -1, 51, -1, 338, -1, 435, 341, 437, 438, -1, + -1, -1, 435, -1, 437, 438, -1, 458, 459, -1, + -1, -1, -1, 40, 41, -1, 43, -1, 458, 459, + 47, -1, -1, -1, 275, 458, 459, -1, 51, 56, + -1, -1, 59, -1, -1, 286, -1, 288, 281, -1, + 291, 157, -1, -1, -1, 390, 289, -1, -1, -1, + -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 407, 51, 409, -1, 411, 318, -1, -1, + 97, 98, 157, -1, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, -1, 202, -1, -1, -1, + -1, 207, 343, -1, -1, -1, -1, 157, -1, -1, + -1, 51, -1, -1, -1, 221, 222, 223, -1, -1, + 226, -1, -1, -1, -1, -1, -1, 202, 369, 370, + 371, 372, 207, -1, 367, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 157, -1, 221, 222, 223, -1, + -1, 226, 202, 394, -1, 396, 397, 207, 40, 41, + 393, 43, 395, -1, -1, 47, 48, 49, 50, 51, + -1, 221, 222, 223, 56, 281, 226, -1, -1, 157, + -1, -1, -1, 289, 40, 41, -1, 43, -1, 202, + -1, 47, -1, -1, 207, -1, 52, -1, 439, -1, + 56, -1, 435, 59, 437, 438, 281, -1, 221, 222, + 223, -1, -1, 226, 289, 97, 98, 157, -1, -1, + -1, -1, -1, -1, 202, 458, 459, -1, -1, 207, + -1, 281, -1, -1, -1, -1, -1, -1, -1, 289, + -1, 97, 98, 221, 222, 223, -1, -1, 226, 40, 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, 55, 56, 422, -1, 424, 425, - -1, -1, -1, 64, 65, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 445, - 446, -1, -1, -1, -1, -1, -1, 11, -1, -1, - -1, -1, -1, -1, -1, 19, 97, 98, 22, 23, - 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, - -1, -1, -1, 47, 48, 49, 50, 51, -1, -1, - 54, 55, 56, -1, -1, -1, -1, -1, -1, -1, - 64, 65, -1, -1, -1, -1, -1, -1, 40, 41, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, - -1, -1, -1, -1, 56, 12, -1, 59, -1, -1, - -1, -1, 19, 97, 98, 22, 23, 24, -1, 26, - 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, 97, 98, 54, -1, 56, - -1, -1, -1, -1, -1, -1, -1, 64, 65, -1, - -1, -1, -1, -1, -1, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - -1, 56, 12, -1, 59, -1, -1, -1, -1, 19, - 97, 98, 22, 23, 24, -1, 26, 27, 28, 29, + 51, 367, 202, -1, -1, 56, -1, 207, 281, -1, + -1, -1, -1, 64, 65, -1, 289, 40, 41, -1, + 43, 221, 222, 223, 47, -1, 226, 393, -1, 395, + -1, -1, 367, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 281, -1, -1, 97, 98, -1, 40, + 41, 289, 43, -1, -1, -1, 47, 367, 393, -1, + 395, -1, -1, -1, -1, 56, -1, -1, 59, 435, + -1, 437, 438, -1, 97, 98, -1, -1, -1, 40, + 41, 281, 43, 393, -1, 395, 47, -1, -1, 289, + -1, -1, 458, 459, 367, 56, -1, -1, 59, -1, + 435, -1, 437, 438, 66, 67, 97, 98, 70, 71, + 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, + 393, -1, 395, 458, 459, 435, -1, 437, 438, 367, + 92, 93, 94, 95, 96, -1, 97, 98, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, 458, 459, + -1, -1, -1, -1, -1, 393, -1, 395, -1, -1, + -1, -1, 435, -1, 437, 438, -1, 367, -1, -1, + -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, -1, 458, 459, 56, 57, -1, + -1, 60, -1, 393, -1, 395, -1, 435, -1, 437, + 438, -1, -1, -1, -1, -1, -1, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 458, 459, -1, -1, 93, -1, -1, 96, 97, 98, + 99, 100, 101, 102, -1, 435, -1, 437, 438, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, + -1, -1, -1, -1, -1, -1, -1, 19, 458, 459, + 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, + -1, -1, 54, 55, 56, -1, -1, -1, -1, -1, + -1, 11, 64, 65, -1, -1, -1, -1, -1, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 16, 43, -1, -1, -1, 47, 48, 49, - 50, 51, 97, 98, 54, -1, 56, -1, -1, -1, - -1, -1, -1, -1, 64, 65, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 58, - -1, -1, 56, 57, 63, -1, 60, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 97, 98, -1, - -1, -1, 76, 77, -1, 16, -1, -1, -1, -1, - 89, 90, 91, 92, 93, 94, 95, 96, -1, 93, - -1, -1, 96, 97, 98, 99, 100, 101, 102, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, -1, -1, -1, 56, -1, -1, -1, 60, - -1, 62, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, 76, 77, -1, 16, 56, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, 96, 97, 98, 99, 100, - 101, 102, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, -1, -1, -1, 56, -1, - 97, 98, 60, -1, -1, -1, 40, 41, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, 76, 77, - -1, 16, 56, -1, -1, 59, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, 96, 97, - 98, 99, 100, 101, 102, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, - -1, 56, -1, 97, 98, 60, -1, -1, -1, 17, - 18, -1, 20, 21, -1, -1, -1, -1, -1, -1, - -1, 76, 77, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 40, 41, -1, 43, -1, -1, 93, 47, - -1, 96, 97, 98, 99, 100, 101, 102, 56, -1, - -1, 59, -1, -1, -1, -1, 64, 65, -1, -1, + 40, 41, -1, 43, -1, 97, 98, 47, 48, 49, + 50, 51, -1, -1, 54, 55, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, -1, -1, -1, -1, + -1, -1, 40, 41, -1, 43, -1, -1, -1, 47, + -1, -1, -1, -1, -1, -1, -1, -1, 56, 12, + -1, 59, -1, -1, -1, -1, 19, 97, 98, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, -1, -1, 47, 48, 49, 50, 51, 97, + 98, 54, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 64, 65, -1, -1, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, -1, -1, 56, 12, -1, 59, -1, + -1, -1, -1, 19, 97, 98, 22, 23, 24, -1, + 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 16, 43, -1, -1, + -1, 47, 48, 49, 50, 51, 97, 98, 54, -1, + 56, -1, -1, -1, -1, -1, -1, -1, 64, 65, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, 40, 41, -1, + 43, 97, 98, -1, 47, -1, 76, 77, -1, 16, + -1, -1, -1, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 93, -1, -1, 96, 97, 98, 99, + 100, 101, 102, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, -1, -1, -1, 56, + -1, -1, -1, 60, 97, 98, -1, 40, 41, -1, + 43, -1, -1, -1, 47, -1, -1, -1, -1, 76, + 77, -1, 16, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, + 97, 98, 99, 100, 101, 102, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + -1, -1, 56, -1, 97, 98, 60, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, -1, 76, 77, 47, -1, -1, -1, -1, -1, + -1, -1, -1, 56, -1, -1, 59, -1, -1, 93, + -1, -1, 96, 97, 98, 99, 100, 101, 102, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, + -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, -1, 43, 97, 98, -1, 47, 48, 49, + 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, 40, 41, -1, 43, + -1, -1, -1, 47, -1, -1, 40, 41, -1, 43, + -1, -1, 56, 47, -1, 59, -1, -1, -1, -1, + 64, 65, 56, -1, -1, 59, -1, 97, 98, -1, + -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, + -1, -1, 53, 97, 98, -1, -1, 58, -1, -1, + -1, -1, 63, 97, 98, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 53, -1, -1, -1, + -1, 58, -1, -1, -1, -1, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, -1, -1, -1, -1, 19, 97, - 98, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, - -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, 40, 41, -1, 43, -1, - -1, 56, 47, -1, 59, -1, -1, -1, -1, 64, - 65, 56, -1, -1, 59, -1, 97, 98, -1, -1, - -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, -1, -1, -1, -1, -1, -1, - -1, 53, 97, 98, -1, -1, 58, -1, -1, -1, - -1, 63, 97, 98, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 53, -1, -1, -1, -1, - 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 53, -1, -1, -1, -1, 58, + -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 53, -1, -1, -1, -1, 58, -1, - -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 53, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, @@ -4456,9 +4544,8 @@ namespace xsk { namespace gsc { namespace h1 { -1, -1, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, -1, -1, -1, 90, -1, 92, 93, 94, 95, 96, 66, - 67, -1, -1, 70, 71, 72, 73, 74, 75, 66, 67, -1, -1, -1, -1, 72, 73, 74, 75, -1, - -1, -1, -1, -1, -1, 92, 93, 94, 95, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, 95, 96 }; @@ -4466,51 +4553,52 @@ namespace xsk { namespace gsc { namespace h1 { parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 47, 98, 114, 115, - 116, 117, 118, 119, 120, 121, 188, 97, 98, 189, - 189, 52, 0, 116, 117, 118, 52, 78, 62, 62, - 99, 191, 169, 188, 16, 40, 41, 42, 43, 44, + 116, 117, 118, 119, 120, 121, 191, 97, 98, 192, + 192, 52, 0, 116, 117, 118, 52, 78, 62, 62, + 99, 194, 169, 191, 16, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, 93, 96, 98, 100, 101, 102, 153, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 53, 53, 58, 56, 188, 189, 56, - 188, 189, 56, 153, 56, 57, 153, 170, 171, 188, - 153, 153, 52, 56, 101, 102, 164, 165, 173, 174, - 176, 177, 181, 182, 183, 184, 188, 189, 98, 62, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 53, 53, 58, 56, 191, 192, 56, + 191, 192, 56, 153, 56, 57, 153, 170, 171, 191, + 153, 153, 52, 56, 101, 102, 164, 165, 176, 177, + 179, 180, 184, 185, 186, 187, 191, 192, 98, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, 93, 94, 95, 96, 56, - 59, 166, 167, 188, 52, 60, 62, 54, 127, 188, + 59, 166, 167, 191, 52, 60, 62, 54, 127, 191, 56, 52, 60, 56, 52, 60, 56, 53, 58, 153, 58, 57, 153, 56, 59, 60, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 47, 98, 187, 170, - 171, 188, 11, 19, 22, 23, 24, 26, 27, 28, + 153, 153, 153, 153, 153, 153, 47, 98, 190, 170, + 171, 191, 11, 19, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 55, 64, 65, 122, 123, 125, 126, 127, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 155, 156, 157, 164, 165, 173, 174, 177, - 188, 153, 170, 188, 153, 170, 188, 153, 153, 57, - 153, 153, 188, 61, 57, 53, 52, 12, 122, 124, - 153, 62, 52, 62, 52, 122, 52, 52, 52, 52, - 93, 191, 194, 61, 62, 62, 62, 153, 62, 52, - 52, 177, 177, 55, 123, 62, 62, 62, 62, 62, - 17, 18, 20, 21, 64, 65, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 57, 53, 52, - 57, 53, 52, 57, 58, 57, 153, 170, 12, 122, - 62, 53, 153, 27, 153, 128, 155, 156, 157, 177, - 188, 153, 61, 61, 62, 170, 170, 52, 52, 52, - 52, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 57, 170, 57, 170, 57, 153, 52, 53, - 62, 53, 52, 53, 62, 30, 58, 53, 53, 53, - 153, 153, 153, 153, 52, 53, 52, 53, 52, 53, - 170, 122, 153, 122, 153, 154, 153, 188, 127, 62, - 62, 53, 53, 58, 53, 58, 53, 58, 170, 170, - 170, 53, 25, 53, 62, 53, 30, 62, 62, 171, - 62, 171, 62, 171, 53, 53, 53, 122, 62, 128, - 122, 153, 53, 53, 53, 53, 53, 62, 62, 62, - 122, 122 + 55, 56, 64, 65, 122, 123, 125, 126, 127, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 155, 156, 157, 164, 165, 173, 176, + 177, 180, 191, 153, 170, 191, 153, 170, 191, 153, + 153, 57, 153, 153, 191, 61, 57, 53, 52, 12, + 122, 124, 153, 62, 52, 62, 52, 122, 52, 52, + 52, 52, 93, 194, 197, 61, 62, 62, 62, 153, + 62, 52, 52, 56, 174, 175, 176, 177, 191, 180, + 180, 55, 123, 62, 62, 62, 62, 62, 78, 17, + 18, 20, 21, 64, 65, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 57, 53, 52, 57, + 53, 52, 57, 58, 57, 153, 170, 12, 122, 62, + 53, 153, 27, 153, 128, 155, 156, 157, 180, 191, + 153, 61, 61, 62, 170, 170, 57, 58, 153, 52, + 52, 52, 52, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 57, 170, 57, 170, 57, 153, + 52, 53, 62, 53, 52, 53, 62, 30, 58, 53, + 53, 53, 175, 153, 153, 153, 153, 52, 53, 52, + 53, 52, 53, 170, 122, 153, 122, 153, 154, 153, + 191, 127, 62, 62, 53, 53, 58, 53, 58, 53, + 58, 170, 170, 170, 53, 25, 53, 62, 53, 30, + 62, 62, 171, 62, 171, 62, 171, 53, 53, 53, + 122, 62, 128, 122, 153, 53, 53, 53, 53, 53, + 62, 62, 62, 122, 122 }; const unsigned char @@ -4526,19 +4614,20 @@ namespace xsk { namespace gsc { namespace h1 { 135, 135, 136, 137, 137, 138, 139, 140, 141, 142, 143, 143, 144, 145, 145, 146, 147, 148, 149, 149, 150, 151, 152, 153, 153, 153, 154, 154, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, - 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 156, 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, + 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 161, 162, 162, 162, 162, 163, 164, 164, 165, 165, - 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, - 168, 169, 169, 169, 170, 170, 171, 171, 172, 172, - 173, 174, 175, 176, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 188, 189, 189, 190, 191, 192, - 193, 193, 194, 194, 195, 196 + 160, 161, 162, 162, 162, 162, 163, 164, 164, 165, + 165, 166, 166, 166, 166, 166, 166, 167, 167, 167, + 167, 168, 169, 169, 169, 170, 170, 171, 171, 172, + 172, 173, 174, 174, 175, 175, 175, 176, 177, 178, + 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 191, 192, 192, 193, 194, 195, 196, 196, 197, + 197, 198, 199 }; const signed char @@ -4554,19 +4643,20 @@ namespace xsk { namespace gsc { namespace h1 { 8, 6, 2, 2, 4, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, - 4, 6, 5, 7, 5, 7, 8, 9, 9, 9, - 3, 3, 1, 0, 1, 0, 3, 1, 2, 3, - 4, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 7, - 2, 1, 2, 1, 1, 1 + 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, + 2, 4, 6, 5, 7, 5, 7, 8, 9, 9, + 9, 3, 3, 1, 0, 1, 0, 3, 1, 2, + 3, 3, 3, 1, 1, 1, 1, 4, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, + 1, 1, 1 }; @@ -4576,29 +4666,30 @@ namespace xsk { namespace gsc { namespace h1 { const short parser::yyrline_[] = { - 0, 260, 260, 261, 265, 267, 269, 271, 273, 275, - 280, 284, 289, 290, 291, 292, 293, 297, 302, 307, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 340, 341, 345, 347, 352, - 354, 359, 360, 364, 365, 369, 371, 373, 376, 380, - 382, 387, 389, 391, 396, 401, 403, 408, 413, 415, - 420, 422, 427, 432, 434, 439, 444, 449, 454, 459, - 464, 466, 471, 476, 478, 483, 488, 493, 498, 500, - 505, 510, 515, 520, 521, 522, 526, 527, 531, 533, - 535, 537, 539, 541, 543, 545, 547, 549, 551, 556, - 558, 563, 565, 570, 575, 577, 579, 581, 583, 585, - 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, - 607, 609, 614, 615, 616, 617, 618, 619, 620, 621, - 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, - 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, - 645, 650, 652, 654, 656, 661, 666, 667, 670, 671, - 675, 677, 679, 681, 683, 685, 690, 692, 694, 696, - 701, 706, 708, 711, 715, 718, 722, 724, 729, 731, - 736, 741, 746, 751, 756, 757, 758, 759, 760, 761, - 762, 763, 764, 768, 773, 778, 783, 788, 793, 798, - 803, 808, 813, 818, 820, 825, 827, 832, 837, 842, - 847, 849, 854, 856, 861, 866 + 0, 263, 263, 264, 268, 270, 272, 274, 276, 278, + 283, 287, 292, 293, 294, 295, 296, 300, 305, 310, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 343, 344, 348, 350, 355, + 357, 362, 363, 367, 368, 372, 374, 376, 379, 383, + 385, 390, 392, 394, 399, 404, 406, 411, 416, 418, + 423, 425, 430, 435, 437, 442, 447, 452, 457, 462, + 467, 469, 474, 479, 481, 486, 491, 496, 501, 503, + 508, 513, 518, 523, 524, 525, 529, 530, 534, 536, + 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, + 561, 563, 568, 570, 575, 580, 582, 584, 586, 588, + 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, + 610, 612, 614, 619, 620, 621, 622, 623, 624, 625, + 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, + 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, + 646, 650, 655, 657, 659, 661, 666, 671, 672, 675, + 676, 680, 682, 684, 686, 688, 690, 695, 697, 699, + 701, 706, 711, 713, 716, 720, 723, 727, 729, 734, + 736, 741, 746, 748, 753, 754, 755, 759, 764, 769, + 774, 779, 780, 781, 782, 783, 784, 785, 786, 787, + 791, 796, 801, 806, 811, 816, 821, 826, 831, 836, + 841, 843, 848, 850, 855, 860, 865, 870, 872, 877, + 879, 884, 889 }; void @@ -4631,9 +4722,9 @@ namespace xsk { namespace gsc { namespace h1 { #line 13 "parser.ypp" } } } // xsk::gsc::h1 -#line 4635 "parser.cpp" +#line 4726 "parser.cpp" -#line 870 "parser.ypp" +#line 893 "parser.ypp" void xsk::gsc::h1::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/h1/xsk/parser.hpp b/src/h1/xsk/parser.hpp index becf0186..da713a56 100644 --- a/src/h1/xsk/parser.hpp +++ b/src/h1/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace h1 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,104 +540,107 @@ namespace xsk { namespace gsc { namespace h1 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe - char dummy63[sizeof (ast::stmt_waitframe::ptr)]; + char dummy64[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill - char dummy64[sizeof (ast::stmt_waittill::ptr)]; + char dummy65[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy66[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy67[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy67[sizeof (ast::stmt_while::ptr)]; + char dummy68[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -643,7 +648,7 @@ namespace xsk { namespace gsc { namespace h1 { // "localized string" // "float" // "integer" - char dummy68[sizeof (std::string)]; + char dummy69[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -997,30 +1002,33 @@ namespace xsk { namespace gsc { namespace h1 { S_expr_arguments = 170, // expr_arguments S_expr_arguments_no_empty = 171, // expr_arguments_no_empty S_expr_reference = 172, // expr_reference - S_expr_array = 173, // expr_array - S_expr_field = 174, // expr_field - S_expr_size = 175, // expr_size - S_expr_paren = 176, // expr_paren - S_expr_object = 177, // expr_object - S_expr_thisthread = 178, // expr_thisthread - S_expr_empty_array = 179, // expr_empty_array - S_expr_undefined = 180, // expr_undefined - S_expr_game = 181, // expr_game - S_expr_self = 182, // expr_self - S_expr_anim = 183, // expr_anim - S_expr_level = 184, // expr_level - S_expr_animation = 185, // expr_animation - S_expr_animtree = 186, // expr_animtree - S_expr_identifier_nosize = 187, // expr_identifier_nosize - S_expr_identifier = 188, // expr_identifier - S_expr_path = 189, // expr_path - S_expr_istring = 190, // expr_istring - S_expr_string = 191, // expr_string - S_expr_vector = 192, // expr_vector - S_expr_float = 193, // expr_float - S_expr_integer = 194, // expr_integer - S_expr_false = 195, // expr_false - S_expr_true = 196 // expr_true + S_expr_tuple = 173, // expr_tuple + S_expr_tuple_arguments = 174, // expr_tuple_arguments + S_expr_tuple_types = 175, // expr_tuple_types + S_expr_array = 176, // expr_array + S_expr_field = 177, // expr_field + S_expr_size = 178, // expr_size + S_expr_paren = 179, // expr_paren + S_expr_object = 180, // expr_object + S_expr_thisthread = 181, // expr_thisthread + S_expr_empty_array = 182, // expr_empty_array + S_expr_undefined = 183, // expr_undefined + S_expr_game = 184, // expr_game + S_expr_self = 185, // expr_self + S_expr_anim = 186, // expr_anim + S_expr_level = 187, // expr_level + S_expr_animation = 188, // expr_animation + S_expr_animtree = 189, // expr_animtree + S_expr_identifier_nosize = 190, // expr_identifier_nosize + S_expr_identifier = 191, // expr_identifier + S_expr_path = 192, // expr_path + S_expr_istring = 193, // expr_istring + S_expr_string = 194, // expr_string + S_expr_vector = 195, // expr_vector + S_expr_float = 196, // expr_float + S_expr_integer = 197, // expr_integer + S_expr_false = 198, // expr_false + S_expr_true = 199 // expr_true }; }; @@ -1086,6 +1094,8 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1208,6 +1218,10 @@ namespace xsk { namespace gsc { namespace h1 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1861,6 +1875,20 @@ namespace xsk { namespace gsc { namespace h1 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2376,6 +2404,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2498,6 +2528,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4839,8 +4873,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2419, ///< Last index in yytable_. - yynnts_ = 84, ///< Number of nonterminal symbols. + yylast_ = 2479, ///< Last index in yytable_. + yynnts_ = 87, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4896,6 +4930,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -5018,6 +5054,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5218,6 +5258,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5340,6 +5382,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5547,7 +5593,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::h1 -#line 5551 "parser.hpp" +#line 5597 "parser.hpp" diff --git a/src/h1/xsk/resolver.cpp b/src/h1/xsk/resolver.cpp index 6236ac4d..1aa43262 100644 --- a/src/h1/xsk/resolver.cpp +++ b/src/h1/xsk/resolver.cpp @@ -45,7 +45,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -57,7 +57,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -74,7 +74,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -103,7 +103,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string @@ -3516,8 +3516,8 @@ const std::array, 804> token_list { 0xA795, "maps/mp/gametypes/_gamescores" }, { 0xA796, "maps/mp/gametypes/_globalentities" }, { 0xA797, "maps/mp/gametypes/_globallogic" }, - { 0xA798, "maps/mp/gametypes/_hardpoints" }, - { 0xA799, "maps/mp/gametypes/_healthoverlay" }, + { 0xA798, "maps/mp/gametypes/_hardpoints" }, + { 0xA799, "maps/mp/gametypes/_healthoverlay" }, { 0xA79A, "maps/mp/gametypes/_high_jump_mp" }, { 0xA79B, "maps/mp/gametypes/_horde_armory" }, { 0xA79C, "maps/mp/gametypes/_horde_crates" }, diff --git a/src/h2/xsk/assembler.cpp b/src/h2/xsk/assembler.cpp index 66cae141..2f23528e 100644 --- a/src/h2/xsk/assembler.cpp +++ b/src/h2/xsk/assembler.cpp @@ -385,7 +385,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -492,6 +492,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -555,7 +559,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -568,7 +572,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::h2 diff --git a/src/h2/xsk/compiler.cpp b/src/h2/xsk/compiler.cpp index 00ef6722..84222c4f 100644 --- a/src/h2/xsk/compiler.cpp +++ b/src/h2/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -395,7 +400,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1038,11 +1043,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1548,7 +1560,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1593,6 +1605,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1632,7 +1667,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1718,7 +1753,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2247,7 +2282,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2314,11 +2349,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2341,11 +2376,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2373,7 +2408,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2382,7 +2417,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get()} ); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2390,8 +2425,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2423,13 +2458,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2589,23 +2624,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2632,7 +2684,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2646,7 +2698,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2659,7 +2710,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2837,8 +2888,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2853,7 +2903,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2886,7 +2936,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/h2/xsk/compiler.hpp b/src/h2/xsk/compiler.hpp index e5f986dd..2c1b4441 100644 --- a/src/h2/xsk/compiler.hpp +++ b/src/h2/xsk/compiler.hpp @@ -96,6 +96,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -137,10 +138,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/h2/xsk/decompiler.cpp b/src/h2/xsk/decompiler.cpp index 8466756f..17ca2ccd 100644 --- a/src/h2/xsk/decompiler.cpp +++ b/src/h2/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,45 +1228,45 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waitFrame: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1278,69 +1275,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1349,98 +1345,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1448,256 +1446,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1717,7 +1702,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1744,7 +1729,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1771,7 +1756,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1779,9 +1763,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1792,60 +1777,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1975,7 +1938,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2009,7 +1972,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2026,7 +1989,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2155,7 +2118,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2215,7 +2178,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2247,7 +2210,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2378,17 +2341,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2421,7 +2384,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2432,17 +2395,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2486,7 +2449,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2638,7 +2601,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2742,8 +2705,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2987,7 +2950,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3016,7 +2979,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3056,7 +3019,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3178,9 +3141,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3429,11 +3389,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3451,7 +3406,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3469,7 +3424,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/h2/xsk/decompiler.hpp b/src/h2/xsk/decompiler.hpp index 61fb3ee6..b522f609 100644 --- a/src/h2/xsk/decompiler.hpp +++ b/src/h2/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/h2/xsk/disassembler.cpp b/src/h2/xsk/disassembler.cpp index 61c24515..9de4f6d0 100644 --- a/src/h2/xsk/disassembler.cpp +++ b/src/h2/xsk/disassembler.cpp @@ -300,7 +300,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -494,7 +494,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -517,7 +517,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/h2/xsk/h2.cpp b/src/h2/xsk/h2.cpp index 8aa94120..2f53f025 100644 --- a/src/h2/xsk/h2.cpp +++ b/src/h2/xsk/h2.cpp @@ -175,7 +175,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/h2/xsk/lexer.cpp b/src/h2/xsk/lexer.cpp index bfbeb81c..e88bd95f 100644 --- a/src/h2/xsk/lexer.cpp +++ b/src/h2/xsk/lexer.cpp @@ -683,7 +683,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -717,7 +717,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -751,7 +751,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/h2/xsk/parser.cpp b/src/h2/xsk/parser.cpp index 202894b6..71ba6e20 100644 --- a/src/h2/xsk/parser.cpp +++ b/src/h2/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace h2 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -550,6 +556,8 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -672,6 +680,10 @@ namespace xsk { namespace gsc { namespace h2 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -856,6 +868,8 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -978,6 +992,10 @@ namespace xsk { namespace gsc { namespace h2 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1161,6 +1179,8 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1283,6 +1303,10 @@ namespace xsk { namespace gsc { namespace h2 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1721,6 +1745,8 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1843,6 +1869,10 @@ namespace xsk { namespace gsc { namespace h2 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -2004,1351 +2034,1393 @@ namespace xsk { namespace gsc { namespace h2 { switch (yyn) { case 2: // root: program -#line 260 "parser.ypp" +#line 263 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2010 "parser.cpp" - break; - - case 3: // root: %empty -#line 261 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 2016 "parser.cpp" - break; - - case 4: // program: program inline -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2022 "parser.cpp" - break; - - case 5: // program: program include -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2028 "parser.cpp" - break; - - case 6: // program: program declaration -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2034 "parser.cpp" - break; - - case 7: // program: inline -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2040 "parser.cpp" break; - case 8: // program: include -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 264 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2046 "parser.cpp" break; - case 9: // program: declaration -#line 276 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2052 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 280 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2058 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 285 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2064 "parser.cpp" break; - case 12: // declaration: "/#" -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2070 "parser.cpp" break; - case 13: // declaration: "#/" -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2076 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 279 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2082 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 292 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 283 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2088 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 293 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 288 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2094 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 298 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2100 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 303 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2106 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 308 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2112 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 295 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2118 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 296 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2124 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 301 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2130 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 306 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2136 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 311 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2142 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2148 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2154 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2160 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2166 "parser.cpp" break; - case 29: // stmt: stmt_waitframe -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } + case 24: // stmt: stmt_notify +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2172 "parser.cpp" break; - case 30: // stmt: stmt_if -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 25: // stmt: stmt_wait +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2178 "parser.cpp" break; - case 31: // stmt: stmt_ifelse -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2184 "parser.cpp" break; - case 32: // stmt: stmt_while -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2190 "parser.cpp" break; - case 33: // stmt: stmt_dowhile -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2196 "parser.cpp" break; - case 34: // stmt: stmt_for -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 29: // stmt: stmt_waitframe +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2202 "parser.cpp" break; - case 35: // stmt: stmt_foreach -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 30: // stmt: stmt_if +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2208 "parser.cpp" break; - case 36: // stmt: stmt_switch -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 31: // stmt: stmt_ifelse +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2214 "parser.cpp" break; - case 37: // stmt: stmt_case -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 32: // stmt: stmt_while +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2220 "parser.cpp" break; - case 38: // stmt: stmt_default -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 33: // stmt: stmt_dowhile +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2226 "parser.cpp" break; - case 39: // stmt: stmt_break -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 34: // stmt: stmt_for +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2232 "parser.cpp" break; - case 40: // stmt: stmt_continue -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 35: // stmt: stmt_foreach +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2238 "parser.cpp" break; - case 41: // stmt: stmt_return -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 36: // stmt: stmt_switch +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2244 "parser.cpp" break; - case 42: // stmt: stmt_breakpoint -#line 334 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 37: // stmt: stmt_case +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2250 "parser.cpp" break; - case 43: // stmt: stmt_prof_begin -#line 335 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 38: // stmt: stmt_default +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2256 "parser.cpp" break; - case 44: // stmt: stmt_prof_end -#line 336 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 39: // stmt: stmt_break +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2262 "parser.cpp" break; - case 45: // stmt_or_dev: stmt -#line 340 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 40: // stmt: stmt_continue +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2268 "parser.cpp" break; - case 46: // stmt_or_dev: stmt_dev -#line 341 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 41: // stmt: stmt_return +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2274 "parser.cpp" break; - case 47: // stmt_list: stmt_list stmt -#line 346 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_breakpoint +#line 337 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2280 "parser.cpp" break; - case 48: // stmt_list: stmt -#line 348 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_begin +#line 338 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2286 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 353 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt: stmt_prof_end +#line 339 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2292 "parser.cpp" break; - case 50: // stmt_or_dev_list: stmt_or_dev -#line 355 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 45: // stmt_or_dev: stmt +#line 343 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2298 "parser.cpp" break; - case 51: // stmt_dev: "/#" stmt_list "#/" -#line 359 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 46: // stmt_or_dev: stmt_dev +#line 344 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2304 "parser.cpp" break; - case 52: // stmt_dev: "/#" "#/" -#line 360 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 47: // stmt_list: stmt_list stmt +#line 349 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2310 "parser.cpp" break; - case 53: // stmt_block: "{" stmt_or_dev_list "}" -#line 364 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 48: // stmt_list: stmt +#line 351 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2316 "parser.cpp" break; - case 54: // stmt_block: "{" "}" -#line 365 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 356 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2322 "parser.cpp" break; - case 55: // stmt_expr: expr_assign -#line 370 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_or_dev_list: stmt_or_dev +#line 358 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2328 "parser.cpp" break; - case 56: // stmt_expr: expr_increment -#line 372 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" stmt_list "#/" +#line 362 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2334 "parser.cpp" break; - case 57: // stmt_expr: expr_decrement -#line 374 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 52: // stmt_dev: "/#" "#/" +#line 363 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2340 "parser.cpp" break; - case 58: // stmt_expr: %empty -#line 376 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 53: // stmt_block: "{" stmt_or_dev_list "}" +#line 367 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2346 "parser.cpp" break; - case 59: // stmt_call: expr_call ";" -#line 381 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 54: // stmt_block: "{" "}" +#line 368 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2352 "parser.cpp" break; - case 60: // stmt_call: expr_method ";" -#line 383 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 55: // stmt_expr: expr_assign +#line 373 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2358 "parser.cpp" break; - case 61: // stmt_assign: expr_assign ";" -#line 388 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_increment +#line 375 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2364 "parser.cpp" break; - case 62: // stmt_assign: expr_increment ";" -#line 390 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: expr_decrement +#line 377 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2370 "parser.cpp" break; - case 63: // stmt_assign: expr_decrement ";" -#line 392 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 58: // stmt_expr: %empty +#line 379 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2376 "parser.cpp" break; - case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 397 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 59: // stmt_call: expr_call ";" +#line 384 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2382 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 402 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 60: // stmt_call: expr_method ";" +#line 386 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2388 "parser.cpp" break; - case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 404 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 61: // stmt_assign: expr_assign ";" +#line 391 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2394 "parser.cpp" break; - case 67: // stmt_wait: "wait" expr ";" -#line 409 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 62: // stmt_assign: expr_increment ";" +#line 393 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2400 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 414 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 63: // stmt_assign: expr_decrement ";" +#line 395 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2406 "parser.cpp" break; - case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 416 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 400 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2412 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 421 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 405 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2418 "parser.cpp" break; - case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 423 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 407 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2424 "parser.cpp" break; - case 72: // stmt_waittillframeend: "waittillframeend" ";" -#line 428 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 67: // stmt_wait: "wait" expr ";" +#line 412 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2430 "parser.cpp" break; - case 73: // stmt_waitframe: "waitframe" ";" -#line 433 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 417 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2436 "parser.cpp" break; - case 74: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 419 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2442 "parser.cpp" break; - case 75: // stmt_if: "if" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 424 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2448 "parser.cpp" break; - case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 426 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2454 "parser.cpp" break; - case 77: // stmt_while: "while" "(" expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_waittillframeend: "waittillframeend" ";" +#line 431 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2460 "parser.cpp" break; - case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 73: // stmt_waitframe: "waitframe" ";" +#line 436 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2466 "parser.cpp" break; - case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 460 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 74: // stmt_waitframe: "waitframe" "(" ")" ";" +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2472 "parser.cpp" break; - case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 465 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 75: // stmt_if: "if" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2478 "parser.cpp" break; - case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2484 "parser.cpp" break; - case 82: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 472 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 77: // stmt_while: "while" "(" expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2490 "parser.cpp" break; - case 83: // stmt_case: "case" expr_integer ":" -#line 477 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2496 "parser.cpp" break; - case 84: // stmt_case: "case" expr_string ":" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 463 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2502 "parser.cpp" break; - case 85: // stmt_default: "default" ":" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 468 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2508 "parser.cpp" break; - case 86: // stmt_break: "break" ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2514 "parser.cpp" break; - case 87: // stmt_continue: "continue" ";" -#line 494 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 475 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2520 "parser.cpp" break; - case 88: // stmt_return: "return" expr ";" -#line 499 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 83: // stmt_case: "case" expr_integer ":" +#line 480 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2526 "parser.cpp" break; - case 89: // stmt_return: "return" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 84: // stmt_case: "case" expr_string ":" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2532 "parser.cpp" break; - case 90: // stmt_breakpoint: "breakpoint" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 85: // stmt_default: "default" ":" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2538 "parser.cpp" break; - case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 511 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 86: // stmt_break: "break" ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2544 "parser.cpp" break; - case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 516 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 87: // stmt_continue: "continue" ";" +#line 497 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2550 "parser.cpp" break; - case 93: // expr: expr_ternary -#line 520 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_return: "return" expr ";" +#line 502 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2556 "parser.cpp" break; - case 94: // expr: expr_binary -#line 521 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 89: // stmt_return: "return" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2562 "parser.cpp" break; - case 95: // expr: expr_primitive -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 90: // stmt_breakpoint: "breakpoint" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2568 "parser.cpp" break; - case 96: // expr_or_empty: expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 514 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2574 "parser.cpp" break; - case 97: // expr_or_empty: %empty -#line 527 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 519 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2580 "parser.cpp" break; - case 98: // expr_assign: expr_object "=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr: expr_ternary +#line 523 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2586 "parser.cpp" break; - case 99: // expr_assign: expr_object "|=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 94: // expr: expr_binary +#line 524 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2592 "parser.cpp" break; - case 100: // expr_assign: expr_object "&=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr: expr_primitive +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2598 "parser.cpp" break; - case 101: // expr_assign: expr_object "^=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_or_empty: expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2604 "parser.cpp" break; - case 102: // expr_assign: expr_object "<<=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_or_empty: %empty +#line 530 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2610 "parser.cpp" break; - case 103: // expr_assign: expr_object ">>=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_tuple "=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2616 "parser.cpp" break; - case 104: // expr_assign: expr_object "+=" expr -#line 544 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2622 "parser.cpp" break; - case 105: // expr_assign: expr_object "-=" expr -#line 546 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "|=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2628 "parser.cpp" break; - case 106: // expr_assign: expr_object "*=" expr -#line 548 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 101: // expr_assign: expr_object "&=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2634 "parser.cpp" break; - case 107: // expr_assign: expr_object "/=" expr -#line 550 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 102: // expr_assign: expr_object "^=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2640 "parser.cpp" break; - case 108: // expr_assign: expr_object "%=" expr -#line 552 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 103: // expr_assign: expr_object "<<=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2646 "parser.cpp" break; - case 109: // expr_increment: "++" expr_object -#line 557 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 104: // expr_assign: expr_object ">>=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2652 "parser.cpp" break; - case 110: // expr_increment: expr_object "++" -#line 559 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 105: // expr_assign: expr_object "+=" expr +#line 549 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2658 "parser.cpp" break; - case 111: // expr_decrement: "--" expr_object -#line 564 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 106: // expr_assign: expr_object "-=" expr +#line 551 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2664 "parser.cpp" break; - case 112: // expr_decrement: expr_object "--" -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 107: // expr_assign: expr_object "*=" expr +#line 553 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2670 "parser.cpp" break; - case 113: // expr_ternary: expr "?" expr ":" expr -#line 571 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_assign: expr_object "/=" expr +#line 555 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2676 "parser.cpp" break; - case 114: // expr_binary: expr "||" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_assign: expr_object "%=" expr +#line 557 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2682 "parser.cpp" break; - case 115: // expr_binary: expr "&&" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_increment: "++" expr_object +#line 562 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2688 "parser.cpp" break; - case 116: // expr_binary: expr "==" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_increment: expr_object "++" +#line 564 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2694 "parser.cpp" break; - case 117: // expr_binary: expr "!=" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_decrement: "--" expr_object +#line 569 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2700 "parser.cpp" break; - case 118: // expr_binary: expr "<=" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_decrement: expr_object "--" +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2706 "parser.cpp" break; - case 119: // expr_binary: expr ">=" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_ternary: expr "?" expr ":" expr +#line 576 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2712 "parser.cpp" break; - case 120: // expr_binary: expr "<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "||" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2718 "parser.cpp" break; - case 121: // expr_binary: expr ">" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "&&" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2724 "parser.cpp" break; - case 122: // expr_binary: expr "|" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr "==" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2730 "parser.cpp" break; - case 123: // expr_binary: expr "&" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "!=" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2736 "parser.cpp" break; - case 124: // expr_binary: expr "^" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr "<=" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2742 "parser.cpp" break; - case 125: // expr_binary: expr "<<" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr ">=" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2748 "parser.cpp" break; - case 126: // expr_binary: expr ">>" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2754 "parser.cpp" break; - case 127: // expr_binary: expr "+" expr -#line 602 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr ">" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2760 "parser.cpp" break; - case 128: // expr_binary: expr "-" expr -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "|" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2766 "parser.cpp" break; - case 129: // expr_binary: expr "*" expr -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 124: // expr_binary: expr "&" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2772 "parser.cpp" break; - case 130: // expr_binary: expr "/" expr -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 125: // expr_binary: expr "^" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2778 "parser.cpp" break; - case 131: // expr_binary: expr "%" expr -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 126: // expr_binary: expr "<<" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2784 "parser.cpp" break; - case 132: // expr_primitive: expr_complement -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 127: // expr_binary: expr ">>" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2790 "parser.cpp" break; - case 133: // expr_primitive: expr_negate -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 128: // expr_binary: expr "+" expr +#line 607 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2796 "parser.cpp" break; - case 134: // expr_primitive: expr_not -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 129: // expr_binary: expr "-" expr +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2802 "parser.cpp" break; - case 135: // expr_primitive: expr_call -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 130: // expr_binary: expr "*" expr +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2808 "parser.cpp" break; - case 136: // expr_primitive: expr_method -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 131: // expr_binary: expr "/" expr +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2814 "parser.cpp" break; - case 137: // expr_primitive: expr_add_array -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 132: // expr_binary: expr "%" expr +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2820 "parser.cpp" break; - case 138: // expr_primitive: expr_reference -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 133: // expr_primitive: expr_complement +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2826 "parser.cpp" break; - case 139: // expr_primitive: expr_array -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 134: // expr_primitive: expr_negate +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2832 "parser.cpp" break; - case 140: // expr_primitive: expr_field -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 135: // expr_primitive: expr_not +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2838 "parser.cpp" break; - case 141: // expr_primitive: expr_size -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 136: // expr_primitive: expr_call +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2844 "parser.cpp" break; - case 142: // expr_primitive: expr_paren -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 137: // expr_primitive: expr_method +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2850 "parser.cpp" break; - case 143: // expr_primitive: expr_thisthread -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 138: // expr_primitive: expr_add_array +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2856 "parser.cpp" break; - case 144: // expr_primitive: expr_empty_array -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 139: // expr_primitive: expr_reference +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2862 "parser.cpp" break; - case 145: // expr_primitive: expr_undefined -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 140: // expr_primitive: expr_array +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2868 "parser.cpp" break; - case 146: // expr_primitive: expr_game -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 141: // expr_primitive: expr_field +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2874 "parser.cpp" break; - case 147: // expr_primitive: expr_self -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 142: // expr_primitive: expr_size +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2880 "parser.cpp" break; - case 148: // expr_primitive: expr_anim -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 143: // expr_primitive: expr_paren +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2886 "parser.cpp" break; - case 149: // expr_primitive: expr_level -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 144: // expr_primitive: expr_thisthread +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2892 "parser.cpp" break; - case 150: // expr_primitive: expr_animation -#line 632 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 145: // expr_primitive: expr_empty_array +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2898 "parser.cpp" break; - case 151: // expr_primitive: expr_animtree -#line 633 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 146: // expr_primitive: expr_undefined +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2904 "parser.cpp" break; - case 152: // expr_primitive: expr_identifier -#line 634 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 147: // expr_primitive: expr_game +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2910 "parser.cpp" break; - case 153: // expr_primitive: expr_istring -#line 635 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 148: // expr_primitive: expr_self +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2916 "parser.cpp" break; - case 154: // expr_primitive: expr_string -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 149: // expr_primitive: expr_anim +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2922 "parser.cpp" break; - case 155: // expr_primitive: expr_vector -#line 637 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 150: // expr_primitive: expr_level +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2928 "parser.cpp" break; - case 156: // expr_primitive: expr_float -#line 638 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 151: // expr_primitive: expr_animation +#line 637 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2934 "parser.cpp" break; - case 157: // expr_primitive: expr_integer -#line 639 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 152: // expr_primitive: expr_animtree +#line 638 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2940 "parser.cpp" break; - case 158: // expr_primitive: expr_false -#line 640 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 153: // expr_primitive: expr_identifier +#line 639 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2946 "parser.cpp" break; - case 159: // expr_primitive: expr_true -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 154: // expr_primitive: expr_istring +#line 640 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2952 "parser.cpp" break; - case 160: // expr_complement: "~" expr -#line 646 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 155: // expr_primitive: expr_string +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2958 "parser.cpp" break; - case 161: // expr_negate: "-" expr_identifier -#line 651 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 156: // expr_primitive: expr_vector +#line 642 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2964 "parser.cpp" break; - case 162: // expr_negate: "-" expr_paren -#line 653 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 157: // expr_primitive: expr_float +#line 643 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2970 "parser.cpp" break; - case 163: // expr_negate: "-" expr_array -#line 655 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 158: // expr_primitive: expr_integer +#line 644 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2976 "parser.cpp" break; - case 164: // expr_negate: "-" expr_field -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 159: // expr_primitive: expr_false +#line 645 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2982 "parser.cpp" break; - case 165: // expr_not: "!" expr -#line 662 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 160: // expr_primitive: expr_true +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2988 "parser.cpp" break; - case 166: // expr_call: expr_function -#line 666 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_complement: "~" expr +#line 651 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2994 "parser.cpp" break; - case 167: // expr_call: expr_pointer -#line 667 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 162: // expr_negate: "-" expr_identifier +#line 656 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 3000 "parser.cpp" break; - case 168: // expr_method: expr_object expr_function -#line 670 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 163: // expr_negate: "-" expr_paren +#line 658 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 3006 "parser.cpp" break; - case 169: // expr_method: expr_object expr_pointer -#line 671 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 164: // expr_negate: "-" expr_array +#line 660 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 3012 "parser.cpp" break; - case 170: // expr_function: expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 165: // expr_negate: "-" expr_field +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 3018 "parser.cpp" break; - case 171: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 678 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 166: // expr_not: "!" expr +#line 667 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3024 "parser.cpp" break; - case 172: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 680 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 167: // expr_call: expr_function +#line 671 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3030 "parser.cpp" break; - case 173: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 682 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 168: // expr_call: expr_pointer +#line 672 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3036 "parser.cpp" break; - case 174: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 684 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 169: // expr_method: expr_object expr_function +#line 675 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3042 "parser.cpp" break; - case 175: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 686 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_method: expr_object expr_pointer +#line 676 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3048 "parser.cpp" break; - case 176: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 691 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 171: // expr_function: expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3054 "parser.cpp" break; - case 177: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 693 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 172: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 683 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3060 "parser.cpp" break; - case 178: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 695 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 173: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 685 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3066 "parser.cpp" break; - case 179: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 697 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 174: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 687 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3072 "parser.cpp" break; - case 180: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 702 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 175: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 689 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3078 "parser.cpp" break; - case 181: // expr_parameters: expr_parameters "," expr_identifier -#line 707 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 176: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 691 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3084 "parser.cpp" break; - case 182: // expr_parameters: expr_identifier -#line 709 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 177: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 696 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3090 "parser.cpp" break; - case 183: // expr_parameters: %empty -#line 711 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 178: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 698 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3096 "parser.cpp" break; - case 184: // expr_arguments: expr_arguments_no_empty -#line 716 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 179: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 700 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3102 "parser.cpp" break; - case 185: // expr_arguments: %empty -#line 718 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 180: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 702 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3108 "parser.cpp" break; - case 186: // expr_arguments_no_empty: expr_arguments "," expr -#line 723 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 181: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 707 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3114 "parser.cpp" break; - case 187: // expr_arguments_no_empty: expr -#line 725 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 182: // expr_parameters: expr_parameters "," expr_identifier +#line 712 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3120 "parser.cpp" break; - case 188: // expr_reference: "::" expr_identifier -#line 730 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_parameters: expr_identifier +#line 714 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3126 "parser.cpp" break; - case 189: // expr_reference: expr_path "::" expr_identifier -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 184: // expr_parameters: %empty +#line 716 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3132 "parser.cpp" break; - case 190: // expr_array: expr_object "[" expr "]" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments: expr_arguments_no_empty +#line 721 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3138 "parser.cpp" break; - case 191: // expr_field: expr_object "." expr_identifier_nosize -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 186: // expr_arguments: %empty +#line 723 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3144 "parser.cpp" break; - case 192: // expr_size: expr_object "." "size" -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 187: // expr_arguments_no_empty: expr_arguments "," expr +#line 728 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3150 "parser.cpp" break; - case 193: // expr_paren: "(" expr ")" -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 188: // expr_arguments_no_empty: expr +#line 730 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3156 "parser.cpp" break; - case 194: // expr_object: expr_call -#line 756 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 189: // expr_reference: "::" expr_identifier +#line 735 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3162 "parser.cpp" break; - case 195: // expr_object: expr_method -#line 757 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 190: // expr_reference: expr_path "::" expr_identifier +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3168 "parser.cpp" break; - case 196: // expr_object: expr_array -#line 758 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 191: // expr_tuple: "[" expr_tuple_arguments "]" +#line 742 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3174 "parser.cpp" break; - case 197: // expr_object: expr_field -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 192: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 747 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3180 "parser.cpp" break; - case 198: // expr_object: expr_game -#line 760 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 193: // expr_tuple_arguments: expr_tuple_types +#line 749 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3186 "parser.cpp" break; - case 199: // expr_object: expr_self -#line 761 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 194: // expr_tuple_types: expr_array +#line 753 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3192 "parser.cpp" break; - case 200: // expr_object: expr_anim -#line 762 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 195: // expr_tuple_types: expr_field +#line 754 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3198 "parser.cpp" break; - case 201: // expr_object: expr_level -#line 763 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 196: // expr_tuple_types: expr_identifier +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3204 "parser.cpp" break; - case 202: // expr_object: expr_identifier -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 197: // expr_array: expr_object "[" expr "]" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3210 "parser.cpp" break; - case 203: // expr_thisthread: "thisthread" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_field: expr_object "." expr_identifier_nosize +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3216 "parser.cpp" break; - case 204: // expr_empty_array: "[" "]" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_size: expr_object "." "size" +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3222 "parser.cpp" break; - case 205: // expr_undefined: "undefined" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_paren: "(" expr ")" +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3228 "parser.cpp" break; - case 206: // expr_game: "game" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_call +#line 779 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3234 "parser.cpp" break; - case 207: // expr_self: "self" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 202: // expr_object: expr_method +#line 780 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3240 "parser.cpp" break; - case 208: // expr_anim: "anim" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_array +#line 781 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3246 "parser.cpp" break; - case 209: // expr_level: "level" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 204: // expr_object: expr_field +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3252 "parser.cpp" break; - case 210: // expr_animation: "%" "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_game +#line 783 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3258 "parser.cpp" break; - case 211: // expr_animtree: "#animtree" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 206: // expr_object: expr_self +#line 784 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3264 "parser.cpp" break; - case 212: // expr_identifier_nosize: "identifier" -#line 814 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_object: expr_anim +#line 785 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3270 "parser.cpp" break; - case 213: // expr_identifier: "identifier" -#line 819 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_object: expr_level +#line 786 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3276 "parser.cpp" break; - case 214: // expr_identifier: "size" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 209: // expr_object: expr_identifier +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3282 "parser.cpp" break; - case 215: // expr_path: "identifier" -#line 826 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_thisthread: "thisthread" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3288 "parser.cpp" break; - case 216: // expr_path: "path" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 211: // expr_empty_array: "[" "]" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3294 "parser.cpp" break; - case 217: // expr_istring: "localized string" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 212: // expr_undefined: "undefined" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3300 "parser.cpp" break; - case 218: // expr_string: "string literal" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_game: "game" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3306 "parser.cpp" break; - case 219: // expr_vector: "(" expr "," expr "," expr ")" -#line 843 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 214: // expr_self: "self" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3312 "parser.cpp" break; - case 220: // expr_float: "-" "float" -#line 848 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 215: // expr_anim: "anim" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3318 "parser.cpp" break; - case 221: // expr_float: "float" -#line 850 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 216: // expr_level: "level" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3324 "parser.cpp" break; - case 222: // expr_integer: "-" "integer" -#line 855 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 217: // expr_animation: "%" "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3330 "parser.cpp" break; - case 223: // expr_integer: "integer" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 218: // expr_animtree: "#animtree" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3336 "parser.cpp" break; - case 224: // expr_false: "false" -#line 862 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 219: // expr_identifier_nosize: "identifier" +#line 837 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3342 "parser.cpp" break; - case 225: // expr_true: "true" -#line 867 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 220: // expr_identifier: "identifier" +#line 842 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3348 "parser.cpp" break; + case 221: // expr_identifier: "size" +#line 844 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3354 "parser.cpp" + break; -#line 3352 "parser.cpp" + case 222: // expr_path: "identifier" +#line 849 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3360 "parser.cpp" + break; + + case 223: // expr_path: "path" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3366 "parser.cpp" + break; + + case 224: // expr_istring: "localized string" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3372 "parser.cpp" + break; + + case 225: // expr_string: "string literal" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3378 "parser.cpp" + break; + + case 226: // expr_vector: "(" expr "," expr "," expr ")" +#line 866 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3384 "parser.cpp" + break; + + case 227: // expr_float: "-" "float" +#line 871 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3390 "parser.cpp" + break; + + case 228: // expr_float: "float" +#line 873 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3396 "parser.cpp" + break; + + case 229: // expr_integer: "-" "integer" +#line 878 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3402 "parser.cpp" + break; + + case 230: // expr_integer: "integer" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3408 "parser.cpp" + break; + + case 231: // expr_false: "false" +#line 885 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3414 "parser.cpp" + break; + + case 232: // expr_true: "true" +#line 890 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3420 "parser.cpp" + break; + + +#line 3424 "parser.cpp" default: break; @@ -3559,7 +3631,8 @@ namespace xsk { namespace gsc { namespace h2 { "expr_binary", "expr_primitive", "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", - "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_arguments_no_empty", "expr_reference", "expr_tuple", + "expr_tuple_arguments", "expr_tuple_types", "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", @@ -3836,366 +3909,375 @@ namespace xsk { namespace gsc { namespace h2 { const short parser::yypact_ninf_ = -287; - const short parser::yytable_ninf_ = -216; + const short parser::yytable_ninf_ = -223; const short parser::yypact_[] = { - 9, -287, -287, -65, -65, -40, -287, -287, 41, 9, - -287, -287, -287, -287, -287, -287, -25, -287, -287, -12, - -8, -55, -287, -287, -287, -287, -34, 1152, -287, -287, - -287, 12, -19, -287, -287, -28, -18, -287, 4, -287, - -287, -287, -287, -287, -287, -287, 1152, 1026, -34, 1152, - 1152, 35, -27, 28, -287, -287, -287, 2117, -287, -287, - -287, -287, -287, -287, 543, 557, -287, -287, -287, -287, - 604, 666, -287, -287, 677, -287, -287, -287, 878, 955, - 1113, 1176, -287, -287, 215, 33, -287, -287, -287, -287, - -287, -287, -287, 32, 57, -34, 59, 52, 62, 67, - 75, 74, 85, 1408, 1026, -287, 2200, 92, 99, -287, - -287, -287, 1152, 102, -287, -287, -287, -287, 604, 666, - -287, 1375, -287, -287, -287, -287, 215, 100, -287, -287, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1215, - -31, -287, -287, 109, 1152, -34, -287, 769, -287, -287, - 1152, 1152, -34, 1152, 1152, -34, 1152, -287, 1152, 1886, - 1152, -287, 1574, 1152, 65, -34, 2082, 84, 84, 2231, - 2241, 2323, 2323, 249, 249, 249, 249, 2272, 2313, 2282, - 76, 76, -287, -287, -287, 1926, -287, -287, -287, -1, - -287, 116, 923, 1152, 111, -15, 129, 1339, 131, 132, - 134, 135, -53, 130, 128, 136, 1089, 137, 142, 145, - -287, 69, 69, -287, -287, 846, -287, -287, -287, -287, + 6, -287, -287, 5, 5, -24, -287, -287, 37, 6, + -287, -287, -287, -287, -287, -287, -8, -287, -287, -13, + -10, -54, -287, -287, -287, -287, -23, 1223, -287, -287, + -287, 11, -12, -287, -287, -42, 3, -287, 17, -287, + -287, -287, -287, -287, -287, -287, 1223, 821, -23, 1223, + 1223, -18, -36, 26, -287, -287, -287, 2187, -287, -287, + -287, -287, -287, -287, 413, 667, -287, -287, -287, -287, + 699, 729, -287, -287, 1012, -287, -287, -287, 1089, 1187, + 1247, 1317, -287, -287, 574, 39, -287, -287, -287, -287, + -287, -287, -287, 15, 96, -23, 49, 75, 81, 114, + 100, 124, 129, 1439, 821, -287, 2270, 134, 136, -287, + -287, -287, 1223, 142, -287, -287, -287, -287, 699, 729, + -287, 1406, -287, -287, -287, -287, 574, 140, -287, -287, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1286, + -20, -287, -287, 152, 1223, -23, -287, 928, -287, -287, + 1223, 1223, -23, 1223, 1223, -23, 1223, -287, 1223, 1917, + 1223, -287, 1605, 1223, 107, -23, 2152, 179, 179, 2301, + 2311, 2383, 2383, 30, 30, 30, 30, 2342, 728, 2352, + 73, 73, -287, -287, -287, 1957, -287, -287, -287, 35, + -287, 154, 1057, 1223, 146, -5, 161, 1370, 165, 166, + 167, 168, -17, 163, 169, 172, 1160, 183, 173, 175, + -287, 139, 548, 548, -287, -287, 980, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - -287, -287, 141, 143, 146, 148, 149, -287, -287, 1262, - 109, 1966, 8, 160, 2006, 15, 161, 2046, 1021, 163, - 2200, 1886, 116, 1152, -287, -287, 1152, -287, -287, 1000, - 2152, -287, 164, -287, 1152, 196, 1152, 49, -34, 1152, - 122, 165, 166, -287, -287, -287, -287, 2187, -287, 1152, - 1152, 1375, 1375, -287, -287, -287, -287, -287, -287, -287, - 178, 181, 182, 186, -287, -287, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 187, -287, 1152, - 193, -287, 1152, 195, 1152, 201, 2200, 19, -287, -287, - -287, 177, 1608, 205, 1642, 198, -287, -287, -287, 1365, - 1, 1676, -287, -287, -287, 48, 50, 1152, 1152, 1152, - 1152, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, - 2200, 2200, 209, 73, 211, 77, 218, 1710, 1152, -287, - -287, 1339, 1152, 1339, 1152, 1152, -34, 57, 203, 210, - 1744, 1452, 1496, 1540, 1152, -287, 1152, -287, 1152, -287, - 87, 250, 1778, -287, 2200, 214, 1812, 248, -287, -287, - -287, 220, 222, 1152, 223, 1152, 227, 1152, 90, 91, - 101, -287, 1339, 230, 49, 1339, 1152, -287, -287, 224, - -287, 244, -287, 246, -287, -287, -287, -287, -287, 251, - -287, 1846, 231, 238, 243, 1339, 1339, -287, -287, -287, - -287, -287 + -287, -287, -287, 184, 185, 188, 191, 192, 177, -287, + -287, 51, 152, 1997, 53, 205, 2037, 56, 206, 2077, + 2116, 203, 2270, 1917, 154, 1223, -287, -287, 1223, -287, + -287, 1134, 2222, -287, 209, -287, 1223, 236, 1223, 639, + -23, 1223, 164, 208, 215, -287, -287, -287, -287, 2257, + -287, 1223, 1223, 1286, 32, -287, 62, 86, 8, 1406, + 1406, -287, -287, -287, -287, -287, -287, -287, 1223, 225, + 227, 228, 230, -287, -287, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 210, -287, 1223, 226, + -287, 1223, 229, 1223, 232, 2270, 59, -287, -287, -287, + 223, 1639, 235, 1673, 233, -287, -287, -287, 1396, 9, + 1707, -287, -287, -287, 60, 87, -287, 548, 2270, 1223, + 1223, 1223, 1223, 2270, 2270, 2270, 2270, 2270, 2270, 2270, + 2270, 2270, 2270, 2270, 240, 89, 242, 101, 245, 1741, + 1223, -287, -287, 1370, 1223, 1370, 1223, 1223, -23, 96, + 237, 241, -287, 1775, 1483, 1527, 1571, 1223, -287, 1223, + -287, 1223, -287, 103, 273, 1809, -287, 2270, 243, 1843, + 272, -287, -287, -287, 246, 249, 1223, 250, 1223, 251, + 1223, 113, 123, 125, -287, 1370, 252, 639, 1370, 1223, + -287, -287, 254, -287, 262, -287, 286, -287, -287, -287, + -287, -287, 287, -287, 1877, 279, 280, 281, 1370, 1370, + -287, -287, -287, -287, -287 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 214, 213, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 216, 215, 0, - 0, 0, 1, 4, 5, 6, 183, 0, 10, 11, - 218, 0, 0, 182, 211, 0, 0, 203, 0, 225, - 224, 205, 206, 207, 208, 209, 0, 185, 0, 0, - 0, 0, 0, 213, 217, 221, 223, 0, 93, 94, - 95, 132, 133, 134, 135, 136, 166, 167, 137, 138, - 139, 140, 141, 142, 0, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 0, 153, 154, 155, 156, - 157, 158, 159, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 204, 187, 0, 184, 188, - 165, 160, 0, 0, 220, 222, 194, 195, 163, 164, - 162, 0, 198, 199, 200, 201, 161, 0, 210, 18, + 3, 12, 13, 0, 0, 0, 221, 220, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 223, 222, 0, + 0, 0, 1, 4, 5, 6, 184, 0, 10, 11, + 225, 0, 0, 183, 218, 0, 0, 210, 0, 232, + 231, 212, 213, 214, 215, 216, 0, 186, 0, 0, + 0, 0, 0, 220, 224, 228, 230, 0, 93, 94, + 95, 133, 134, 135, 136, 137, 167, 168, 138, 139, + 140, 141, 142, 143, 0, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 0, 154, 155, 156, 157, + 158, 159, 160, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 186, 211, 188, 0, 185, 189, + 166, 161, 0, 0, 227, 229, 201, 202, 164, 165, + 163, 0, 205, 206, 207, 208, 162, 0, 217, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 168, 169, 0, 185, 0, 17, 0, 19, 181, - 0, 185, 0, 0, 185, 0, 0, 193, 0, 187, - 0, 180, 0, 0, 0, 0, 0, 125, 126, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 127, 128, 129, 130, 131, 0, 192, 212, 191, 0, - 184, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 169, 170, 0, 186, 0, 17, 0, 19, 182, + 0, 186, 0, 0, 186, 0, 0, 200, 0, 188, + 0, 181, 0, 0, 0, 0, 0, 126, 127, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 128, 129, 130, 131, 132, 0, 199, 219, 198, 0, + 185, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 54, 0, 0, 45, 50, 0, 46, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 0, 0, 0, 194, 195, 196, 197, 0, - 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 186, 0, 0, 0, 190, 170, 185, 52, 48, 0, - 0, 72, 0, 73, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 85, 86, 87, 89, 0, 90, 185, - 185, 109, 111, 53, 49, 61, 62, 63, 59, 60, - 0, 0, 0, 0, 110, 112, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 172, 185, - 0, 174, 185, 0, 0, 0, 113, 0, 51, 47, - 67, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 84, 83, 88, 0, 0, 0, 0, 0, - 0, 98, 104, 105, 106, 107, 108, 99, 100, 101, - 103, 102, 0, 0, 0, 0, 0, 0, 185, 171, - 74, 0, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 173, 185, 175, 185, 219, - 0, 75, 0, 77, 96, 0, 0, 0, 82, 91, - 92, 0, 0, 185, 0, 185, 0, 185, 0, 0, - 0, 176, 0, 0, 58, 0, 0, 64, 66, 184, - 69, 184, 71, 184, 177, 178, 179, 76, 78, 0, - 80, 0, 0, 0, 0, 0, 0, 65, 68, 70, - 79, 81 + 54, 0, 0, 0, 45, 50, 0, 46, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 201, 202, 0, 203, + 204, 0, 209, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 187, 0, 0, 0, 197, 171, 186, 52, + 48, 0, 0, 72, 0, 73, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 85, 86, 87, 89, 0, + 90, 186, 186, 0, 0, 193, 203, 204, 209, 110, + 112, 53, 49, 61, 62, 63, 59, 60, 0, 0, + 0, 0, 0, 111, 113, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 173, 186, 0, + 175, 186, 0, 0, 0, 114, 0, 51, 47, 67, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 84, 83, 88, 0, 0, 191, 0, 98, 0, + 0, 0, 0, 99, 105, 106, 107, 108, 109, 100, + 101, 102, 104, 103, 0, 0, 0, 0, 0, 0, + 186, 172, 74, 0, 0, 0, 97, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 186, 174, 186, + 176, 186, 226, 0, 75, 0, 77, 96, 0, 0, + 0, 82, 91, 92, 0, 0, 186, 0, 186, 0, + 186, 0, 0, 0, 177, 0, 0, 58, 0, 0, + 64, 66, 185, 69, 185, 71, 185, 178, 179, 180, + 76, 78, 0, 80, 0, 0, 0, 0, 0, 0, + 65, 68, 70, 79, 81 }; const short parser::yypgoto_[] = { - -287, -287, -287, 271, 297, 298, -287, -287, -287, -177, - 86, -287, -287, -287, -91, -114, -287, -287, -287, -287, + -287, -287, -287, 295, 336, 338, -287, -287, -287, -194, + 122, -287, -287, -287, -93, -87, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - 191, -287, -286, -285, -282, -287, -287, -287, -287, -287, - -287, -33, -6, -66, -59, -287, -287, -147, -41, -287, - 213, 240, -287, 263, 247, -287, -287, -287, 316, 322, - 333, 404, -287, -287, -287, 0, 7, -287, -17, -287, - -287, 105, -287, -287 + 189, -287, -286, -277, -274, -287, -287, -287, -287, -287, + -287, -49, -11, -67, -58, -287, -287, 95, -43, -287, + -287, -287, -16, 197, 324, -287, 302, 355, -287, -287, + -287, 380, 417, 452, 490, -287, -287, -287, 0, 7, + -287, -15, -287, -287, 148, -287, -287 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, - 224, 279, 225, 226, 227, 345, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 106, 405, 252, 253, 254, 58, 59, 60, 61, 62, + 0, 8, 9, 10, 11, 12, 13, 14, 15, 224, + 225, 281, 226, 227, 228, 354, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 106, 418, 253, 254, 255, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 32, 107, 200, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 198, 84, 85, 86, 87, 88, - 89, 90, 91, 92 + 258, 304, 305, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 198, 84, 85, + 86, 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 346, 347, 158, 31, 348, 108, 199, 151, 16, - 19, 20, 21, 6, 262, 152, 196, 265, 116, 6, - 1, 2, 3, 4, 5, 278, 33, 26, 96, 6, - 285, 385, 17, 18, 94, 97, 100, 282, 99, 95, - 290, 22, 98, 101, 30, 117, 30, 283, 109, 56, - 28, 126, 275, 27, 29, 151, 6, 170, 127, 386, - 102, 328, 152, 108, 7, 93, 170, 197, 331, 17, - 53, 128, 379, 170, 153, 35, 36, 170, 38, 17, - 53, 127, 6, 42, 43, 44, 45, 112, -215, 35, - 36, 113, 38, 155, 156, 159, 6, 42, 43, 44, - 45, 388, 339, 389, 161, 113, 170, 7, 170, 35, - 36, 157, 38, 221, 222, 160, 6, 42, 43, 44, - 45, 153, 162, 163, 255, 113, 395, 164, 127, 337, - 397, 170, 17, 53, 165, 170, 114, 115, 346, 347, - 421, 166, 348, 434, 435, 170, 17, 53, 170, 170, - 170, 256, 355, 356, 436, 201, 171, 260, 173, 170, - 175, 154, 263, 197, 127, 266, 17, 53, 276, 255, - 146, 147, 148, 281, 255, 272, 144, 145, 146, 147, - 148, 284, 373, 286, 287, 375, 288, 289, 116, 116, - 294, 293, 255, 151, 299, 291, 256, 300, 295, 298, - 152, 256, 260, 305, 401, 306, 403, 260, 307, 127, - 308, 309, 329, 332, 127, 117, 117, 341, 57, 256, - 335, 260, 260, 343, 115, 260, 352, 353, 127, 127, - 357, 400, 127, 358, 359, 151, 151, 103, 360, 380, - 110, 111, 152, 152, 372, 437, 255, 418, 440, 419, - 374, 420, 376, 378, 116, -202, -202, 382, -202, 153, - 384, 394, -202, 396, 118, 409, 127, 154, 450, 451, - 398, -202, 410, 256, -202, 422, 424, 442, 426, 260, - 23, 117, 427, 151, 428, 430, 127, 260, 350, 432, - 152, 119, 438, 447, 127, 169, 408, 443, 121, 444, - 448, 153, 153, 172, 445, 449, 24, 25, 127, 127, - 439, 304, -202, -202, 120, 131, 132, 292, 0, 0, - 0, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 144, 145, 146, 147, 148, 0, 0, 255, 153, - 255, 261, 0, 0, 264, 0, 127, 267, 0, 268, - 0, 270, 0, 0, 271, 0, 0, 122, 0, 0, - 257, 0, 429, 123, 431, 256, 433, 256, 0, 0, - 0, 260, 0, 260, 124, 0, 407, 0, 127, 255, - 127, 116, 255, 0, 280, 0, 0, 258, 0, 0, - 0, 0, 0, 0, 259, 0, 0, 297, 0, 0, - 0, 0, 255, 255, 0, 257, 256, 0, 117, 256, - 257, 0, 260, 0, 260, 260, 0, 0, 0, 127, - 0, 127, 127, 0, 257, 257, 0, 0, 257, 256, - 256, 0, 258, 0, 0, 260, 260, 258, 0, 259, - 0, 0, 127, 127, 259, 125, 0, 0, 0, 0, - 0, 258, 258, 0, 336, 258, 0, 0, 301, 302, - 0, 0, 259, 122, 0, 342, 0, 344, 0, 123, - 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 124, 0, 257, 0, 0, 0, 0, 0, 0, 0, - 257, 0, 0, 0, 0, 0, 0, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 122, 258, - 0, 0, 0, 122, 123, 377, 259, 258, 0, 123, - 0, 0, 0, 0, 349, 124, 0, 122, 122, 0, - 124, 122, 0, 123, 123, 0, 0, 123, 390, 391, - 392, 393, 0, 0, 124, 124, 0, 0, 124, 0, - 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 402, 0, 404, 406, 0, 0, 0, - 0, 0, 0, -194, -194, 0, -194, 0, 0, 0, - -194, 0, 0, 0, 257, 122, 257, -195, -195, -194, - -195, 123, -194, 122, -195, 0, 125, 0, 0, 123, - 0, 125, 124, -195, 0, 0, -195, 441, 0, 0, - 124, 258, 0, 258, 0, 125, 125, 0, 259, 125, - 259, 0, 0, 0, 0, 257, 0, 257, 257, 0, - -194, -194, 0, 0, -196, -196, 0, -196, 0, 0, - 0, -196, 0, 0, -195, -195, 0, 0, 257, 257, - -196, 0, 258, -196, 258, 258, 0, 0, 0, 259, - 0, 349, 259, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 125, 0, 258, 258, 0, 0, 0, - 0, 125, 259, 259, 0, 0, 0, 122, 0, 122, - 0, -196, -196, 123, 0, 123, -197, -197, 0, -197, - 0, 0, 0, -197, 124, 0, 124, 35, 36, 0, - 38, 0, -197, 0, 6, -197, 0, 0, 0, 0, - 0, 0, 0, 149, 0, 0, 150, 0, 122, 0, - 122, 122, 0, 0, 123, 0, 123, 123, 0, 0, - 0, 0, 0, 0, 0, 124, 0, 124, 124, 0, - 0, 122, 122, -197, -197, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 17, 53, 0, 0, 124, 124, - 202, 0, 0, 0, 0, 125, 0, 125, 203, 0, - 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, + 16, 158, 116, 355, 108, 6, 31, 151, 280, 16, + 19, 20, 356, 287, 96, 357, 152, 1, 2, 3, + 4, 5, 35, 36, 6, 38, 33, 196, 21, 6, + 42, 43, 44, 45, 112, 97, 100, 22, 113, 397, + 117, 94, 98, 101, 26, 30, 95, 284, 109, 28, + 6, 126, 29, 6, 151, 17, 53, 285, 127, 99, + 154, 108, 128, 152, 93, -196, -196, 398, 319, 320, + 27, 321, 322, 102, 153, 7, 292, 156, 197, 17, + 53, 127, 30, 114, 115, 56, -222, 348, 277, 366, + 367, 35, 36, 170, 38, 159, 131, 132, 6, 155, + 17, 53, 17, 18, 7, 160, 337, 149, 256, 340, + 174, 170, 391, 400, 170, 323, 324, 170, 170, -194, + -194, 153, 144, 145, 146, 147, 148, 161, 127, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 401, 162, 408, -195, -195, 170, 257, 170, 17, 53, + 157, 355, 164, 256, 410, 201, 434, 262, 256, 170, + 356, 170, 265, 357, 127, 268, 447, 146, 147, 148, + 163, 170, 116, 116, 116, 274, 448, 256, 449, 35, + 36, 170, 38, 170, 165, 166, 6, 42, 43, 44, + 45, 257, 170, 171, 151, 303, 257, 293, 173, 414, + 175, 416, 262, 152, 154, 197, 278, 262, 283, 127, + 117, 117, 117, 286, 127, 257, 57, 288, 289, 290, + 291, 308, 262, 262, 295, 301, 262, 302, 127, 127, + 127, 296, 256, 127, 297, 103, 17, 53, 110, 111, + 116, 450, 151, 151, 453, 300, 313, 314, 118, 199, + 315, 152, 152, 316, 317, 318, 264, 338, 341, 267, + 344, 153, 350, 352, 463, 464, 115, 384, 127, 361, + 257, 144, 145, 146, 147, 148, 362, 369, 117, 370, + 371, 262, 372, 386, 390, 392, 388, 394, 127, 262, + 359, 151, 407, 169, 409, 396, 127, 411, 435, 422, + 152, 172, 439, 423, 23, 437, 421, 455, 440, 153, + 153, 441, 443, 445, 451, 456, 127, 127, 116, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 457, + 458, 460, 461, 462, 256, 24, 256, 25, 312, 263, + 452, 402, 266, 120, 259, 269, 117, 270, 153, 272, + 294, 0, 273, 0, 0, 127, 0, 308, 0, 0, + 0, 0, 0, 346, 127, 119, 0, 0, 0, 0, + 0, 0, 257, 442, 257, 444, 256, 446, 116, 256, + 0, 0, 282, 262, 0, 262, 364, 365, 420, 259, + 127, 0, 127, 0, 259, 299, 121, 0, 0, 256, + 256, 0, 0, 0, 0, 0, 0, 0, 306, 259, + 259, 0, 0, 259, 257, 0, 117, 257, 0, 0, + 0, 122, 0, 385, 0, 262, 387, 262, 262, 0, + 0, 0, 127, 0, 127, 127, 0, 257, 257, 0, + 0, 0, 0, -201, -201, 0, -201, 0, 262, 262, + -201, 0, 0, 0, 345, 127, 127, 0, 123, -201, + 0, 0, -201, 0, 0, 351, 0, 353, 259, 0, + 360, 260, 0, 0, 0, 413, 259, 0, 0, 0, + 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 431, 124, 432, 0, 433, 368, 0, 0, + -201, -201, 261, 0, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 0, 260, 0, 0, 0, + 0, 260, 389, 0, 0, 0, 0, 122, 0, 0, + 0, 125, 0, 0, 0, 307, 260, 260, 0, 0, + 260, 0, 0, 0, 0, 0, 0, 261, 403, 404, + 405, 406, 261, 0, 306, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 123, 0, 121, 309, 310, 0, + 0, 261, 122, 415, 0, 417, 419, 122, 35, 36, + 259, 38, 259, 0, 0, 6, 42, 43, 44, 45, + 0, 122, 122, 122, 113, 260, 122, 0, 0, 124, + 0, 0, 0, 260, -209, -209, 0, -209, 0, 123, + 0, -209, 0, 0, 123, 0, 154, 0, 454, 0, + -209, 0, 259, -209, 259, 259, 261, 0, 123, 123, + 123, 0, 0, 123, 358, 17, 53, 125, 0, 0, + 0, 0, 0, 0, 124, 259, 259, 0, 0, 124, + 0, 122, 0, 0, 0, 0, 0, 0, 0, 122, + 0, -209, -209, 124, 124, 124, 0, 0, 124, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 220, 113, 125, 0, 125, 125, - 0, 0, 0, 221, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, - 125, 0, 0, 0, 0, 0, 0, 202, 0, 0, - 0, 0, 0, 0, 0, 203, 17, 53, 204, 205, - 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, 0, 0, - 157, 303, 113, 0, 0, 0, 0, 0, 0, 0, - 221, 222, 0, 0, 0, 0, 0, 0, -198, -198, - 0, -198, 0, 0, 0, -198, 0, 0, 0, 0, - 0, 0, 0, 0, -198, 277, 0, -198, 0, 0, - 0, 0, 203, 17, 53, 204, 205, 206, 0, 207, - 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, -198, -198, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 0, 221, 222, 0, - 0, 0, 0, 0, 0, -199, -199, 0, -199, 0, - 0, 0, -199, 0, 0, 0, 0, 0, 0, 0, - 0, -199, 338, 0, -199, 0, 0, 0, 0, 203, - 17, 53, 204, 205, 206, 0, 207, 208, 209, 210, + 45, 307, 125, 0, 0, 221, 0, 125, 123, 0, + 0, 0, 0, 222, 223, 0, 123, -202, -202, 0, + -202, 125, 125, 125, -202, 0, 125, 260, 0, 260, + 0, 0, 121, -202, 0, 0, -202, 0, 0, 0, + 0, 0, 0, 124, 0, 0, 17, 53, 0, -203, + -203, 124, -203, 0, 0, 0, -203, 122, 261, 0, + 261, 0, 0, 0, 0, -203, 0, 0, -203, 260, + 0, 260, 260, 0, -202, -202, 0, 0, 0, -204, + -204, 125, -204, 122, 0, 122, -204, 0, 0, 125, + 0, 0, 260, 260, 123, -204, 0, 0, -204, 0, + 261, 0, 358, 261, 131, 132, -203, -203, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 123, 0, 123, 261, 261, 122, 0, 122, 122, 124, + 144, 145, 146, 147, 148, 0, -204, -204, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34, 122, 122, + 0, 0, 0, 0, 0, 124, 0, 124, 0, 0, + 0, 0, 123, 0, 123, 123, 0, 125, 0, 0, + 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 123, 123, 104, 105, 0, + 0, 48, 0, 125, 0, 125, 0, 124, 0, 124, + 124, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 124, 124, 0, 0, 51, 0, 0, 52, 17, 53, + 30, 54, 55, 56, 0, 125, 0, 125, 125, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 0, 0, 0, 0, 203, 125, 125, + 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 35, 36, + 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, + 0, 0, 157, 220, 221, 0, 0, 0, 0, 0, + 0, 202, 222, 223, 0, 0, 0, 0, 0, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 35, 36, 34, 38, 0, 0, 0, 6, 42, 43, - 44, 45, -199, -199, 157, 0, 113, 0, 0, 0, - 0, 0, 0, 0, 221, 222, 35, 36, 37, 38, - 39, 40, 41, 6, 42, 43, 44, 45, 46, 334, - 0, 0, 104, 105, 130, 0, 48, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 17, 53, 0, - 0, 0, 49, 50, 0, 34, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 51, - 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, - 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, - 45, 46, 0, 0, 0, 47, 0, 0, 0, 48, - 0, 296, 0, -200, -200, 0, -200, 0, 0, 0, - -200, 0, 0, 0, 0, 49, 50, 0, 34, -200, - 0, 0, -200, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, - 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, - 42, 43, 44, 45, 46, 0, 0, 0, 47, 0, - -200, -200, 48, 0, 0, 0, -201, -201, 0, -201, - 0, 0, 0, -201, 0, 0, 0, 0, 49, 50, - 0, 34, -201, 0, 0, -201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 51, 0, 0, 52, 17, - 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, - 40, 41, 6, 42, 43, 44, 45, 46, 0, 0, - 0, 104, 0, -201, -201, 48, 0, 0, 0, 310, - 311, 0, 312, 313, 0, 0, 0, 0, 0, 0, - 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 35, 36, 0, 38, 0, 0, 51, 6, - 0, 52, 17, 53, 30, 54, 55, 56, 149, 0, - 0, 174, 0, 0, 0, 0, 314, 315, 0, 0, + 35, 36, 0, 38, 0, 17, 53, 6, 42, 43, + 44, 45, 0, 0, 157, 311, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 0, 0, 0, 0, + 0, 0, 35, 36, 0, 38, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 279, + 0, 150, 0, 0, 0, 0, 203, 17, 53, 204, + 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 35, 36, 0, + 38, 0, 0, 0, 6, 42, 43, 44, 45, 17, + 53, 157, 0, 221, 0, 0, 0, 0, 0, 0, + 0, 222, 223, 0, 0, 0, 0, 0, 0, -205, + -205, 0, -205, 0, 0, 0, -205, 0, 0, 0, + 0, 0, 0, 0, 0, -205, 347, 0, -205, 0, + 0, 0, 0, 203, 17, 53, 204, 205, 206, 0, + 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 35, 36, 34, 38, 0, 0, + 0, 6, 42, 43, 44, 45, -205, -205, 157, 0, + 221, 0, 0, 0, 0, 0, 0, 0, 222, 223, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 0, 0, 0, 47, 0, 0, 0, + 48, 0, 298, 0, 0, 0, 0, -206, -206, 0, + -206, 17, 53, 0, -206, 0, 49, 50, 0, 34, + 0, 0, 0, -206, 0, 0, -206, 0, 0, 0, + 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, + 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, + 6, 42, 43, 44, 45, 46, 0, 0, 0, 47, + 0, 0, 0, 48, -206, -206, 0, -207, -207, 0, + -207, 0, 0, 0, -207, 0, 0, 0, 0, 49, + 50, 0, 34, -207, 0, 0, -207, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 0, 0, 52, + 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, + 39, 40, 41, 6, 42, 43, 44, 45, 46, 0, + 0, 0, 104, 0, -207, -207, 48, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -208, -208, 0, + -208, 0, 49, 50, -208, 0, 0, 0, 0, 0, + 0, 0, 0, -208, 0, 0, -208, 0, 0, 51, + 0, 0, 52, 17, 53, 30, 54, 55, 56, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, + 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 35, 36, 0, 38, -208, -208, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 35, 36, 0, 38, + 0, 0, 149, 6, 0, 174, 0, 0, 0, 0, + 323, 324, 149, 0, 0, 174, 0, 17, 53, 0, + 0, 0, 0, 0, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 0, 0, 0, 0, 0, + 0, 0, 167, 17, 53, 0, 0, 168, 0, 0, + 0, 0, 130, 17, 53, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 425, 0, 0, 0, + 0, 426, 0, 0, 0, 0, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 0, 0, 0, 0, 0, 0, 0, 203, 17, - 53, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, - 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 221, 222, 35, 36, 0, 38, 0, - 0, 0, 6, 0, 0, 35, 36, 0, 38, 0, - 0, 149, 6, 0, 174, 0, 0, 0, 0, 314, - 315, 149, 0, 0, 174, 0, 17, 53, 0, 0, - 0, 0, 0, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 0, 0, 0, 0, 0, 0, - 0, 167, 17, 53, 0, 0, 168, 0, 0, 0, - 0, 130, 17, 53, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 412, 0, 0, 0, 0, - 413, 0, 0, 0, 0, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 427, 0, 0, 0, 0, 428, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 429, 0, 0, 0, 0, 430, + 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 393, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 395, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 414, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 416, 0, 0, 0, 0, 417, 0, - 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 167, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 399, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 412, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 436, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 438, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 381, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 383, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 387, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 399, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 425, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 459, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 271, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 276, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 336, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 339, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 342, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 343, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 269, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 274, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 327, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 330, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 333, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 273, 0, 130, 0, 0, 131, 132, + 146, 147, 148, 275, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 340, 130, 0, 0, 131, 132, + 145, 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 354, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 363, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, @@ -4209,226 +4291,232 @@ namespace xsk { namespace gsc { namespace h2 { 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, 146, 147, 148, 131, - 132, 0, 0, 135, 136, 137, 138, 139, 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 144, 145, 146, 147, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 147, 148 }; const short parser::yycheck_[] = { - 0, 287, 287, 94, 21, 287, 47, 154, 74, 9, - 3, 4, 52, 47, 161, 74, 47, 164, 51, 47, - 11, 12, 13, 14, 15, 202, 26, 52, 56, 47, - 207, 30, 97, 98, 53, 35, 36, 52, 56, 58, - 93, 0, 35, 36, 99, 51, 99, 62, 48, 102, - 62, 51, 53, 78, 62, 121, 47, 58, 51, 58, - 56, 53, 121, 104, 98, 53, 58, 98, 53, 97, - 98, 98, 53, 58, 74, 40, 41, 58, 43, 97, - 98, 74, 47, 48, 49, 50, 51, 52, 60, 40, - 41, 56, 43, 60, 62, 95, 47, 48, 49, 50, - 51, 53, 279, 53, 52, 56, 58, 98, 58, 40, - 41, 54, 43, 64, 65, 56, 47, 48, 49, 50, - 51, 121, 60, 56, 157, 56, 53, 52, 121, 276, - 53, 58, 97, 98, 60, 58, 101, 102, 424, 424, - 53, 56, 424, 53, 53, 58, 97, 98, 58, 58, - 58, 157, 299, 300, 53, 155, 57, 157, 56, 58, - 60, 52, 162, 98, 157, 165, 97, 98, 52, 202, - 94, 95, 96, 62, 207, 175, 92, 93, 94, 95, - 96, 52, 329, 52, 52, 332, 52, 52, 221, 222, - 62, 61, 225, 259, 52, 212, 202, 52, 62, 62, - 259, 207, 202, 62, 381, 62, 383, 207, 62, 202, - 62, 62, 52, 52, 207, 221, 222, 53, 27, 225, - 57, 221, 222, 27, 102, 225, 61, 61, 221, 222, - 52, 378, 225, 52, 52, 301, 302, 46, 52, 62, - 49, 50, 301, 302, 57, 422, 279, 394, 425, 396, - 57, 398, 57, 52, 287, 40, 41, 52, 43, 259, - 62, 52, 47, 52, 51, 62, 259, 52, 445, 446, - 52, 56, 62, 279, 59, 25, 62, 53, 30, 279, - 9, 287, 62, 349, 62, 62, 279, 287, 288, 62, - 349, 51, 62, 62, 287, 104, 387, 53, 51, 53, - 62, 301, 302, 112, 53, 62, 9, 9, 301, 302, - 424, 225, 97, 98, 51, 66, 67, 212, -1, -1, - -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 92, 93, 94, 95, 96, -1, -1, 381, 349, - 383, 160, -1, -1, 163, -1, 349, 166, -1, 168, - -1, 170, -1, -1, 173, -1, -1, 51, -1, -1, - 157, -1, 413, 51, 415, 381, 417, 383, -1, -1, - -1, 381, -1, 383, 51, -1, 386, -1, 381, 422, - 383, 424, 425, -1, 203, -1, -1, 157, -1, -1, - -1, -1, -1, -1, 157, -1, -1, 216, -1, -1, - -1, -1, 445, 446, -1, 202, 422, -1, 424, 425, - 207, -1, 422, -1, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, 221, 222, -1, -1, 225, 445, - 446, -1, 202, -1, -1, 445, 446, 207, -1, 202, - -1, -1, 445, 446, 207, 51, -1, -1, -1, -1, - -1, 221, 222, -1, 273, 225, -1, -1, 221, 222, - -1, -1, 225, 157, -1, 284, -1, 286, -1, 157, - 289, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 157, -1, 279, -1, -1, -1, -1, -1, -1, -1, - 287, -1, -1, -1, -1, -1, -1, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 202, 279, - -1, -1, -1, 207, 202, 334, 279, 287, -1, 207, - -1, -1, -1, -1, 287, 202, -1, 221, 222, -1, - 207, 225, -1, 221, 222, -1, -1, 225, 357, 358, - 359, 360, -1, -1, 221, 222, -1, -1, 225, -1, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 382, -1, 384, 385, -1, -1, -1, - -1, -1, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, 381, 279, 383, 40, 41, 56, - 43, 279, 59, 287, 47, -1, 202, -1, -1, 287, - -1, 207, 279, 56, -1, -1, 59, 426, -1, -1, - 287, 381, -1, 383, -1, 221, 222, -1, 381, 225, - 383, -1, -1, -1, -1, 422, -1, 424, 425, -1, - 97, 98, -1, -1, 40, 41, -1, 43, -1, -1, - -1, 47, -1, -1, 97, 98, -1, -1, 445, 446, - 56, -1, 422, 59, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 279, -1, 445, 446, -1, -1, -1, - -1, 287, 445, 446, -1, -1, -1, 381, -1, 383, - -1, 97, 98, 381, -1, 383, 40, 41, -1, 43, - -1, -1, -1, 47, 381, -1, 383, 40, 41, -1, - 43, -1, 56, -1, 47, 59, -1, -1, -1, -1, - -1, -1, -1, 56, -1, -1, 59, -1, 422, -1, - 424, 425, -1, -1, 422, -1, 424, 425, -1, -1, - -1, -1, -1, -1, -1, 422, -1, 424, 425, -1, - -1, 445, 446, 97, 98, -1, -1, 445, 446, -1, - -1, -1, -1, -1, 97, 98, -1, -1, 445, 446, - 11, -1, -1, -1, -1, 381, -1, 383, 19, -1, - -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 94, 51, 289, 47, 47, 21, 74, 202, 9, + 3, 4, 289, 207, 56, 289, 74, 11, 12, 13, + 14, 15, 40, 41, 47, 43, 26, 47, 52, 47, + 48, 49, 50, 51, 52, 35, 36, 0, 56, 30, + 51, 53, 35, 36, 52, 99, 58, 52, 48, 62, + 47, 51, 62, 47, 121, 97, 98, 62, 51, 56, + 52, 104, 98, 121, 53, 57, 58, 58, 17, 18, + 78, 20, 21, 56, 74, 98, 93, 62, 98, 97, + 98, 74, 99, 101, 102, 102, 60, 281, 53, 57, + 58, 40, 41, 58, 43, 95, 66, 67, 47, 60, + 97, 98, 97, 98, 98, 56, 53, 56, 157, 53, + 59, 58, 53, 53, 58, 64, 65, 58, 58, 57, + 58, 121, 92, 93, 94, 95, 96, 52, 121, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 53, 60, 53, 57, 58, 58, 157, 58, 97, 98, + 54, 437, 52, 202, 53, 155, 53, 157, 207, 58, + 437, 58, 162, 437, 157, 165, 53, 94, 95, 96, + 56, 58, 221, 222, 223, 175, 53, 226, 53, 40, + 41, 58, 43, 58, 60, 56, 47, 48, 49, 50, + 51, 202, 58, 57, 261, 56, 207, 212, 56, 393, + 60, 395, 202, 261, 52, 98, 52, 207, 62, 202, + 221, 222, 223, 52, 207, 226, 27, 52, 52, 52, + 52, 221, 222, 223, 61, 52, 226, 52, 221, 222, + 223, 62, 281, 226, 62, 46, 97, 98, 49, 50, + 289, 435, 309, 310, 438, 62, 62, 62, 51, 154, + 62, 309, 310, 62, 62, 78, 161, 52, 52, 164, + 57, 261, 53, 27, 458, 459, 102, 57, 261, 61, + 281, 92, 93, 94, 95, 96, 61, 52, 289, 52, + 52, 281, 52, 57, 52, 62, 57, 52, 281, 289, + 290, 358, 52, 104, 52, 62, 289, 52, 25, 62, + 358, 112, 30, 62, 9, 62, 399, 53, 62, 309, + 310, 62, 62, 62, 62, 53, 309, 310, 367, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 53, + 53, 62, 62, 62, 393, 9, 395, 9, 226, 160, + 437, 367, 163, 51, 157, 166, 367, 168, 358, 170, + 212, -1, 173, -1, -1, 358, -1, 367, -1, -1, + -1, -1, -1, 278, 367, 51, -1, -1, -1, -1, + -1, -1, 393, 426, 395, 428, 435, 430, 437, 438, + -1, -1, 203, 393, -1, 395, 301, 302, 398, 202, + 393, -1, 395, -1, 207, 216, 51, -1, -1, 458, + 459, -1, -1, -1, -1, -1, -1, -1, 221, 222, + 223, -1, -1, 226, 435, -1, 437, 438, -1, -1, + -1, 51, -1, 338, -1, 435, 341, 437, 438, -1, + -1, -1, 435, -1, 437, 438, -1, 458, 459, -1, + -1, -1, -1, 40, 41, -1, 43, -1, 458, 459, + 47, -1, -1, -1, 275, 458, 459, -1, 51, 56, + -1, -1, 59, -1, -1, 286, -1, 288, 281, -1, + 291, 157, -1, -1, -1, 390, 289, -1, -1, -1, + -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 407, 51, 409, -1, 411, 318, -1, -1, + 97, 98, 157, -1, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, -1, 202, -1, -1, -1, + -1, 207, 343, -1, -1, -1, -1, 157, -1, -1, + -1, 51, -1, -1, -1, 221, 222, 223, -1, -1, + 226, -1, -1, -1, -1, -1, -1, 202, 369, 370, + 371, 372, 207, -1, 367, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 157, -1, 221, 222, 223, -1, + -1, 226, 202, 394, -1, 396, 397, 207, 40, 41, + 393, 43, 395, -1, -1, 47, 48, 49, 50, 51, + -1, 221, 222, 223, 56, 281, 226, -1, -1, 157, + -1, -1, -1, 289, 40, 41, -1, 43, -1, 202, + -1, 47, -1, -1, 207, -1, 52, -1, 439, -1, + 56, -1, 435, 59, 437, 438, 281, -1, 221, 222, + 223, -1, -1, 226, 289, 97, 98, 157, -1, -1, + -1, -1, -1, -1, 202, 458, 459, -1, -1, 207, + -1, 281, -1, -1, -1, -1, -1, -1, -1, 289, + -1, 97, 98, 221, 222, 223, -1, -1, 226, 40, 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, 55, 56, 422, -1, 424, 425, - -1, -1, -1, 64, 65, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 445, - 446, -1, -1, -1, -1, -1, -1, 11, -1, -1, - -1, -1, -1, -1, -1, 19, 97, 98, 22, 23, - 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, - -1, -1, -1, 47, 48, 49, 50, 51, -1, -1, - 54, 55, 56, -1, -1, -1, -1, -1, -1, -1, - 64, 65, -1, -1, -1, -1, -1, -1, 40, 41, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, - -1, -1, -1, -1, 56, 12, -1, 59, -1, -1, - -1, -1, 19, 97, 98, 22, 23, 24, -1, 26, - 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, 97, 98, 54, -1, 56, - -1, -1, -1, -1, -1, -1, -1, 64, 65, -1, - -1, -1, -1, -1, -1, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - -1, 56, 12, -1, 59, -1, -1, -1, -1, 19, - 97, 98, 22, 23, 24, -1, 26, 27, 28, 29, + 51, 367, 202, -1, -1, 56, -1, 207, 281, -1, + -1, -1, -1, 64, 65, -1, 289, 40, 41, -1, + 43, 221, 222, 223, 47, -1, 226, 393, -1, 395, + -1, -1, 367, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 281, -1, -1, 97, 98, -1, 40, + 41, 289, 43, -1, -1, -1, 47, 367, 393, -1, + 395, -1, -1, -1, -1, 56, -1, -1, 59, 435, + -1, 437, 438, -1, 97, 98, -1, -1, -1, 40, + 41, 281, 43, 393, -1, 395, 47, -1, -1, 289, + -1, -1, 458, 459, 367, 56, -1, -1, 59, -1, + 435, -1, 437, 438, 66, 67, 97, 98, 70, 71, + 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, + 393, -1, 395, 458, 459, 435, -1, 437, 438, 367, + 92, 93, 94, 95, 96, -1, 97, 98, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, 458, 459, + -1, -1, -1, -1, -1, 393, -1, 395, -1, -1, + -1, -1, 435, -1, 437, 438, -1, 367, -1, -1, + -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, -1, 458, 459, 56, 57, -1, + -1, 60, -1, 393, -1, 395, -1, 435, -1, 437, + 438, -1, -1, -1, -1, -1, -1, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 458, 459, -1, -1, 93, -1, -1, 96, 97, 98, + 99, 100, 101, 102, -1, 435, -1, 437, 438, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, + -1, -1, -1, -1, -1, -1, -1, 19, 458, 459, + 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, + -1, -1, 54, 55, 56, -1, -1, -1, -1, -1, + -1, 11, 64, 65, -1, -1, -1, -1, -1, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 16, 43, -1, -1, -1, 47, 48, 49, - 50, 51, 97, 98, 54, -1, 56, -1, -1, -1, - -1, -1, -1, -1, 64, 65, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 58, - -1, -1, 56, 57, 63, -1, 60, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 97, 98, -1, - -1, -1, 76, 77, -1, 16, -1, -1, -1, -1, - 89, 90, 91, 92, 93, 94, 95, 96, -1, 93, - -1, -1, 96, 97, 98, 99, 100, 101, 102, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, -1, -1, -1, 56, -1, -1, -1, 60, - -1, 62, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, 76, 77, -1, 16, 56, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, 96, 97, 98, 99, 100, - 101, 102, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, -1, -1, -1, 56, -1, - 97, 98, 60, -1, -1, -1, 40, 41, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, 76, 77, - -1, 16, 56, -1, -1, 59, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, 96, 97, - 98, 99, 100, 101, 102, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, - -1, 56, -1, 97, 98, 60, -1, -1, -1, 17, - 18, -1, 20, 21, -1, -1, -1, -1, -1, -1, - -1, 76, 77, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 40, 41, -1, 43, -1, -1, 93, 47, - -1, 96, 97, 98, 99, 100, 101, 102, 56, -1, - -1, 59, -1, -1, -1, -1, 64, 65, -1, -1, + 40, 41, -1, 43, -1, 97, 98, 47, 48, 49, + 50, 51, -1, -1, 54, 55, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, -1, -1, -1, -1, + -1, -1, 40, 41, -1, 43, -1, -1, -1, 47, + -1, -1, -1, -1, -1, -1, -1, -1, 56, 12, + -1, 59, -1, -1, -1, -1, 19, 97, 98, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, -1, -1, 47, 48, 49, 50, 51, 97, + 98, 54, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 64, 65, -1, -1, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, -1, -1, 56, 12, -1, 59, -1, + -1, -1, -1, 19, 97, 98, 22, 23, 24, -1, + 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 16, 43, -1, -1, + -1, 47, 48, 49, 50, 51, 97, 98, 54, -1, + 56, -1, -1, -1, -1, -1, -1, -1, 64, 65, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, 40, 41, -1, + 43, 97, 98, -1, 47, -1, 76, 77, -1, 16, + -1, -1, -1, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 93, -1, -1, 96, 97, 98, 99, + 100, 101, 102, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, -1, -1, -1, 56, + -1, -1, -1, 60, 97, 98, -1, 40, 41, -1, + 43, -1, -1, -1, 47, -1, -1, -1, -1, 76, + 77, -1, 16, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, + 97, 98, 99, 100, 101, 102, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + -1, -1, 56, -1, 97, 98, 60, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, -1, 76, 77, 47, -1, -1, -1, -1, -1, + -1, -1, -1, 56, -1, -1, 59, -1, -1, 93, + -1, -1, 96, 97, 98, 99, 100, 101, 102, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, + -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, -1, 43, 97, 98, -1, 47, 48, 49, + 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, 40, 41, -1, 43, + -1, -1, -1, 47, -1, -1, 40, 41, -1, 43, + -1, -1, 56, 47, -1, 59, -1, -1, -1, -1, + 64, 65, 56, -1, -1, 59, -1, 97, 98, -1, + -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, + -1, -1, 53, 97, 98, -1, -1, 58, -1, -1, + -1, -1, 63, 97, 98, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 53, -1, -1, -1, + -1, 58, -1, -1, -1, -1, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, -1, -1, -1, -1, 19, 97, - 98, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, - -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, 40, 41, -1, 43, -1, - -1, 56, 47, -1, 59, -1, -1, -1, -1, 64, - 65, 56, -1, -1, 59, -1, 97, 98, -1, -1, - -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, -1, -1, -1, -1, -1, -1, - -1, 53, 97, 98, -1, -1, 58, -1, -1, -1, - -1, 63, 97, 98, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 53, -1, -1, -1, -1, - 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 53, -1, -1, -1, -1, 58, + -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 53, -1, -1, -1, -1, 58, -1, - -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 53, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, @@ -4456,9 +4544,8 @@ namespace xsk { namespace gsc { namespace h2 { -1, -1, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, -1, -1, -1, 90, -1, 92, 93, 94, 95, 96, 66, - 67, -1, -1, 70, 71, 72, 73, 74, 75, 66, 67, -1, -1, -1, -1, 72, 73, 74, 75, -1, - -1, -1, -1, -1, -1, 92, 93, 94, 95, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, 95, 96 }; @@ -4466,51 +4553,52 @@ namespace xsk { namespace gsc { namespace h2 { parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 47, 98, 114, 115, - 116, 117, 118, 119, 120, 121, 188, 97, 98, 189, - 189, 52, 0, 116, 117, 118, 52, 78, 62, 62, - 99, 191, 169, 188, 16, 40, 41, 42, 43, 44, + 116, 117, 118, 119, 120, 121, 191, 97, 98, 192, + 192, 52, 0, 116, 117, 118, 52, 78, 62, 62, + 99, 194, 169, 191, 16, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, 93, 96, 98, 100, 101, 102, 153, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 53, 53, 58, 56, 188, 189, 56, - 188, 189, 56, 153, 56, 57, 153, 170, 171, 188, - 153, 153, 52, 56, 101, 102, 164, 165, 173, 174, - 176, 177, 181, 182, 183, 184, 188, 189, 98, 62, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 53, 53, 58, 56, 191, 192, 56, + 191, 192, 56, 153, 56, 57, 153, 170, 171, 191, + 153, 153, 52, 56, 101, 102, 164, 165, 176, 177, + 179, 180, 184, 185, 186, 187, 191, 192, 98, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, 93, 94, 95, 96, 56, - 59, 166, 167, 188, 52, 60, 62, 54, 127, 188, + 59, 166, 167, 191, 52, 60, 62, 54, 127, 191, 56, 52, 60, 56, 52, 60, 56, 53, 58, 153, 58, 57, 153, 56, 59, 60, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 47, 98, 187, 170, - 171, 188, 11, 19, 22, 23, 24, 26, 27, 28, + 153, 153, 153, 153, 153, 153, 47, 98, 190, 170, + 171, 191, 11, 19, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 55, 64, 65, 122, 123, 125, 126, 127, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 155, 156, 157, 164, 165, 173, 174, 177, - 188, 153, 170, 188, 153, 170, 188, 153, 153, 57, - 153, 153, 188, 61, 57, 53, 52, 12, 122, 124, - 153, 62, 52, 62, 52, 122, 52, 52, 52, 52, - 93, 191, 194, 61, 62, 62, 62, 153, 62, 52, - 52, 177, 177, 55, 123, 62, 62, 62, 62, 62, - 17, 18, 20, 21, 64, 65, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 57, 53, 52, - 57, 53, 52, 57, 58, 57, 153, 170, 12, 122, - 62, 53, 153, 27, 153, 128, 155, 156, 157, 177, - 188, 153, 61, 61, 62, 170, 170, 52, 52, 52, - 52, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 57, 170, 57, 170, 57, 153, 52, 53, - 62, 53, 52, 53, 62, 30, 58, 53, 53, 53, - 153, 153, 153, 153, 52, 53, 52, 53, 52, 53, - 170, 122, 153, 122, 153, 154, 153, 188, 127, 62, - 62, 53, 53, 58, 53, 58, 53, 58, 170, 170, - 170, 53, 25, 53, 62, 53, 30, 62, 62, 171, - 62, 171, 62, 171, 53, 53, 53, 122, 62, 128, - 122, 153, 53, 53, 53, 53, 53, 62, 62, 62, - 122, 122 + 55, 56, 64, 65, 122, 123, 125, 126, 127, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 155, 156, 157, 164, 165, 173, 176, + 177, 180, 191, 153, 170, 191, 153, 170, 191, 153, + 153, 57, 153, 153, 191, 61, 57, 53, 52, 12, + 122, 124, 153, 62, 52, 62, 52, 122, 52, 52, + 52, 52, 93, 194, 197, 61, 62, 62, 62, 153, + 62, 52, 52, 56, 174, 175, 176, 177, 191, 180, + 180, 55, 123, 62, 62, 62, 62, 62, 78, 17, + 18, 20, 21, 64, 65, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 57, 53, 52, 57, + 53, 52, 57, 58, 57, 153, 170, 12, 122, 62, + 53, 153, 27, 153, 128, 155, 156, 157, 180, 191, + 153, 61, 61, 62, 170, 170, 57, 58, 153, 52, + 52, 52, 52, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 57, 170, 57, 170, 57, 153, + 52, 53, 62, 53, 52, 53, 62, 30, 58, 53, + 53, 53, 175, 153, 153, 153, 153, 52, 53, 52, + 53, 52, 53, 170, 122, 153, 122, 153, 154, 153, + 191, 127, 62, 62, 53, 53, 58, 53, 58, 53, + 58, 170, 170, 170, 53, 25, 53, 62, 53, 30, + 62, 62, 171, 62, 171, 62, 171, 53, 53, 53, + 122, 62, 128, 122, 153, 53, 53, 53, 53, 53, + 62, 62, 62, 122, 122 }; const unsigned char @@ -4526,19 +4614,20 @@ namespace xsk { namespace gsc { namespace h2 { 135, 135, 136, 137, 137, 138, 139, 140, 141, 142, 143, 143, 144, 145, 145, 146, 147, 148, 149, 149, 150, 151, 152, 153, 153, 153, 154, 154, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, - 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 156, 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, + 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 161, 162, 162, 162, 162, 163, 164, 164, 165, 165, - 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, - 168, 169, 169, 169, 170, 170, 171, 171, 172, 172, - 173, 174, 175, 176, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 188, 189, 189, 190, 191, 192, - 193, 193, 194, 194, 195, 196 + 160, 161, 162, 162, 162, 162, 163, 164, 164, 165, + 165, 166, 166, 166, 166, 166, 166, 167, 167, 167, + 167, 168, 169, 169, 169, 170, 170, 171, 171, 172, + 172, 173, 174, 174, 175, 175, 175, 176, 177, 178, + 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 191, 192, 192, 193, 194, 195, 196, 196, 197, + 197, 198, 199 }; const signed char @@ -4554,19 +4643,20 @@ namespace xsk { namespace gsc { namespace h2 { 8, 6, 2, 2, 4, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, - 4, 6, 5, 7, 5, 7, 8, 9, 9, 9, - 3, 3, 1, 0, 1, 0, 3, 1, 2, 3, - 4, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 7, - 2, 1, 2, 1, 1, 1 + 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, + 2, 4, 6, 5, 7, 5, 7, 8, 9, 9, + 9, 3, 3, 1, 0, 1, 0, 3, 1, 2, + 3, 3, 3, 1, 1, 1, 1, 4, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, + 1, 1, 1 }; @@ -4576,29 +4666,30 @@ namespace xsk { namespace gsc { namespace h2 { const short parser::yyrline_[] = { - 0, 260, 260, 261, 265, 267, 269, 271, 273, 275, - 280, 284, 289, 290, 291, 292, 293, 297, 302, 307, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 340, 341, 345, 347, 352, - 354, 359, 360, 364, 365, 369, 371, 373, 376, 380, - 382, 387, 389, 391, 396, 401, 403, 408, 413, 415, - 420, 422, 427, 432, 434, 439, 444, 449, 454, 459, - 464, 466, 471, 476, 478, 483, 488, 493, 498, 500, - 505, 510, 515, 520, 521, 522, 526, 527, 531, 533, - 535, 537, 539, 541, 543, 545, 547, 549, 551, 556, - 558, 563, 565, 570, 575, 577, 579, 581, 583, 585, - 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, - 607, 609, 614, 615, 616, 617, 618, 619, 620, 621, - 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, - 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, - 645, 650, 652, 654, 656, 661, 666, 667, 670, 671, - 675, 677, 679, 681, 683, 685, 690, 692, 694, 696, - 701, 706, 708, 711, 715, 718, 722, 724, 729, 731, - 736, 741, 746, 751, 756, 757, 758, 759, 760, 761, - 762, 763, 764, 768, 773, 778, 783, 788, 793, 798, - 803, 808, 813, 818, 820, 825, 827, 832, 837, 842, - 847, 849, 854, 856, 861, 866 + 0, 263, 263, 264, 268, 270, 272, 274, 276, 278, + 283, 287, 292, 293, 294, 295, 296, 300, 305, 310, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 343, 344, 348, 350, 355, + 357, 362, 363, 367, 368, 372, 374, 376, 379, 383, + 385, 390, 392, 394, 399, 404, 406, 411, 416, 418, + 423, 425, 430, 435, 437, 442, 447, 452, 457, 462, + 467, 469, 474, 479, 481, 486, 491, 496, 501, 503, + 508, 513, 518, 523, 524, 525, 529, 530, 534, 536, + 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, + 561, 563, 568, 570, 575, 580, 582, 584, 586, 588, + 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, + 610, 612, 614, 619, 620, 621, 622, 623, 624, 625, + 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, + 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, + 646, 650, 655, 657, 659, 661, 666, 671, 672, 675, + 676, 680, 682, 684, 686, 688, 690, 695, 697, 699, + 701, 706, 711, 713, 716, 720, 723, 727, 729, 734, + 736, 741, 746, 748, 753, 754, 755, 759, 764, 769, + 774, 779, 780, 781, 782, 783, 784, 785, 786, 787, + 791, 796, 801, 806, 811, 816, 821, 826, 831, 836, + 841, 843, 848, 850, 855, 860, 865, 870, 872, 877, + 879, 884, 889 }; void @@ -4631,9 +4722,9 @@ namespace xsk { namespace gsc { namespace h2 { #line 13 "parser.ypp" } } } // xsk::gsc::h2 -#line 4635 "parser.cpp" +#line 4726 "parser.cpp" -#line 870 "parser.ypp" +#line 893 "parser.ypp" void xsk::gsc::h2::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/h2/xsk/parser.hpp b/src/h2/xsk/parser.hpp index 49af33ab..42b36b42 100644 --- a/src/h2/xsk/parser.hpp +++ b/src/h2/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace h2 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,104 +540,107 @@ namespace xsk { namespace gsc { namespace h2 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe - char dummy63[sizeof (ast::stmt_waitframe::ptr)]; + char dummy64[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill - char dummy64[sizeof (ast::stmt_waittill::ptr)]; + char dummy65[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy66[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy67[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy67[sizeof (ast::stmt_while::ptr)]; + char dummy68[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -643,7 +648,7 @@ namespace xsk { namespace gsc { namespace h2 { // "localized string" // "float" // "integer" - char dummy68[sizeof (std::string)]; + char dummy69[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -997,30 +1002,33 @@ namespace xsk { namespace gsc { namespace h2 { S_expr_arguments = 170, // expr_arguments S_expr_arguments_no_empty = 171, // expr_arguments_no_empty S_expr_reference = 172, // expr_reference - S_expr_array = 173, // expr_array - S_expr_field = 174, // expr_field - S_expr_size = 175, // expr_size - S_expr_paren = 176, // expr_paren - S_expr_object = 177, // expr_object - S_expr_thisthread = 178, // expr_thisthread - S_expr_empty_array = 179, // expr_empty_array - S_expr_undefined = 180, // expr_undefined - S_expr_game = 181, // expr_game - S_expr_self = 182, // expr_self - S_expr_anim = 183, // expr_anim - S_expr_level = 184, // expr_level - S_expr_animation = 185, // expr_animation - S_expr_animtree = 186, // expr_animtree - S_expr_identifier_nosize = 187, // expr_identifier_nosize - S_expr_identifier = 188, // expr_identifier - S_expr_path = 189, // expr_path - S_expr_istring = 190, // expr_istring - S_expr_string = 191, // expr_string - S_expr_vector = 192, // expr_vector - S_expr_float = 193, // expr_float - S_expr_integer = 194, // expr_integer - S_expr_false = 195, // expr_false - S_expr_true = 196 // expr_true + S_expr_tuple = 173, // expr_tuple + S_expr_tuple_arguments = 174, // expr_tuple_arguments + S_expr_tuple_types = 175, // expr_tuple_types + S_expr_array = 176, // expr_array + S_expr_field = 177, // expr_field + S_expr_size = 178, // expr_size + S_expr_paren = 179, // expr_paren + S_expr_object = 180, // expr_object + S_expr_thisthread = 181, // expr_thisthread + S_expr_empty_array = 182, // expr_empty_array + S_expr_undefined = 183, // expr_undefined + S_expr_game = 184, // expr_game + S_expr_self = 185, // expr_self + S_expr_anim = 186, // expr_anim + S_expr_level = 187, // expr_level + S_expr_animation = 188, // expr_animation + S_expr_animtree = 189, // expr_animtree + S_expr_identifier_nosize = 190, // expr_identifier_nosize + S_expr_identifier = 191, // expr_identifier + S_expr_path = 192, // expr_path + S_expr_istring = 193, // expr_istring + S_expr_string = 194, // expr_string + S_expr_vector = 195, // expr_vector + S_expr_float = 196, // expr_float + S_expr_integer = 197, // expr_integer + S_expr_false = 198, // expr_false + S_expr_true = 199 // expr_true }; }; @@ -1086,6 +1094,8 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1208,6 +1218,10 @@ namespace xsk { namespace gsc { namespace h2 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1861,6 +1875,20 @@ namespace xsk { namespace gsc { namespace h2 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2376,6 +2404,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2498,6 +2528,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4839,8 +4873,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2419, ///< Last index in yytable_. - yynnts_ = 84, ///< Number of nonterminal symbols. + yylast_ = 2479, ///< Last index in yytable_. + yynnts_ = 87, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4896,6 +4930,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -5018,6 +5054,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5218,6 +5258,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5340,6 +5382,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5547,7 +5593,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::h2 -#line 5551 "parser.hpp" +#line 5597 "parser.hpp" diff --git a/src/h2/xsk/resolver.cpp b/src/h2/xsk/resolver.cpp index ec59925e..ba988f01 100644 --- a/src/h2/xsk/resolver.cpp +++ b/src/h2/xsk/resolver.cpp @@ -45,7 +45,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -57,7 +57,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -74,7 +74,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -103,7 +103,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/iw5/xsk/assembler.cpp b/src/iw5/xsk/assembler.cpp index 4345d7a3..54c3d1ab 100644 --- a/src/iw5/xsk/assembler.cpp +++ b/src/iw5/xsk/assembler.cpp @@ -383,7 +383,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -490,6 +490,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -553,7 +557,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -566,7 +570,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::iw5 diff --git a/src/iw5/xsk/compiler.cpp b/src/iw5/xsk/compiler.cpp index 83b0818d..7f574efe 100644 --- a/src/iw5/xsk/compiler.cpp +++ b/src/iw5/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -392,7 +397,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1030,11 +1035,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1540,7 +1552,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1585,6 +1597,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1624,7 +1659,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1710,7 +1745,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2238,7 +2273,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2305,11 +2340,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2332,11 +2367,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2364,7 +2399,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2373,7 +2408,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2381,8 +2416,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2414,13 +2449,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2580,23 +2615,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2623,7 +2675,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2637,7 +2689,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2650,7 +2701,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2828,8 +2879,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2844,7 +2894,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2877,7 +2927,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/iw5/xsk/compiler.hpp b/src/iw5/xsk/compiler.hpp index 7c1ced6e..e2f087db 100644 --- a/src/iw5/xsk/compiler.hpp +++ b/src/iw5/xsk/compiler.hpp @@ -95,6 +95,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -136,10 +137,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/iw5/xsk/decompiler.cpp b/src/iw5/xsk/decompiler.cpp index 0b9fcaa0..762b97d6 100644 --- a/src/iw5/xsk/decompiler.cpp +++ b/src/iw5/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,39 +1228,39 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1272,69 +1269,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1343,98 +1339,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1442,256 +1440,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1711,7 +1696,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1738,7 +1723,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1765,7 +1750,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1773,9 +1757,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1786,60 +1771,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1969,7 +1932,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2003,7 +1966,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2020,7 +1983,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2149,7 +2112,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2209,7 +2172,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2241,7 +2204,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2372,17 +2335,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2415,7 +2378,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2426,17 +2389,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2480,7 +2443,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2632,7 +2595,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2736,8 +2699,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2981,7 +2944,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3010,7 +2973,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3050,7 +3013,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3172,9 +3135,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3423,11 +3383,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3445,7 +3400,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3463,7 +3418,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/iw5/xsk/decompiler.hpp b/src/iw5/xsk/decompiler.hpp index 9b739090..8c8506eb 100644 --- a/src/iw5/xsk/decompiler.hpp +++ b/src/iw5/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/iw5/xsk/disassembler.cpp b/src/iw5/xsk/disassembler.cpp index 9d148ad7..fc1abdd3 100644 --- a/src/iw5/xsk/disassembler.cpp +++ b/src/iw5/xsk/disassembler.cpp @@ -299,7 +299,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -493,7 +493,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); diff --git a/src/iw5/xsk/iw5.cpp b/src/iw5/xsk/iw5.cpp index 57d29606..f0453f50 100644 --- a/src/iw5/xsk/iw5.cpp +++ b/src/iw5/xsk/iw5.cpp @@ -172,7 +172,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/iw5/xsk/lexer.cpp b/src/iw5/xsk/lexer.cpp index 33a3ca0b..b48fb6f5 100644 --- a/src/iw5/xsk/lexer.cpp +++ b/src/iw5/xsk/lexer.cpp @@ -682,7 +682,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -716,7 +716,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -750,7 +750,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/iw5/xsk/parser.cpp b/src/iw5/xsk/parser.cpp index a9eae7aa..4e409cc8 100644 --- a/src/iw5/xsk/parser.cpp +++ b/src/iw5/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace iw5 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -546,6 +552,8 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -668,6 +676,10 @@ namespace xsk { namespace gsc { namespace iw5 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -848,6 +860,8 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -970,6 +984,10 @@ namespace xsk { namespace gsc { namespace iw5 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1149,6 +1167,8 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1271,6 +1291,10 @@ namespace xsk { namespace gsc { namespace iw5 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1705,6 +1729,8 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1827,6 +1853,10 @@ namespace xsk { namespace gsc { namespace iw5 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -1984,1333 +2014,1375 @@ namespace xsk { namespace gsc { namespace iw5 { switch (yyn) { case 2: // root: program -#line 258 "parser.ypp" +#line 261 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 1990 "parser.cpp" - break; - - case 3: // root: %empty -#line 259 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 1996 "parser.cpp" - break; - - case 4: // program: program inline -#line 264 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2002 "parser.cpp" - break; - - case 5: // program: program include -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2008 "parser.cpp" - break; - - case 6: // program: program declaration -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2014 "parser.cpp" - break; - - case 7: // program: inline -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; - case 8: // program: include -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 262 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2026 "parser.cpp" break; - case 9: // program: declaration -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 267 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2032 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 278 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2038 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 283 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2044 "parser.cpp" break; - case 12: // declaration: "/#" -#line 287 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; - case 13: // declaration: "#/" -#line 288 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2056 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2062 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 281 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2068 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 286 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2074 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 296 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 290 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2080 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 301 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 291 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2086 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 306 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2092 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 310 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2098 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 311 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2104 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 299 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2110 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 304 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2116 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 309 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2122 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 313 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2128 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 314 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2134 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2140 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2146 "parser.cpp" break; - case 29: // stmt: stmt_if -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 24: // stmt: stmt_notify +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2152 "parser.cpp" break; - case 30: // stmt: stmt_ifelse -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 25: // stmt: stmt_wait +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2158 "parser.cpp" break; - case 31: // stmt: stmt_while -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2164 "parser.cpp" break; - case 32: // stmt: stmt_dowhile -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2170 "parser.cpp" break; - case 33: // stmt: stmt_for -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2176 "parser.cpp" break; - case 34: // stmt: stmt_foreach -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 29: // stmt: stmt_if +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2182 "parser.cpp" break; - case 35: // stmt: stmt_switch -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 30: // stmt: stmt_ifelse +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2188 "parser.cpp" break; - case 36: // stmt: stmt_case -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 31: // stmt: stmt_while +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2194 "parser.cpp" break; - case 37: // stmt: stmt_default -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 32: // stmt: stmt_dowhile +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2200 "parser.cpp" break; - case 38: // stmt: stmt_break -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 33: // stmt: stmt_for +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2206 "parser.cpp" break; - case 39: // stmt: stmt_continue -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 34: // stmt: stmt_foreach +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2212 "parser.cpp" break; - case 40: // stmt: stmt_return -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 35: // stmt: stmt_switch +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2218 "parser.cpp" break; - case 41: // stmt: stmt_breakpoint -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 36: // stmt: stmt_case +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2224 "parser.cpp" break; - case 42: // stmt: stmt_prof_begin -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 37: // stmt: stmt_default +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2230 "parser.cpp" break; - case 43: // stmt: stmt_prof_end -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 38: // stmt: stmt_break +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2236 "parser.cpp" break; - case 44: // stmt_or_dev: stmt -#line 337 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 39: // stmt: stmt_continue +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2242 "parser.cpp" break; - case 45: // stmt_or_dev: stmt_dev -#line 338 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 40: // stmt: stmt_return +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2248 "parser.cpp" break; - case 46: // stmt_list: stmt_list stmt -#line 343 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 41: // stmt: stmt_breakpoint +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2254 "parser.cpp" break; - case 47: // stmt_list: stmt -#line 345 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_prof_begin +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2260 "parser.cpp" break; - case 48: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 350 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_end +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2266 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev -#line 352 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt_or_dev: stmt +#line 340 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2272 "parser.cpp" break; - case 50: // stmt_dev: "/#" stmt_list "#/" -#line 356 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 45: // stmt_or_dev: stmt_dev +#line 341 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2278 "parser.cpp" break; - case 51: // stmt_dev: "/#" "#/" -#line 357 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 46: // stmt_list: stmt_list stmt +#line 346 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2284 "parser.cpp" break; - case 52: // stmt_block: "{" stmt_or_dev_list "}" -#line 361 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 47: // stmt_list: stmt +#line 348 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2290 "parser.cpp" break; - case 53: // stmt_block: "{" "}" -#line 362 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 48: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 353 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2296 "parser.cpp" break; - case 54: // stmt_expr: expr_assign -#line 367 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 49: // stmt_or_dev_list: stmt_or_dev +#line 355 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2302 "parser.cpp" break; - case 55: // stmt_expr: expr_increment -#line 369 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_dev: "/#" stmt_list "#/" +#line 359 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2308 "parser.cpp" break; - case 56: // stmt_expr: expr_decrement -#line 371 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" "#/" +#line 360 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2314 "parser.cpp" break; - case 57: // stmt_expr: %empty -#line 373 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 52: // stmt_block: "{" stmt_or_dev_list "}" +#line 364 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2320 "parser.cpp" break; - case 58: // stmt_call: expr_call ";" -#line 378 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 53: // stmt_block: "{" "}" +#line 365 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2326 "parser.cpp" break; - case 59: // stmt_call: expr_method ";" -#line 380 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 54: // stmt_expr: expr_assign +#line 370 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; - case 60: // stmt_assign: expr_assign ";" -#line 385 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 55: // stmt_expr: expr_increment +#line 372 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; - case 61: // stmt_assign: expr_increment ";" -#line 387 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_decrement +#line 374 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2344 "parser.cpp" break; - case 62: // stmt_assign: expr_decrement ";" -#line 389 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: %empty +#line 376 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2350 "parser.cpp" break; - case 63: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 394 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 58: // stmt_call: expr_call ";" +#line 381 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2356 "parser.cpp" break; - case 64: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 399 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 59: // stmt_call: expr_method ";" +#line 383 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2362 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 401 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 60: // stmt_assign: expr_assign ";" +#line 388 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2368 "parser.cpp" break; - case 66: // stmt_wait: "wait" expr ";" -#line 406 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 61: // stmt_assign: expr_increment ";" +#line 390 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2374 "parser.cpp" break; - case 67: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 411 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 62: // stmt_assign: expr_decrement ";" +#line 392 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2380 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 413 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 63: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 397 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2386 "parser.cpp" break; - case 69: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 418 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 64: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 402 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2392 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 420 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 65: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 404 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2398 "parser.cpp" break; - case 71: // stmt_waittillframeend: "waittillframeend" ";" -#line 425 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 66: // stmt_wait: "wait" expr ";" +#line 409 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2404 "parser.cpp" break; - case 72: // stmt_if: "if" "(" expr ")" stmt -#line 430 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 67: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 414 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2410 "parser.cpp" break; - case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 416 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2416 "parser.cpp" break; - case 74: // stmt_while: "while" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 69: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 421 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2422 "parser.cpp" break; - case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 423 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2428 "parser.cpp" break; - case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillframeend: "waittillframeend" ";" +#line 428 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2434 "parser.cpp" break; - case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_if: "if" "(" expr ")" stmt +#line 433 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2440 "parser.cpp" break; - case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 457 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2446 "parser.cpp" break; - case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 462 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 74: // stmt_while: "while" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2452 "parser.cpp" break; - case 80: // stmt_case: "case" expr_integer ":" -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2458 "parser.cpp" break; - case 81: // stmt_case: "case" expr_string ":" -#line 469 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2464 "parser.cpp" break; - case 82: // stmt_default: "default" ":" -#line 474 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2470 "parser.cpp" break; - case 83: // stmt_break: "break" ";" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 460 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2476 "parser.cpp" break; - case 84: // stmt_continue: "continue" ";" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 79: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 465 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2482 "parser.cpp" break; - case 85: // stmt_return: "return" expr ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 80: // stmt_case: "case" expr_integer ":" +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2488 "parser.cpp" break; - case 86: // stmt_return: "return" ";" -#line 491 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 81: // stmt_case: "case" expr_string ":" +#line 472 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; - case 87: // stmt_breakpoint: "breakpoint" ";" -#line 496 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_default: "default" ":" +#line 477 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2500 "parser.cpp" break; - case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 83: // stmt_break: "break" ";" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2506 "parser.cpp" break; - case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 84: // stmt_continue: "continue" ";" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2512 "parser.cpp" break; - case 90: // expr: expr_ternary -#line 510 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 85: // stmt_return: "return" expr ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2518 "parser.cpp" break; - case 91: // expr: expr_binary -#line 511 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 86: // stmt_return: "return" ";" +#line 494 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2524 "parser.cpp" break; - case 92: // expr: expr_primitive -#line 512 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 87: // stmt_breakpoint: "breakpoint" ";" +#line 499 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2530 "parser.cpp" break; - case 93: // expr_or_empty: expr -#line 516 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2536 "parser.cpp" break; - case 94: // expr_or_empty: %empty -#line 517 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2542 "parser.cpp" break; - case 95: // expr_assign: expr_object "=" expr -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 90: // expr: expr_ternary +#line 513 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2548 "parser.cpp" break; - case 96: // expr_assign: expr_object "|=" expr -#line 524 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 91: // expr: expr_binary +#line 514 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2554 "parser.cpp" break; - case 97: // expr_assign: expr_object "&=" expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 92: // expr: expr_primitive +#line 515 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2560 "parser.cpp" break; - case 98: // expr_assign: expr_object "^=" expr -#line 528 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr_or_empty: expr +#line 519 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2566 "parser.cpp" break; - case 99: // expr_assign: expr_object "<<=" expr -#line 530 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 94: // expr_or_empty: %empty +#line 520 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2572 "parser.cpp" break; - case 100: // expr_assign: expr_object ">>=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr_assign: expr_tuple "=" expr +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2578 "parser.cpp" break; - case 101: // expr_assign: expr_object "+=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_assign: expr_object "=" expr +#line 527 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2584 "parser.cpp" break; - case 102: // expr_assign: expr_object "-=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_assign: expr_object "|=" expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2590 "parser.cpp" break; - case 103: // expr_assign: expr_object "*=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_object "&=" expr +#line 531 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2596 "parser.cpp" break; - case 104: // expr_assign: expr_object "/=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "^=" expr +#line 533 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2602 "parser.cpp" break; - case 105: // expr_assign: expr_object "%=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "<<=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2608 "parser.cpp" break; - case 106: // expr_increment: "++" expr_object -#line 547 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 101: // expr_assign: expr_object ">>=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2614 "parser.cpp" break; - case 107: // expr_increment: expr_object "++" -#line 549 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 102: // expr_assign: expr_object "+=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2620 "parser.cpp" break; - case 108: // expr_decrement: "--" expr_object -#line 554 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 103: // expr_assign: expr_object "-=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2626 "parser.cpp" break; - case 109: // expr_decrement: expr_object "--" -#line 556 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 104: // expr_assign: expr_object "*=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2632 "parser.cpp" break; - case 110: // expr_ternary: expr "?" expr ":" expr -#line 561 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 105: // expr_assign: expr_object "/=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2638 "parser.cpp" break; - case 111: // expr_binary: expr "||" expr -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 106: // expr_assign: expr_object "%=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2644 "parser.cpp" break; - case 112: // expr_binary: expr "&&" expr -#line 568 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 107: // expr_increment: "++" expr_object +#line 552 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2650 "parser.cpp" break; - case 113: // expr_binary: expr "==" expr -#line 570 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_increment: expr_object "++" +#line 554 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2656 "parser.cpp" break; - case 114: // expr_binary: expr "!=" expr -#line 572 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_decrement: "--" expr_object +#line 559 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2662 "parser.cpp" break; - case 115: // expr_binary: expr "<=" expr -#line 574 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_decrement: expr_object "--" +#line 561 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2668 "parser.cpp" break; - case 116: // expr_binary: expr ">=" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_ternary: expr "?" expr ":" expr +#line 566 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2674 "parser.cpp" break; - case 117: // expr_binary: expr "<" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_binary: expr "||" expr +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2680 "parser.cpp" break; - case 118: // expr_binary: expr ">" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_binary: expr "&&" expr +#line 573 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2686 "parser.cpp" break; - case 119: // expr_binary: expr "|" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_binary: expr "==" expr +#line 575 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2692 "parser.cpp" break; - case 120: // expr_binary: expr "&" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "!=" expr +#line 577 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2698 "parser.cpp" break; - case 121: // expr_binary: expr "^" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "<=" expr +#line 579 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2704 "parser.cpp" break; - case 122: // expr_binary: expr "<<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr ">=" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2710 "parser.cpp" break; - case 123: // expr_binary: expr ">>" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "<" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2716 "parser.cpp" break; - case 124: // expr_binary: expr "+" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr ">" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2722 "parser.cpp" break; - case 125: // expr_binary: expr "-" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr "|" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2728 "parser.cpp" break; - case 126: // expr_binary: expr "*" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "&" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2734 "parser.cpp" break; - case 127: // expr_binary: expr "/" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr "^" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2740 "parser.cpp" break; - case 128: // expr_binary: expr "%" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "<<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2746 "parser.cpp" break; - case 129: // expr_primitive: expr_complement -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 124: // expr_binary: expr ">>" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2752 "parser.cpp" break; - case 130: // expr_primitive: expr_negate -#line 605 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 125: // expr_binary: expr "+" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2758 "parser.cpp" break; - case 131: // expr_primitive: expr_not -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 126: // expr_binary: expr "-" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2764 "parser.cpp" break; - case 132: // expr_primitive: expr_call -#line 607 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 127: // expr_binary: expr "*" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2770 "parser.cpp" break; - case 133: // expr_primitive: expr_method -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 128: // expr_binary: expr "/" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2776 "parser.cpp" break; - case 134: // expr_primitive: expr_add_array -#line 609 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 129: // expr_binary: expr "%" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2782 "parser.cpp" break; - case 135: // expr_primitive: expr_reference -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 130: // expr_primitive: expr_complement +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2788 "parser.cpp" break; - case 136: // expr_primitive: expr_array -#line 611 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 131: // expr_primitive: expr_negate +#line 610 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2794 "parser.cpp" break; - case 137: // expr_primitive: expr_field -#line 612 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 132: // expr_primitive: expr_not +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2800 "parser.cpp" break; - case 138: // expr_primitive: expr_size -#line 613 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 133: // expr_primitive: expr_call +#line 612 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2806 "parser.cpp" break; - case 139: // expr_primitive: expr_paren -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 134: // expr_primitive: expr_method +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2812 "parser.cpp" break; - case 140: // expr_primitive: expr_thisthread -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 135: // expr_primitive: expr_add_array +#line 614 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2818 "parser.cpp" break; - case 141: // expr_primitive: expr_empty_array -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 136: // expr_primitive: expr_reference +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2824 "parser.cpp" break; - case 142: // expr_primitive: expr_undefined -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 137: // expr_primitive: expr_array +#line 616 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2830 "parser.cpp" break; - case 143: // expr_primitive: expr_game -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 138: // expr_primitive: expr_field +#line 617 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2836 "parser.cpp" break; - case 144: // expr_primitive: expr_self -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 139: // expr_primitive: expr_size +#line 618 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2842 "parser.cpp" break; - case 145: // expr_primitive: expr_anim -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 140: // expr_primitive: expr_paren +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2848 "parser.cpp" break; - case 146: // expr_primitive: expr_level -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 141: // expr_primitive: expr_thisthread +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2854 "parser.cpp" break; - case 147: // expr_primitive: expr_animation -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 142: // expr_primitive: expr_empty_array +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2860 "parser.cpp" break; - case 148: // expr_primitive: expr_animtree -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 143: // expr_primitive: expr_undefined +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2866 "parser.cpp" break; - case 149: // expr_primitive: expr_identifier -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 144: // expr_primitive: expr_game +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2872 "parser.cpp" break; - case 150: // expr_primitive: expr_istring -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 145: // expr_primitive: expr_self +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2878 "parser.cpp" break; - case 151: // expr_primitive: expr_string -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 146: // expr_primitive: expr_anim +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2884 "parser.cpp" break; - case 152: // expr_primitive: expr_vector -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 147: // expr_primitive: expr_level +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2890 "parser.cpp" break; - case 153: // expr_primitive: expr_float -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 148: // expr_primitive: expr_animation +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2896 "parser.cpp" break; - case 154: // expr_primitive: expr_integer -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 149: // expr_primitive: expr_animtree +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2902 "parser.cpp" break; - case 155: // expr_primitive: expr_false -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 150: // expr_primitive: expr_identifier +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2908 "parser.cpp" break; - case 156: // expr_primitive: expr_true -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 151: // expr_primitive: expr_istring +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2914 "parser.cpp" break; - case 157: // expr_complement: "~" expr -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 152: // expr_primitive: expr_string +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2920 "parser.cpp" break; - case 158: // expr_negate: "-" expr_identifier -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 153: // expr_primitive: expr_vector +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2926 "parser.cpp" break; - case 159: // expr_negate: "-" expr_paren -#line 643 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 154: // expr_primitive: expr_float +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2932 "parser.cpp" break; - case 160: // expr_negate: "-" expr_array -#line 645 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 155: // expr_primitive: expr_integer +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2938 "parser.cpp" break; - case 161: // expr_negate: "-" expr_field -#line 647 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 156: // expr_primitive: expr_false +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2944 "parser.cpp" break; - case 162: // expr_not: "!" expr -#line 652 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 157: // expr_primitive: expr_true +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2950 "parser.cpp" break; - case 163: // expr_call: expr_function -#line 656 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 158: // expr_complement: "~" expr +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2956 "parser.cpp" break; - case 164: // expr_call: expr_pointer -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 159: // expr_negate: "-" expr_identifier +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 2962 "parser.cpp" break; - case 165: // expr_method: expr_object expr_function -#line 660 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 160: // expr_negate: "-" expr_paren +#line 648 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 2968 "parser.cpp" break; - case 166: // expr_method: expr_object expr_pointer -#line 661 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_negate: "-" expr_array +#line 650 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 2974 "parser.cpp" break; - case 167: // expr_function: expr_identifier "(" expr_arguments ")" -#line 666 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 162: // expr_negate: "-" expr_field +#line 652 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 2980 "parser.cpp" break; - case 168: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 668 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 163: // expr_not: "!" expr +#line 657 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2986 "parser.cpp" break; - case 169: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 670 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 164: // expr_call: expr_function +#line 661 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2992 "parser.cpp" break; - case 170: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 672 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 165: // expr_call: expr_pointer +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2998 "parser.cpp" break; - case 171: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 674 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 166: // expr_method: expr_object expr_function +#line 665 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3004 "parser.cpp" break; - case 172: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 167: // expr_method: expr_object expr_pointer +#line 666 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3010 "parser.cpp" break; - case 173: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 681 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 168: // expr_function: expr_identifier "(" expr_arguments ")" +#line 671 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3016 "parser.cpp" break; - case 174: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 683 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 169: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 673 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3022 "parser.cpp" break; - case 175: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 685 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 675 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3028 "parser.cpp" break; - case 176: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 687 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 171: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 677 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3034 "parser.cpp" break; - case 177: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 692 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 172: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 679 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3040 "parser.cpp" break; - case 178: // expr_parameters: expr_parameters "," expr_identifier -#line 697 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 173: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3046 "parser.cpp" break; - case 179: // expr_parameters: expr_identifier -#line 699 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 174: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 686 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3052 "parser.cpp" break; - case 180: // expr_parameters: %empty -#line 701 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 175: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 688 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3058 "parser.cpp" break; - case 181: // expr_arguments: expr_arguments_no_empty -#line 706 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 176: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 690 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3064 "parser.cpp" break; - case 182: // expr_arguments: %empty -#line 708 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 177: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 692 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3070 "parser.cpp" break; - case 183: // expr_arguments_no_empty: expr_arguments "," expr -#line 713 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 178: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 697 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3076 "parser.cpp" break; - case 184: // expr_arguments_no_empty: expr -#line 715 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 179: // expr_parameters: expr_parameters "," expr_identifier +#line 702 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3082 "parser.cpp" break; - case 185: // expr_reference: "::" expr_identifier -#line 720 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 180: // expr_parameters: expr_identifier +#line 704 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3088 "parser.cpp" break; - case 186: // expr_reference: expr_path "::" expr_identifier -#line 722 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 181: // expr_parameters: %empty +#line 706 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3094 "parser.cpp" break; - case 187: // expr_array: expr_object "[" expr "]" -#line 727 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 182: // expr_arguments: expr_arguments_no_empty +#line 711 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3100 "parser.cpp" break; - case 188: // expr_field: expr_object "." expr_identifier_nosize -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_arguments: %empty +#line 713 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3106 "parser.cpp" break; - case 189: // expr_size: expr_object "." "size" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 184: // expr_arguments_no_empty: expr_arguments "," expr +#line 718 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3112 "parser.cpp" break; - case 190: // expr_paren: "(" expr ")" -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments_no_empty: expr +#line 720 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3118 "parser.cpp" break; - case 191: // expr_object: expr_call -#line 746 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 186: // expr_reference: "::" expr_identifier +#line 725 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3124 "parser.cpp" break; - case 192: // expr_object: expr_method -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 187: // expr_reference: expr_path "::" expr_identifier +#line 727 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3130 "parser.cpp" break; - case 193: // expr_object: expr_array -#line 748 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 188: // expr_tuple: "[" expr_tuple_arguments "]" +#line 732 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3136 "parser.cpp" break; - case 194: // expr_object: expr_field -#line 749 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 189: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3142 "parser.cpp" break; - case 195: // expr_object: expr_game -#line 750 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 190: // expr_tuple_arguments: expr_tuple_types +#line 739 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3148 "parser.cpp" break; - case 196: // expr_object: expr_self -#line 751 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 191: // expr_tuple_types: expr_array +#line 743 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3154 "parser.cpp" break; - case 197: // expr_object: expr_anim -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 192: // expr_tuple_types: expr_field +#line 744 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3160 "parser.cpp" break; - case 198: // expr_object: expr_level -#line 753 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 193: // expr_tuple_types: expr_identifier +#line 745 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3166 "parser.cpp" break; - case 199: // expr_object: expr_identifier -#line 754 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 194: // expr_array: expr_object "[" expr "]" +#line 750 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3172 "parser.cpp" break; - case 200: // expr_thisthread: "thisthread" -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 195: // expr_field: expr_object "." expr_identifier_nosize +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3178 "parser.cpp" break; - case 201: // expr_empty_array: "[" "]" -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 196: // expr_size: expr_object "." "size" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3184 "parser.cpp" break; - case 202: // expr_undefined: "undefined" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 197: // expr_paren: "(" expr ")" +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3190 "parser.cpp" break; - case 203: // expr_game: "game" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_object: expr_call +#line 769 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3196 "parser.cpp" break; - case 204: // expr_self: "self" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_object: expr_method +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3202 "parser.cpp" break; - case 205: // expr_anim: "anim" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_object: expr_array +#line 771 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3208 "parser.cpp" break; - case 206: // expr_level: "level" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_field +#line 772 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3214 "parser.cpp" break; - case 207: // expr_animation: "%" "identifier" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 202: // expr_object: expr_game +#line 773 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3220 "parser.cpp" break; - case 208: // expr_animtree: "#animtree" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_self +#line 774 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3226 "parser.cpp" break; - case 209: // expr_identifier_nosize: "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 204: // expr_object: expr_anim +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3232 "parser.cpp" break; - case 210: // expr_identifier: "identifier" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_level +#line 776 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3238 "parser.cpp" break; - case 211: // expr_identifier: "size" -#line 811 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 206: // expr_object: expr_identifier +#line 777 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3244 "parser.cpp" break; - case 212: // expr_path: "identifier" -#line 816 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_thisthread: "thisthread" +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3250 "parser.cpp" break; - case 213: // expr_path: "path" -#line 818 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_empty_array: "[" "]" +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3256 "parser.cpp" break; - case 214: // expr_istring: "localized string" -#line 823 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 209: // expr_undefined: "undefined" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3262 "parser.cpp" break; - case 215: // expr_string: "string literal" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_game: "game" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3268 "parser.cpp" break; - case 216: // expr_vector: "(" expr "," expr "," expr ")" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 211: // expr_self: "self" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3274 "parser.cpp" break; - case 217: // expr_float: "-" "float" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 212: // expr_anim: "anim" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; - case 218: // expr_float: "float" -#line 840 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_level: "level" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; - case 219: // expr_integer: "-" "integer" -#line 845 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 214: // expr_animation: "%" "identifier" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3292 "parser.cpp" break; - case 220: // expr_integer: "integer" -#line 847 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 215: // expr_animtree: "#animtree" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3298 "parser.cpp" break; - case 221: // expr_false: "false" -#line 852 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 216: // expr_identifier_nosize: "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3304 "parser.cpp" break; - case 222: // expr_true: "true" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 217: // expr_identifier: "identifier" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3310 "parser.cpp" break; + case 218: // expr_identifier: "size" +#line 834 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3316 "parser.cpp" + break; -#line 3314 "parser.cpp" + case 219: // expr_path: "identifier" +#line 839 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3322 "parser.cpp" + break; + + case 220: // expr_path: "path" +#line 841 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3328 "parser.cpp" + break; + + case 221: // expr_istring: "localized string" +#line 846 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3334 "parser.cpp" + break; + + case 222: // expr_string: "string literal" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3340 "parser.cpp" + break; + + case 223: // expr_vector: "(" expr "," expr "," expr ")" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3346 "parser.cpp" + break; + + case 224: // expr_float: "-" "float" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3352 "parser.cpp" + break; + + case 225: // expr_float: "float" +#line 863 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3358 "parser.cpp" + break; + + case 226: // expr_integer: "-" "integer" +#line 868 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3364 "parser.cpp" + break; + + case 227: // expr_integer: "integer" +#line 870 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3370 "parser.cpp" + break; + + case 228: // expr_false: "false" +#line 875 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3376 "parser.cpp" + break; + + case 229: // expr_true: "true" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3382 "parser.cpp" + break; + + +#line 3386 "parser.cpp" default: break; @@ -3521,7 +3593,8 @@ namespace xsk { namespace gsc { namespace iw5 { "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", + "expr_tuple", "expr_tuple_arguments", "expr_tuple_types", "expr_array", + "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier_nosize", "expr_identifier", @@ -3795,469 +3868,484 @@ namespace xsk { namespace gsc { namespace iw5 { } - const short parser::yypact_ninf_ = -280; + const short parser::yypact_ninf_ = -281; - const short parser::yytable_ninf_ = -213; + const short parser::yytable_ninf_ = -220; const short parser::yypact_[] = { - 26, -280, -280, -44, -44, -8, -280, -280, 19, 26, - -280, -280, -280, -280, -280, -280, -30, -280, -280, -11, - 2, -75, -280, -280, -280, -280, -38, 1168, -280, -280, - -280, -6, -41, -280, -280, -31, -28, -280, 12, -280, - -280, -280, -280, -280, -280, -280, 1168, 1042, -38, 1168, - 1168, 51, -24, 23, -280, -280, -280, 2072, -280, -280, - -280, -280, -280, -280, 324, 440, -280, -280, -280, -280, - 515, 550, -280, -280, 651, -280, -280, -280, 661, 862, - 867, 1065, -280, -280, 71, 33, -280, -280, -280, -280, - -280, -280, -280, 35, 31, -38, 48, 57, 59, 61, - 73, 66, 76, 1364, 1042, -280, 2155, 77, 87, -280, - -280, -280, 1168, 82, -280, -280, -280, -280, 515, 550, - -280, 1073, -280, -280, -280, -280, 71, 91, -280, -280, - 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, - 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1231, - -36, -280, -280, 105, 1168, -38, -280, 831, -280, -280, - 1168, 1168, -38, 1168, 1168, -38, 1168, -280, 1168, 1164, - 1168, -280, 1530, 1168, 49, -38, 2037, 95, 95, 2186, - 2196, 187, 187, -37, -37, -37, -37, 2227, 2268, 2237, - -62, -62, -280, -280, -280, 1842, -280, -280, -280, -32, - -280, 109, 960, 1168, 100, 112, 1354, 113, 119, 120, - 121, -21, 114, 117, 122, 1105, 123, 129, 130, -280, - 39, 39, -280, -280, 907, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - 133, 135, 136, 137, 138, -280, -280, 1278, 105, 1882, - 18, 150, 1922, 52, 153, 1962, 2001, 151, 2155, 1164, - 109, 1168, -280, -280, 1168, -280, -280, 1013, 2107, -280, - 1168, 182, 1168, 618, -38, 1168, 108, 152, 154, -280, - -280, -280, -280, 2142, -280, 1168, 1168, 1073, 1073, -280, - -280, -280, -280, -280, -280, -280, 159, 162, 166, 167, - -280, -280, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, - 1168, 1168, 1168, 163, -280, 1168, 172, -280, 1168, 176, - 1168, 171, 2155, 55, -280, -280, -280, 1564, 183, 1598, - 175, -280, -280, -280, 696, -15, 1632, -280, -280, -280, - 62, 63, 1168, 1168, 1168, 1168, 2155, 2155, 2155, 2155, - 2155, 2155, 2155, 2155, 2155, 2155, 2155, 186, 75, 191, - 81, 192, 1666, 1168, -280, 1354, 1168, 1354, 1168, 1168, - -38, 31, 190, 194, 1700, 1408, 1452, 1496, 1168, -280, - 1168, -280, 1168, -280, 88, 199, 1734, -280, 2155, 195, - 1768, 221, -280, -280, -280, 202, 203, 1168, 204, 1168, - 208, 1168, 92, 101, 102, -280, 1354, 209, 618, 1354, - 1168, -280, -280, 219, -280, 222, -280, 223, -280, -280, - -280, -280, -280, 224, -280, 1802, 212, 229, 230, 1354, - 1354, -280, -280, -280, -280, -280 + 4, -281, -281, -72, -72, -41, -281, -281, 32, 4, + -281, -281, -281, -281, -281, -281, -21, -281, -281, -28, + -1, -22, -281, -281, -281, -281, -43, 1235, -281, -281, + -281, 5, -29, -281, -281, -26, -24, -281, 8, -281, + -281, -281, -281, -281, -281, -281, 1235, 1109, -43, 1235, + 1235, 612, 1, 47, -281, -281, -281, 2111, -281, -281, + -281, -281, -281, -281, 108, 145, -281, -281, -281, -281, + 372, 438, -281, -281, 633, -281, -281, -281, 664, 818, + 982, 987, -281, -281, 39, 59, -281, -281, -281, -281, + -281, -281, -281, 61, 16, -43, 65, 78, 79, 103, + 109, 127, 133, 1443, 1109, -281, 2194, 125, 136, -281, + -281, -281, 1235, 134, -281, -281, -281, -281, 372, 438, + -281, 1132, -281, -281, -281, -281, 39, 137, -281, -281, + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1298, + -35, -281, -281, 147, 1235, -43, -281, 951, -281, -281, + 1235, 1235, -43, 1235, 1235, -43, 1235, -281, 1235, 1231, + 1235, -281, 1609, 1235, 102, -43, 2076, -51, -51, 2225, + 865, 2276, 2276, -27, -27, -27, -27, 2235, 273, 2266, + 51, 51, -281, -281, -281, 1294, -281, -281, -281, 23, + -281, 150, 77, 1235, 148, 157, 1381, 160, 162, 163, + 166, -15, 158, 165, 167, 1172, 168, 172, 173, -281, + 409, 703, 703, -281, -281, 1027, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, 175, 184, 185, 186, 187, 142, -281, -281, 808, + 147, 1921, 30, 176, 1961, 36, 182, 2001, 2040, 195, + 2194, 1231, 150, 1235, -281, -281, 1235, -281, -281, 1080, + 2146, -281, 1235, 224, 1235, 738, -43, 1235, 151, 193, + 196, -281, -281, -281, -281, 2181, -281, 1235, 1235, 1298, + 35, -281, 112, 123, -4, 1132, 1132, -281, -281, -281, + -281, -281, -281, -281, 1235, 204, 206, 209, 210, -281, + -281, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1235, 207, -281, 1235, 211, -281, 1235, 212, 1235, + 214, 2194, 76, -281, -281, -281, 1643, 215, 1677, 201, + -281, -281, -281, 1407, -8, 1711, -281, -281, -281, 82, + 85, -281, 703, 2194, 1235, 1235, 1235, 1235, 2194, 2194, + 2194, 2194, 2194, 2194, 2194, 2194, 2194, 2194, 2194, 219, + 104, 220, 107, 221, 1745, 1235, -281, 1381, 1235, 1381, + 1235, 1235, -43, 16, 216, 222, -281, 1779, 1487, 1531, + 1575, 1235, -281, 1235, -281, 1235, -281, 120, 249, 1813, + -281, 2194, 223, 1847, 246, -281, -281, -281, 227, 229, + 1235, 232, 1235, 235, 1235, 124, 126, 138, -281, 1381, + 236, 738, 1381, 1235, -281, -281, 228, -281, 230, -281, + 247, -281, -281, -281, -281, -281, 250, -281, 1881, 242, + 243, 248, 1381, 1381, -281, -281, -281, -281, -281 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 211, 210, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 213, 212, 0, - 0, 0, 1, 4, 5, 6, 180, 0, 10, 11, - 215, 0, 0, 179, 208, 0, 0, 200, 0, 222, - 221, 202, 203, 204, 205, 206, 0, 182, 0, 0, - 0, 0, 0, 210, 214, 218, 220, 0, 90, 91, - 92, 129, 130, 131, 132, 133, 163, 164, 134, 135, - 136, 137, 138, 139, 0, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 0, 150, 151, 152, 153, - 154, 155, 156, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 182, 201, 184, 0, 181, 185, - 162, 157, 0, 0, 217, 219, 191, 192, 160, 161, - 159, 0, 195, 196, 197, 198, 158, 0, 207, 18, + 3, 12, 13, 0, 0, 0, 218, 217, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 220, 219, 0, + 0, 0, 1, 4, 5, 6, 181, 0, 10, 11, + 222, 0, 0, 180, 215, 0, 0, 207, 0, 229, + 228, 209, 210, 211, 212, 213, 0, 183, 0, 0, + 0, 0, 0, 217, 221, 225, 227, 0, 90, 91, + 92, 130, 131, 132, 133, 134, 164, 165, 135, 136, + 137, 138, 139, 140, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 0, 151, 152, 153, 154, + 155, 156, 157, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 183, 208, 185, 0, 182, 186, + 163, 158, 0, 0, 224, 226, 198, 199, 161, 162, + 160, 0, 202, 203, 204, 205, 159, 0, 214, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 165, 166, 0, 182, 0, 17, 0, 19, 178, - 0, 182, 0, 0, 182, 0, 0, 190, 0, 184, - 0, 177, 0, 0, 0, 0, 0, 122, 123, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 124, 125, 126, 127, 128, 0, 189, 209, 188, 0, - 181, 186, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 166, 167, 0, 183, 0, 17, 0, 19, 179, + 0, 183, 0, 0, 183, 0, 0, 197, 0, 185, + 0, 178, 0, 0, 0, 0, 0, 123, 124, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 125, 126, 127, 128, 129, 0, 196, 216, 195, 0, + 182, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 0, 44, 49, 0, 45, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 0, 0, 0, 191, 192, 193, 194, 0, 199, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, - 0, 0, 187, 167, 182, 51, 47, 0, 0, 71, - 0, 0, 0, 57, 0, 0, 0, 0, 0, 82, - 83, 84, 86, 0, 87, 182, 182, 106, 108, 52, - 48, 60, 61, 62, 58, 59, 0, 0, 0, 0, - 107, 109, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 169, 182, 0, 171, 182, 0, - 0, 0, 110, 0, 50, 46, 66, 0, 0, 0, - 0, 54, 55, 56, 0, 0, 0, 81, 80, 85, - 0, 0, 0, 0, 0, 0, 95, 101, 102, 103, - 104, 105, 96, 97, 98, 100, 99, 0, 0, 0, - 0, 0, 0, 182, 168, 0, 0, 0, 94, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 182, 170, - 182, 172, 182, 216, 0, 72, 0, 74, 93, 0, - 0, 0, 79, 88, 89, 0, 0, 182, 0, 182, - 0, 182, 0, 0, 0, 173, 0, 0, 57, 0, - 0, 63, 65, 181, 68, 181, 70, 181, 174, 175, - 176, 73, 75, 0, 77, 0, 0, 0, 0, 0, - 0, 64, 67, 69, 76, 78 + 0, 0, 0, 44, 49, 0, 45, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 0, 0, 0, 198, 199, 0, 200, 201, 0, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 184, 0, 0, 0, 194, 168, 183, 51, 47, 0, + 0, 71, 0, 0, 0, 57, 0, 0, 0, 0, + 0, 82, 83, 84, 86, 0, 87, 183, 183, 0, + 0, 190, 200, 201, 206, 107, 109, 52, 48, 60, + 61, 62, 58, 59, 0, 0, 0, 0, 0, 108, + 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 183, 0, 172, 183, 0, 0, + 0, 111, 0, 50, 46, 66, 0, 0, 0, 0, + 54, 55, 56, 0, 0, 0, 81, 80, 85, 0, + 0, 188, 0, 95, 0, 0, 0, 0, 96, 102, + 103, 104, 105, 106, 97, 98, 99, 101, 100, 0, + 0, 0, 0, 0, 0, 183, 169, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 189, 0, 0, 0, + 0, 183, 171, 183, 173, 183, 223, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 183, 0, 183, 0, 183, 0, 0, 0, 174, 0, + 0, 57, 0, 0, 63, 65, 182, 68, 182, 70, + 182, 175, 176, 177, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 64, 67, 69, 76, 78 }; const short parser::yypgoto_[] = { - -280, -280, -280, 276, 285, 286, -280, -280, -280, -172, - 72, -280, -280, -280, -93, -119, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, 189, - -280, -279, -277, -276, -280, -280, -280, -280, -280, -280, - -29, 25, -72, -57, -280, -280, 15, -42, -280, 211, - 294, -280, 249, 310, -280, -280, -280, 327, 378, 395, - 412, -280, -280, -280, 0, 9, -280, -18, -280, -280, - 93, -280, -280 + -281, -281, -281, 272, 298, 299, -281, -281, -281, 194, + 86, -281, -281, -281, -92, -121, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, 188, + -281, -280, -279, -278, -281, -281, -281, -281, -281, -281, + 92, 203, -66, -62, -281, -281, -127, -46, -281, -281, + -281, -13, 213, 337, -281, 289, 385, -281, -281, -281, + 392, 480, 512, 519, -281, -281, -281, 0, 10, -281, + -17, -281, -281, 130, -281, -281 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 222, - 223, 277, 224, 225, 226, 340, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 106, - 399, 250, 251, 252, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 32, 107, 200, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 198, 84, 85, 86, 87, 88, 89, - 90, 91, 92 + 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, + 224, 279, 225, 226, 227, 349, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 106, + 412, 251, 252, 253, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 32, 107, 200, 69, 256, + 300, 301, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 198, 84, 85, 86, + 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 158, 151, 31, 341, 108, 342, 343, 6, 16, - 196, 94, 19, 20, 379, 6, 95, 152, 6, 22, - 273, 26, 116, 30, 96, 170, 33, 99, 131, 132, - 276, 146, 147, 148, 281, 97, 100, 1, 2, 3, - 4, 5, 380, 21, 98, 101, 93, 27, 109, 151, - 28, 126, 17, 18, 144, 145, 146, 147, 148, 7, - 127, 197, 108, 29, 152, 17, 53, 102, 17, 53, - 324, 286, 6, 128, 153, 170, 117, 30, 35, 36, - 56, 38, -212, 127, 157, 6, 42, 43, 44, 45, - 35, 36, 155, 38, 113, 159, 156, 6, 42, 43, - 44, 45, 112, 160, 327, 335, 113, 374, 161, 170, - -199, -199, 170, -199, 382, 383, 163, -199, 162, 170, - 170, 153, 154, 7, 164, 165, -199, 389, 253, -199, - 127, 166, 170, 391, 170, 17, 53, 173, 170, 341, - 415, 342, 343, 171, 428, 170, 197, 17, 53, 170, - 175, 114, 115, 429, 430, 201, 154, 258, 170, 170, - 274, 279, 261, 280, 282, 264, 127, -199, -199, 199, - 283, 284, 285, 253, 289, 270, 260, 253, 290, 263, - 295, 296, 254, 291, 294, 151, 144, 145, 146, 147, - 148, 116, 116, 287, 301, 253, 302, 303, 304, 305, - 152, 325, 258, 395, 328, 397, 258, 331, 338, 115, - 352, 127, 347, 353, 348, 127, 57, 354, 355, 367, - 258, 258, 373, 416, 258, 151, 151, 254, 369, 127, - 127, 254, 371, 127, 376, 103, 378, 388, 110, 111, - 152, 152, 390, 392, 431, 117, 117, 434, 253, 254, - 420, 403, 131, 132, 116, 404, 418, 153, 137, 138, - 139, 140, 118, 421, 422, 424, 127, 444, 445, 426, - 432, 436, 151, 441, 437, 438, 439, 258, 144, 145, - 146, 147, 148, 258, 345, 23, 127, 152, 402, 333, - 442, 443, 127, 169, 24, 25, 300, 153, 153, 433, - 120, 172, 254, 0, 288, 0, 127, 127, 117, 0, - 350, 351, 0, 0, 0, 0, 0, 0, 0, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 0, - 368, 0, 0, 370, 153, 119, 253, 0, 253, 259, - 0, 0, 262, 127, 0, 265, 0, 266, 0, 268, - 0, 121, 269, -191, -191, 423, -191, 425, 255, 427, - -191, 0, 0, 0, 0, 258, 0, 258, 122, -191, - 401, 0, -191, 0, 127, 0, 127, 253, 394, 116, - 253, 0, 278, 0, 0, 0, 0, 0, 0, 0, - 254, 0, 254, 412, 293, 413, 0, 414, 0, 0, - 253, 253, 0, 255, 0, 0, 258, 255, 258, 258, - -191, -191, 0, 0, 0, 127, 0, 127, 127, 123, - 0, 255, 255, 0, 0, 255, 0, 0, 0, 258, - 258, 254, 0, 117, 254, 0, 124, 0, 127, 127, - 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, - 332, 0, 0, 125, 254, 254, 0, 257, 0, 337, - 0, 339, 0, 0, 346, 0, 0, 0, 0, -192, - -192, 0, -192, 0, 122, 0, -192, 0, 255, 0, - 0, 0, 0, 0, 255, -192, 256, 0, -192, 0, - 256, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 257, 0, 256, 256, 257, 0, 256, 372, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, - 297, 298, 0, 122, 257, 123, -192, -192, 0, 0, - 0, 384, 385, 386, 387, 0, 0, 122, 122, 0, - 0, 122, 124, 0, -193, -193, 0, -193, 0, 0, - 0, -193, 0, 0, 0, 396, 0, 398, 400, 125, - -193, 256, 0, -193, 0, 0, 0, 256, 0, 0, - 123, 0, 0, 0, 123, 0, 255, 257, 255, -194, - -194, 0, -194, 344, 0, 0, -194, 124, 123, 123, - 0, 124, 123, 0, 122, -194, 0, 0, -194, 435, - 122, -193, -193, 0, 125, 124, 124, 0, 125, 124, - 0, 0, 0, 0, 0, 0, 0, 255, 0, 255, - 255, 0, 125, 125, 0, 0, 125, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -194, -194, 0, 0, - 255, 255, 0, 0, 0, 123, 0, 35, 36, 0, - 38, 123, 0, 0, 6, 42, 43, 44, 45, 256, - 0, 256, 124, 113, 0, 0, 0, 0, 124, 0, - 0, 220, 221, 0, 0, 257, 0, 257, 0, 125, - 35, 36, 0, 38, 0, 125, 0, 6, 0, 0, - -195, -195, 122, -195, 122, 0, 149, -195, 0, 150, - 256, 0, 256, 256, 17, 53, -195, 0, 0, -195, - 0, 0, 0, 0, 0, 0, 257, 0, 344, 257, - 0, 0, 0, 256, 256, 35, 36, 0, 38, 0, - 0, 0, 6, 122, 0, 122, 122, 17, 53, 257, - 257, 149, 0, 123, 174, 123, 0, -195, -195, 310, - 311, 0, 0, 0, 0, 0, 122, 122, 0, 0, - 124, 0, 124, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 0, 0, 0, 125, 0, 125, - 0, 0, 17, 53, 123, 0, 123, 123, 0, 0, + 16, 108, 158, 6, 31, 350, 351, 352, 151, 16, + 21, 196, 152, 19, 20, 1, 2, 3, 4, 5, + 6, 391, 6, 94, 17, 18, 33, 199, 95, 96, + 26, 99, 22, 28, 262, 97, 100, 265, 131, 132, + 144, 145, 146, 147, 148, 98, 101, 154, 109, 392, + 6, 126, -193, -193, 7, 151, 27, 93, 108, 152, + 29, 127, 197, 102, 144, 145, 146, 147, 148, 157, + 17, 53, 17, 53, 153, 275, 30, 288, -206, -206, + 170, -206, 333, 30, 127, -206, 56, 170, 336, 277, + 154, 361, 362, 170, -206, 159, 203, -206, 128, 204, + 205, 7, 206, 207, 208, 209, -219, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 35, 36, 155, 38, + 160, 153, 156, 6, 42, 43, 44, 45, 386, 161, + 157, 127, 220, 170, 394, -206, -206, 395, 162, 170, + 221, 222, 170, 116, 146, 147, 148, -198, -198, 342, + -198, 350, 351, 352, -198, 201, 402, 260, 163, 404, + 164, 170, 263, -198, 170, 266, -198, 127, -191, -191, + 359, 360, 428, 17, 53, 272, 441, 170, 442, -192, + -192, 170, 170, 170, -199, -199, 165, -199, 166, 173, + 443, -199, 171, 151, 289, 170, 175, 152, 154, 197, + -199, 276, 260, -199, -198, -198, 260, 380, 282, 281, + 382, 284, 127, 285, 286, 57, 127, 287, 291, 314, + 304, 260, 260, 297, 298, 260, 292, 334, 293, 296, + 127, 127, 127, 337, 103, 127, 309, 110, 111, 151, + 151, -199, -199, 152, 152, 310, 311, 312, 313, 254, + 347, 340, 115, 356, 117, 364, 357, 365, 407, 153, + 366, 367, 390, 379, 118, 385, 388, 381, 383, 127, + 401, 403, 405, 429, 425, 433, 426, 416, 427, 260, + 449, 23, 450, 417, 431, 260, 354, 151, 434, 127, + 435, 152, 169, 437, 254, 127, 439, 445, 254, 451, + 172, 415, 452, 454, 455, 153, 153, 24, 25, 456, + 446, 308, 116, 116, 116, 127, 127, 254, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 131, 132, + 120, 290, 135, 136, 137, 138, 139, 140, 261, 396, + 0, 264, 0, 153, 267, 0, 268, 0, 270, 0, + 255, 271, 304, 127, 144, 145, 146, 147, 148, 0, + 257, 254, 127, 0, 436, 0, 438, 116, 440, 0, + 0, 0, 0, 0, 0, 0, 0, 260, 119, 260, + 0, 280, 414, 0, 0, 0, 278, 127, 0, 127, + 283, 0, 0, 295, 0, 255, 0, 0, 0, 255, + 0, -200, -200, 0, -200, 257, 0, 0, -200, 257, + 0, 0, 0, 117, 117, 117, 0, -200, 255, 260, + -200, 260, 260, 302, 257, 257, 121, 0, 257, 127, + 0, 127, 127, 122, 0, 0, 0, 0, 35, 36, + 0, 38, 260, 260, 116, 6, 42, 43, 44, 45, + 0, 341, 127, 127, 299, 0, 0, 0, -200, -200, + 346, 0, 348, 344, 0, 355, 0, -201, -201, 254, + -201, 254, 255, 0, -201, 0, 0, 271, 117, 0, + 0, 0, 257, -201, 258, 0, -201, 0, 257, 0, + 0, 0, 363, 0, 0, 17, 53, 0, 0, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 0, 254, 0, 116, 254, 0, 0, 384, 0, 0, + 0, 123, 0, 0, -201, -201, 0, 0, 0, 258, + 0, 0, 259, 258, 254, 254, 0, 0, 0, 122, + 0, 0, 397, 398, 399, 400, 0, 303, 258, 258, + 0, 0, 258, 124, 0, 117, 0, 0, 0, 0, + 125, 0, 0, 0, 0, 302, 409, 0, 411, 413, + 0, 408, 0, 410, 0, 0, 0, 259, 0, 0, + 255, 259, 255, 0, 122, 0, 0, 0, 122, 0, + 257, 0, 257, 0, 0, 121, 305, 306, 0, 0, + 259, 0, 122, 122, 122, 0, 258, 122, 0, 0, + 0, 448, 258, 444, 0, 0, 447, 0, 0, 0, + 0, 0, 255, 0, 117, 255, 0, 123, 0, 0, + 0, 0, 257, 0, 257, 257, 457, 458, 0, 0, + 0, 35, 36, 0, 38, 255, 255, 0, 6, 42, + 43, 44, 45, 112, 259, 257, 257, 113, 0, 124, + 353, 122, 35, 36, 0, 38, 125, 122, 0, 6, + 0, 0, 123, 0, 0, 0, 123, 0, 149, 0, + 0, 150, 0, 0, 0, 0, 0, 0, 0, 303, + 123, 123, 123, -202, -202, 123, -202, 0, 17, 53, + -202, 0, 114, 115, 124, 0, 0, 0, 124, -202, + 0, 125, -202, 0, 258, 125, 258, 0, 0, 17, + 53, 0, 124, 124, 124, 0, 0, 124, 0, 125, + 125, 125, 35, 36, 125, 38, 0, 121, 0, 6, + 42, 43, 44, 45, 122, 0, 0, 0, 113, 123, + -202, -202, 0, 0, 0, 123, 258, 0, 258, 258, + 0, 0, 259, 0, 259, 0, 0, 35, 36, 122, + 38, 122, 0, 0, 6, 42, 43, 44, 45, 258, + 258, 124, 0, 220, 0, 0, 0, 124, 125, 17, + 53, 221, 222, 0, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 259, 0, 353, 259, 0, 0, + 0, 122, 0, 122, 122, 315, 316, 0, 317, 318, + 0, 0, 0, 0, 17, 53, 0, 259, 259, 0, + 0, 0, 123, 0, 122, 122, 0, 35, 36, 0, + 38, 0, 0, 0, 6, 0, 0, -203, -203, 0, + -203, 0, 0, 149, -203, 0, 174, 123, 0, 123, + 0, 319, 320, -203, 124, 0, -203, 0, 0, 0, + 0, 125, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 0, 0, 0, 124, + 0, 124, 0, 0, 17, 53, 125, 0, 125, 123, + 0, 123, 123, 0, -203, -203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 0, 124, 124, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 125, 0, - 125, 125, 0, 0, 124, 124, 0, 0, 0, 0, - 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, + 131, 132, 123, 123, 135, 136, 137, 138, 139, 140, + 0, 124, 0, 124, 124, 0, 0, 0, 125, 0, + 125, 125, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 0, 202, 0, 124, 124, 0, 0, 0, 0, 203, 125, 125, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, - 44, 45, 0, 0, 157, 219, 113, 0, 0, 0, - 0, 0, 0, 0, 220, 221, 0, 0, 0, 0, - 0, -196, -196, 0, -196, 0, -197, -197, -196, -197, - 0, 0, 0, -197, 0, 0, 0, -196, 202, 0, - -196, 0, -197, 0, 0, -197, 203, 17, 53, 204, + 44, 45, 0, 0, 157, 219, 220, 0, 0, 0, + 0, 0, 0, 0, 221, 222, 0, 0, 0, 0, + 0, -204, -204, 0, -204, 0, -205, -205, -204, -205, + 0, 0, 0, -205, 0, 0, 0, -204, 202, 0, + -204, 0, -205, 0, 0, -205, 203, 17, 53, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, -196, -196, - 157, 299, 113, -197, -197, 0, 0, 0, 0, 0, - 220, 221, 275, 0, 0, 0, 0, 0, 0, 203, + 0, 0, 0, 6, 42, 43, 44, 45, -204, -204, + 157, 307, 220, -205, -205, 0, 0, 0, 0, 0, + 221, 222, 343, 0, 0, 0, 0, 0, 0, 203, 0, 0, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, - 36, 0, 38, 17, 53, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 220, 221, 334, 0, 0, 0, 0, - 0, 0, 203, 0, 0, 204, 205, 0, 206, 207, - 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 35, 36, 0, 38, 17, 53, 34, 6, - 42, 43, 44, 45, 0, 0, 157, 0, 113, 0, - 0, 0, 0, 0, 0, 0, 220, 221, 0, 0, - 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, - 43, 44, 45, 46, 0, 0, 0, 104, 105, 0, - 0, 48, 0, 0, -198, -198, 0, -198, 0, 17, - 53, -198, 35, 36, 0, 38, 0, 49, 50, 6, - -198, 34, 0, -198, 0, 0, 0, 0, 149, 0, - 0, 174, 0, 0, 51, 0, 0, 52, 17, 53, + 36, 0, 38, 17, 53, 34, 6, 42, 43, 44, + 45, 0, 0, 157, 0, 220, 0, 0, 0, 0, + 0, 0, 0, 221, 222, 0, 0, 0, 35, 36, + 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, + 46, 0, 0, 0, 104, 105, 0, 0, 48, 0, + 0, 35, 36, 0, 38, 0, 17, 53, 6, 0, + 0, 0, 0, 0, 49, 50, 0, 149, 34, 0, + 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 0, 0, 52, 17, 53, 30, 54, 55, + 56, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 0, 0, 47, 17, 53, + 0, 48, 0, 294, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, 40, - 41, 6, 42, 43, 44, 45, 46, 0, 0, 0, - 47, -198, -198, 0, 48, 0, 292, 0, 0, 17, - 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 50, 0, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, + 41, 6, 42, 43, 44, 45, 46, 269, 0, 0, + 47, 0, 0, 130, 48, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 49, 50, 0, 0, 34, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, 46, - 267, 0, 0, 47, 0, 0, 130, 48, 0, 131, + 274, 0, 0, 104, 0, 0, 130, 48, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 49, 50, 0, 0, 34, 0, 0, + 0, 0, 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, - 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, - 44, 45, 46, 0, 0, 0, 104, 0, 0, 0, - 48, 0, 0, 0, 0, 306, 307, 0, 308, 309, - 0, 0, 0, 0, 0, 0, 49, 50, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 35, 36, 0, - 38, 0, 0, 51, 6, 0, 52, 17, 53, 30, - 54, 55, 56, 149, 0, 0, 174, 0, 0, 0, - 0, 310, 311, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 312, 313, 314, 315, 316, - 317, 318, 319, 320, 321, 322, 0, 0, 0, 0, - 0, 0, 0, 203, 17, 53, 204, 205, 0, 206, - 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 0, 0, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 167, 220, 221, 0, - 0, 168, 0, 0, 0, 0, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, + 203, 0, 0, 204, 205, 0, 206, 207, 208, 209, + 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 220, 0, 0, 0, + 0, 0, 0, 0, 221, 222, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 0, 149, 0, 0, 174, 0, 0, 0, 0, + 319, 320, 0, 0, 0, 0, 0, 17, 53, 0, + 0, 0, 0, 0, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 167, 0, 0, 0, 0, + 168, 0, 0, 17, 53, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 53, 141, 142, 143, 144, 145, 146, 147, 148, - 406, 0, 0, 0, 0, 407, 0, 0, 0, 0, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 408, 0, 0, 0, 0, 409, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 410, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 130, 0, - 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 167, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 375, 0, 141, 142, - 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 377, 0, 141, 142, 143, 144, 145, 146, 147, 148, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 381, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, - 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 405, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 417, 0, 141, 142, - 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 419, 0, 141, 142, 143, 144, 145, 146, 147, 148, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 440, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 272, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 323, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 326, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 329, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 330, 0, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 419, + 0, 0, 0, 0, 420, 0, 0, 0, 0, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 421, 0, 0, 0, 0, 422, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 271, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 336, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, + 142, 143, 144, 145, 146, 147, 148, 423, 0, 0, + 0, 0, 424, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 167, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 387, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 389, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 393, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 406, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 418, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 430, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 432, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 453, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 332, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 335, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 338, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 339, 0, 0, + 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 273, 0, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 345, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 358, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 131, 132, 0, 134, 135, 136, 137, 138, 139, 140, + 131, 132, 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 131, 132, 0, 134, 135, 136, 137, 138, 139, - 140, 131, 132, 0, 0, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 0, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 131, 132, 0, 0, 135, 136, 137, 138, - 139, 140, 131, 132, 0, 0, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, - 146, 147, 148, 131, 132, 0, 0, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, - 145, 146, 147, 148 + 148, 0, 0, 0, 142, 143, 144, 145, 146, 147, + 148, 131, 132, 0, 0, 135, 136, 137, 138, 139, + 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, + 140, 0, 0, 0, 0, 142, 0, 144, 145, 146, + 147, 148, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148 }; const short parser::yycheck_[] = { - 0, 94, 74, 21, 283, 47, 283, 283, 46, 9, - 46, 52, 3, 4, 29, 46, 57, 74, 46, 0, - 52, 51, 51, 98, 55, 57, 26, 55, 65, 66, - 202, 93, 94, 95, 206, 35, 36, 11, 12, 13, - 14, 15, 57, 51, 35, 36, 52, 77, 48, 121, - 61, 51, 96, 97, 91, 92, 93, 94, 95, 97, - 51, 97, 104, 61, 121, 96, 97, 55, 96, 97, - 52, 92, 46, 97, 74, 57, 51, 98, 39, 40, - 101, 42, 59, 74, 53, 46, 47, 48, 49, 50, - 39, 40, 59, 42, 55, 95, 61, 46, 47, 48, - 49, 50, 51, 55, 52, 277, 55, 52, 51, 57, - 39, 40, 57, 42, 52, 52, 55, 46, 59, 57, - 57, 121, 51, 97, 51, 59, 55, 52, 157, 58, - 121, 55, 57, 52, 57, 96, 97, 55, 57, 418, - 52, 418, 418, 56, 52, 57, 97, 96, 97, 57, - 59, 100, 101, 52, 52, 155, 51, 157, 57, 57, - 51, 61, 162, 51, 51, 165, 157, 96, 97, 154, - 51, 51, 51, 202, 60, 175, 161, 206, 61, 164, - 51, 51, 157, 61, 61, 257, 91, 92, 93, 94, - 95, 220, 221, 211, 61, 224, 61, 61, 61, 61, - 257, 51, 202, 375, 51, 377, 206, 56, 26, 101, - 51, 202, 60, 51, 60, 206, 27, 51, 51, 56, - 220, 221, 51, 24, 224, 297, 298, 202, 56, 220, - 221, 206, 56, 224, 51, 46, 61, 51, 49, 50, - 297, 298, 51, 51, 416, 220, 221, 419, 277, 224, - 29, 61, 65, 66, 283, 61, 61, 257, 71, 72, - 73, 74, 51, 61, 61, 61, 257, 439, 440, 61, - 61, 52, 344, 61, 52, 52, 52, 277, 91, 92, - 93, 94, 95, 283, 284, 9, 277, 344, 381, 274, - 61, 61, 283, 104, 9, 9, 224, 297, 298, 418, - 51, 112, 277, -1, 211, -1, 297, 298, 283, -1, - 295, 296, -1, -1, -1, -1, -1, -1, -1, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, -1, - 325, -1, -1, 328, 344, 51, 375, -1, 377, 160, - -1, -1, 163, 344, -1, 166, -1, 168, -1, 170, - -1, 51, 173, 39, 40, 407, 42, 409, 157, 411, - 46, -1, -1, -1, -1, 375, -1, 377, 51, 55, - 380, -1, 58, -1, 375, -1, 377, 416, 373, 418, - 419, -1, 203, -1, -1, -1, -1, -1, -1, -1, - 375, -1, 377, 388, 215, 390, -1, 392, -1, -1, - 439, 440, -1, 202, -1, -1, 416, 206, 418, 419, - 96, 97, -1, -1, -1, 416, -1, 418, 419, 51, - -1, 220, 221, -1, -1, 224, -1, -1, -1, 439, - 440, 416, -1, 418, 419, -1, 51, -1, 439, 440, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - 271, -1, -1, 51, 439, 440, -1, 157, -1, 280, - -1, 282, -1, -1, 285, -1, -1, -1, -1, 39, - 40, -1, 42, -1, 157, -1, 46, -1, 277, -1, - -1, -1, -1, -1, 283, 55, 202, -1, 58, -1, - 206, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 202, -1, 220, 221, 206, -1, 224, 330, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 220, 221, -1, 206, 224, 157, 96, 97, -1, -1, - -1, 352, 353, 354, 355, -1, -1, 220, 221, -1, - -1, 224, 157, -1, 39, 40, -1, 42, -1, -1, - -1, 46, -1, -1, -1, 376, -1, 378, 379, 157, - 55, 277, -1, 58, -1, -1, -1, 283, -1, -1, - 202, -1, -1, -1, 206, -1, 375, 277, 377, 39, - 40, -1, 42, 283, -1, -1, 46, 202, 220, 221, - -1, 206, 224, -1, 277, 55, -1, -1, 58, 420, - 283, 96, 97, -1, 202, 220, 221, -1, 206, 224, - -1, -1, -1, -1, -1, -1, -1, 416, -1, 418, - 419, -1, 220, 221, -1, -1, 224, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, - 439, 440, -1, -1, -1, 277, -1, 39, 40, -1, - 42, 283, -1, -1, 46, 47, 48, 49, 50, 375, - -1, 377, 277, 55, -1, -1, -1, -1, 283, -1, - -1, 63, 64, -1, -1, 375, -1, 377, -1, 277, - 39, 40, -1, 42, -1, 283, -1, 46, -1, -1, - 39, 40, 375, 42, 377, -1, 55, 46, -1, 58, - 416, -1, 418, 419, 96, 97, 55, -1, -1, 58, - -1, -1, -1, -1, -1, -1, 416, -1, 418, 419, - -1, -1, -1, 439, 440, 39, 40, -1, 42, -1, - -1, -1, 46, 416, -1, 418, 419, 96, 97, 439, - 440, 55, -1, 375, 58, 377, -1, 96, 97, 63, - 64, -1, -1, -1, -1, -1, 439, 440, -1, -1, - 375, -1, 377, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, -1, -1, -1, 375, -1, 377, - -1, -1, 96, 97, 416, -1, 418, 419, -1, -1, + 0, 47, 94, 46, 21, 285, 285, 285, 74, 9, + 51, 46, 74, 3, 4, 11, 12, 13, 14, 15, + 46, 29, 46, 52, 96, 97, 26, 154, 57, 55, + 51, 55, 0, 61, 161, 35, 36, 164, 65, 66, + 91, 92, 93, 94, 95, 35, 36, 51, 48, 57, + 46, 51, 56, 57, 97, 121, 77, 52, 104, 121, + 61, 51, 97, 55, 91, 92, 93, 94, 95, 53, + 96, 97, 96, 97, 74, 52, 98, 92, 39, 40, + 57, 42, 52, 98, 74, 46, 101, 57, 52, 12, + 51, 56, 57, 57, 55, 95, 19, 58, 97, 22, + 23, 97, 25, 26, 27, 28, 59, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 59, 42, + 55, 121, 61, 46, 47, 48, 49, 50, 52, 51, + 53, 121, 55, 57, 52, 96, 97, 52, 59, 57, + 63, 64, 57, 51, 93, 94, 95, 39, 40, 276, + 42, 431, 431, 431, 46, 155, 52, 157, 55, 52, + 51, 57, 162, 55, 57, 165, 58, 157, 56, 57, + 297, 298, 52, 96, 97, 175, 52, 57, 52, 56, + 57, 57, 57, 57, 39, 40, 59, 42, 55, 55, + 52, 46, 56, 259, 211, 57, 59, 259, 51, 97, + 55, 51, 202, 58, 96, 97, 206, 334, 51, 61, + 337, 51, 202, 51, 51, 27, 206, 51, 60, 77, + 220, 221, 222, 51, 51, 225, 61, 51, 61, 61, + 220, 221, 222, 51, 46, 225, 61, 49, 50, 305, + 306, 96, 97, 305, 306, 61, 61, 61, 61, 157, + 26, 56, 101, 60, 51, 51, 60, 51, 385, 259, + 51, 51, 61, 56, 51, 51, 51, 56, 56, 259, + 51, 51, 51, 24, 401, 29, 403, 61, 405, 279, + 52, 9, 52, 61, 61, 285, 286, 353, 61, 279, + 61, 353, 104, 61, 202, 285, 61, 61, 206, 52, + 112, 393, 52, 61, 61, 305, 306, 9, 9, 61, + 431, 225, 220, 221, 222, 305, 306, 225, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 65, 66, + 51, 211, 69, 70, 71, 72, 73, 74, 160, 362, + -1, 163, -1, 353, 166, -1, 168, -1, 170, -1, + 157, 173, 362, 353, 91, 92, 93, 94, 95, -1, + 157, 279, 362, -1, 420, -1, 422, 285, 424, -1, + -1, -1, -1, -1, -1, -1, -1, 387, 51, 389, + -1, 203, 392, -1, -1, -1, 202, 387, -1, 389, + 206, -1, -1, 215, -1, 202, -1, -1, -1, 206, + -1, 39, 40, -1, 42, 202, -1, -1, 46, 206, + -1, -1, -1, 220, 221, 222, -1, 55, 225, 429, + 58, 431, 432, 220, 221, 222, 51, -1, 225, 429, + -1, 431, 432, 51, -1, -1, -1, -1, 39, 40, + -1, 42, 452, 453, 362, 46, 47, 48, 49, 50, + -1, 273, 452, 453, 55, -1, -1, -1, 96, 97, + 282, -1, 284, 279, -1, 287, -1, 39, 40, 387, + 42, 389, 279, -1, 46, -1, -1, 299, 285, -1, + -1, -1, 279, 55, 157, -1, 58, -1, 285, -1, + -1, -1, 314, -1, -1, 96, 97, -1, -1, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + -1, 429, -1, 431, 432, -1, -1, 339, -1, -1, + -1, 51, -1, -1, 96, 97, -1, -1, -1, 202, + -1, -1, 157, 206, 452, 453, -1, -1, -1, 157, + -1, -1, 364, 365, 366, 367, -1, 220, 221, 222, + -1, -1, 225, 51, -1, 362, -1, -1, -1, -1, + 51, -1, -1, -1, -1, 362, 388, -1, 390, 391, + -1, 387, -1, 389, -1, -1, -1, 202, -1, -1, + 387, 206, 389, -1, 202, -1, -1, -1, 206, -1, + 387, -1, 389, -1, -1, 220, 221, 222, -1, -1, + 225, -1, 220, 221, 222, -1, 279, 225, -1, -1, + -1, 433, 285, 429, -1, -1, 432, -1, -1, -1, + -1, -1, 429, -1, 431, 432, -1, 157, -1, -1, + -1, -1, 429, -1, 431, 432, 452, 453, -1, -1, + -1, 39, 40, -1, 42, 452, 453, -1, 46, 47, + 48, 49, 50, 51, 279, 452, 453, 55, -1, 157, + 285, 279, 39, 40, -1, 42, 157, 285, -1, 46, + -1, -1, 202, -1, -1, -1, 206, -1, 55, -1, + -1, 58, -1, -1, -1, -1, -1, -1, -1, 362, + 220, 221, 222, 39, 40, 225, 42, -1, 96, 97, + 46, -1, 100, 101, 202, -1, -1, -1, 206, 55, + -1, 202, 58, -1, 387, 206, 389, -1, -1, 96, + 97, -1, 220, 221, 222, -1, -1, 225, -1, 220, + 221, 222, 39, 40, 225, 42, -1, 362, -1, 46, + 47, 48, 49, 50, 362, -1, -1, -1, 55, 279, + 96, 97, -1, -1, -1, 285, 429, -1, 431, 432, + -1, -1, 387, -1, 389, -1, -1, 39, 40, 387, + 42, 389, -1, -1, 46, 47, 48, 49, 50, 452, + 453, 279, -1, 55, -1, -1, -1, 285, 279, 96, + 97, 63, 64, -1, 285, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 429, -1, 431, 432, -1, -1, + -1, 429, -1, 431, 432, 17, 18, -1, 20, 21, + -1, -1, -1, -1, 96, 97, -1, 452, 453, -1, + -1, -1, 362, -1, 452, 453, -1, 39, 40, -1, + 42, -1, -1, -1, 46, -1, -1, 39, 40, -1, + 42, -1, -1, 55, 46, -1, 58, 387, -1, 389, + -1, 63, 64, 55, 362, -1, 58, -1, -1, -1, + -1, 362, -1, -1, -1, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, -1, -1, -1, 387, + -1, 389, -1, -1, 96, 97, 387, -1, 389, 429, + -1, 431, 432, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 416, -1, 418, 419, -1, -1, 439, 440, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 416, -1, - 418, 419, -1, -1, 439, 440, -1, -1, -1, -1, - -1, -1, 11, -1, -1, -1, -1, -1, -1, -1, - 19, 439, 440, 22, 23, -1, 25, 26, 27, 28, + 65, 66, 452, 453, 69, 70, 71, 72, 73, 74, + -1, 429, -1, 431, 432, -1, -1, -1, 429, -1, + 431, 432, -1, 88, 89, 90, 91, 92, 93, 94, + 95, -1, 11, -1, 452, 453, -1, -1, -1, -1, + 19, 452, 453, 22, 23, -1, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, 46, 47, 48, 49, 50, -1, -1, 53, 54, 55, -1, -1, -1, @@ -4272,193 +4360,183 @@ namespace xsk { namespace gsc { namespace iw5 { 63, 64, 12, -1, -1, -1, -1, -1, -1, 19, -1, -1, 22, 23, -1, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, -1, 42, 96, 97, -1, 46, 47, 48, 49, + 40, -1, 42, 96, 97, 16, 46, 47, 48, 49, 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, - -1, -1, -1, 63, 64, 12, -1, -1, -1, -1, - -1, -1, 19, -1, -1, 22, 23, -1, 25, 26, - 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, -1, 42, 96, 97, 16, 46, - 47, 48, 49, 50, -1, -1, 53, -1, 55, -1, - -1, -1, -1, -1, -1, -1, 63, 64, -1, -1, - -1, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, -1, -1, -1, 55, 56, -1, - -1, 59, -1, -1, 39, 40, -1, 42, -1, 96, - 97, 46, 39, 40, -1, 42, -1, 75, 76, 46, - 55, 16, -1, 58, -1, -1, -1, -1, 55, -1, - -1, 58, -1, -1, 92, -1, -1, 95, 96, 97, + -1, -1, -1, 63, 64, -1, -1, -1, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, -1, -1, -1, 55, 56, -1, -1, 59, -1, + -1, 39, 40, -1, 42, -1, 96, 97, 46, -1, + -1, -1, -1, -1, 75, 76, -1, 55, 16, -1, + 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 92, -1, -1, 95, 96, 97, 98, 99, 100, + 101, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, -1, -1, -1, 55, 96, 97, + -1, 59, -1, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, + -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, - 55, 96, 97, -1, 59, -1, 61, -1, -1, 96, - 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 75, 76, -1, -1, 16, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 92, -1, -1, + 45, 46, 47, 48, 49, 50, 51, 56, -1, -1, + 55, -1, -1, 62, 59, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + 75, 76, -1, -1, 16, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 56, -1, -1, 55, -1, -1, 62, 59, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, 75, 76, -1, -1, 16, -1, -1, + -1, -1, -1, 75, 76, -1, -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, -1, -1, -1, 55, -1, -1, -1, - 59, -1, -1, -1, -1, 17, 18, -1, 20, 21, - -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, 40, -1, - 42, -1, -1, 92, 46, -1, 95, 96, 97, 98, - 99, 100, 101, 55, -1, -1, 58, -1, -1, -1, - -1, 63, 64, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, - -1, -1, -1, 19, 96, 97, 22, 23, -1, 25, - 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, - 46, 47, 48, 49, 50, -1, -1, 53, -1, 55, - -1, -1, -1, -1, -1, -1, 52, 63, 64, -1, - -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, + 19, -1, -1, 22, 23, -1, 25, 26, 27, 28, + -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, -1, 42, -1, -1, -1, 46, 47, 48, + 49, 50, -1, -1, 53, -1, 55, -1, -1, -1, + -1, -1, -1, -1, 63, 64, 39, 40, -1, 42, + -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, + -1, -1, 55, -1, -1, 58, -1, -1, -1, -1, + 63, 64, -1, -1, -1, -1, -1, 96, 97, -1, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 52, -1, -1, -1, -1, + 57, -1, -1, 96, 97, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 96, 97, 88, 89, 90, 91, 92, 93, 94, 95, - 52, -1, -1, -1, -1, 57, -1, -1, -1, -1, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 52, -1, -1, -1, -1, 57, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 52, -1, - -1, -1, -1, 57, -1, -1, -1, -1, 62, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 52, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 62, -1, -1, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, -1, 88, 89, - 90, 91, 92, 93, 94, 95, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 62, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 52, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 62, -1, -1, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, -1, 88, 89, - 90, 91, 92, 93, 94, 95, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 57, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 52, + -1, -1, -1, -1, 57, -1, -1, -1, -1, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 52, -1, -1, -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 60, -1, 62, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, - 93, 94, 95, 61, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 61, 62, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, - 93, 94, 95, 61, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 62, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 52, -1, -1, + -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 88, 89, 90, 91, 92, 93, 94, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 62, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 52, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 62, -1, -1, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 62, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 57, -1, -1, + -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 88, 89, + 90, 91, 92, 93, 94, 95, 60, -1, 62, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, + 94, 95, 61, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 61, 62, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, + 94, 95, 61, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 62, -1, -1, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 88, + 89, 90, 91, 92, 93, 94, 95, -1, -1, -1, + -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, + 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, + 65, 66, -1, -1, 69, 70, 71, 72, 73, 74, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 65, 66, -1, 68, 69, 70, 71, 72, 73, - 74, 65, 66, -1, -1, 69, 70, 71, 72, 73, - 74, -1, -1, -1, 88, 89, 90, 91, 92, 93, - 94, 95, -1, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 65, 66, -1, -1, 69, 70, 71, 72, - 73, 74, 65, 66, -1, -1, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, 89, 90, 91, 92, - 93, 94, 95, -1, -1, -1, 89, -1, 91, 92, - 93, 94, 95, 65, 66, -1, -1, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95 + 95, -1, -1, -1, 89, 90, 91, 92, 93, 94, + 95, 65, 66, -1, -1, 69, 70, 71, 72, 73, + 74, 65, 66, -1, -1, -1, -1, 71, 72, 73, + 74, -1, -1, -1, -1, 89, -1, 91, 92, 93, + 94, 95, -1, -1, -1, -1, -1, 91, 92, 93, + 94, 95 }; const unsigned char parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 46, 97, 113, 114, - 115, 116, 117, 118, 119, 120, 186, 96, 97, 187, - 187, 51, 0, 115, 116, 117, 51, 77, 61, 61, - 98, 189, 167, 186, 16, 39, 40, 41, 42, 43, + 115, 116, 117, 118, 119, 120, 189, 96, 97, 190, + 190, 51, 0, 115, 116, 117, 51, 77, 61, 61, + 98, 192, 167, 189, 16, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 55, 59, 75, 76, 92, 95, 97, 99, 100, 101, 151, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 52, 52, 57, 55, 186, 187, 55, - 186, 187, 55, 151, 55, 56, 151, 168, 169, 186, - 151, 151, 51, 55, 100, 101, 162, 163, 171, 172, - 174, 175, 179, 180, 181, 182, 186, 187, 97, 61, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 52, 52, 57, 55, 189, 190, 55, + 189, 190, 55, 151, 55, 56, 151, 168, 169, 189, + 151, 151, 51, 55, 100, 101, 162, 163, 174, 175, + 177, 178, 182, 183, 184, 185, 189, 190, 97, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 88, 89, 90, 91, 92, 93, 94, 95, 55, - 58, 164, 165, 186, 51, 59, 61, 53, 126, 186, + 58, 164, 165, 189, 51, 59, 61, 53, 126, 189, 55, 51, 59, 55, 51, 59, 55, 52, 57, 151, 57, 56, 151, 55, 58, 59, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 46, 97, 185, 168, - 169, 186, 11, 19, 22, 23, 25, 26, 27, 28, + 151, 151, 151, 151, 151, 151, 46, 97, 188, 168, + 169, 189, 11, 19, 22, 23, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 54, - 63, 64, 121, 122, 124, 125, 126, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 153, 154, 155, 162, 163, 171, 172, 175, 186, 151, - 168, 186, 151, 168, 186, 151, 151, 56, 151, 151, - 186, 60, 56, 52, 51, 12, 121, 123, 151, 61, - 51, 121, 51, 51, 51, 51, 92, 189, 192, 60, - 61, 61, 61, 151, 61, 51, 51, 175, 175, 54, - 122, 61, 61, 61, 61, 61, 17, 18, 20, 21, - 63, 64, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 56, 52, 51, 56, 52, 51, 56, - 57, 56, 151, 168, 12, 121, 61, 151, 26, 151, - 127, 153, 154, 155, 175, 186, 151, 60, 60, 61, - 168, 168, 51, 51, 51, 51, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 56, 168, 56, - 168, 56, 151, 51, 52, 52, 51, 52, 61, 29, - 57, 52, 52, 52, 151, 151, 151, 151, 51, 52, - 51, 52, 51, 52, 168, 121, 151, 121, 151, 152, - 151, 186, 126, 61, 61, 52, 52, 57, 52, 57, - 52, 57, 168, 168, 168, 52, 24, 52, 61, 52, - 29, 61, 61, 169, 61, 169, 61, 169, 52, 52, - 52, 121, 61, 127, 121, 151, 52, 52, 52, 52, - 52, 61, 61, 61, 121, 121 + 55, 63, 64, 121, 122, 124, 125, 126, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 153, 154, 155, 162, 163, 171, 174, 175, 178, + 189, 151, 168, 189, 151, 168, 189, 151, 151, 56, + 151, 151, 189, 60, 56, 52, 51, 12, 121, 123, + 151, 61, 51, 121, 51, 51, 51, 51, 92, 192, + 195, 60, 61, 61, 61, 151, 61, 51, 51, 55, + 172, 173, 174, 175, 189, 178, 178, 54, 122, 61, + 61, 61, 61, 61, 77, 17, 18, 20, 21, 63, + 64, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 56, 52, 51, 56, 52, 51, 56, 57, + 56, 151, 168, 12, 121, 61, 151, 26, 151, 127, + 153, 154, 155, 178, 189, 151, 60, 60, 61, 168, + 168, 56, 57, 151, 51, 51, 51, 51, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 56, + 168, 56, 168, 56, 151, 51, 52, 52, 51, 52, + 61, 29, 57, 52, 52, 52, 173, 151, 151, 151, + 151, 51, 52, 51, 52, 51, 52, 168, 121, 151, + 121, 151, 152, 151, 189, 126, 61, 61, 52, 52, + 57, 52, 57, 52, 57, 168, 168, 168, 52, 24, + 52, 61, 52, 29, 61, 61, 169, 61, 169, 61, + 169, 52, 52, 52, 121, 61, 127, 121, 151, 52, + 52, 52, 52, 52, 61, 61, 61, 121, 121 }; const unsigned char @@ -4474,19 +4552,19 @@ namespace xsk { namespace gsc { namespace iw5 { 134, 135, 136, 137, 138, 139, 140, 141, 141, 142, 143, 143, 144, 145, 146, 147, 147, 148, 149, 150, 151, 151, 151, 152, 152, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 154, 154, 155, 155, - 156, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, + 153, 153, 153, 153, 153, 153, 153, 154, 154, 155, + 155, 156, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 159, 160, 160, - 160, 160, 161, 162, 162, 163, 163, 164, 164, 164, - 164, 164, 164, 165, 165, 165, 165, 166, 167, 167, - 167, 168, 168, 169, 169, 170, 170, 171, 172, 173, - 174, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 186, 187, 187, 188, 189, 190, 191, 191, 192, - 192, 193, 194 + 158, 158, 158, 158, 158, 158, 158, 158, 159, 160, + 160, 160, 160, 161, 162, 162, 163, 163, 164, 164, + 164, 164, 164, 164, 165, 165, 165, 165, 166, 167, + 167, 167, 168, 168, 169, 169, 170, 170, 171, 172, + 172, 173, 173, 173, 174, 175, 176, 177, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 189, 190, + 190, 191, 192, 193, 194, 194, 195, 195, 196, 197 }; const signed char @@ -4502,19 +4580,19 @@ namespace xsk { namespace gsc { namespace iw5 { 6, 2, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, - 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 1, 1, 2, 2, 4, 6, 5, - 7, 5, 7, 8, 9, 9, 9, 3, 3, 1, - 0, 1, 0, 3, 1, 2, 3, 4, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, - 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 1, 1, 2, 2, 4, 6, + 5, 7, 5, 7, 8, 9, 9, 9, 3, 3, + 1, 0, 1, 0, 3, 1, 2, 3, 3, 3, + 1, 1, 1, 1, 4, 3, 3, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4524,29 +4602,29 @@ namespace xsk { namespace gsc { namespace iw5 { const short parser::yyrline_[] = { - 0, 258, 258, 259, 263, 265, 267, 269, 271, 273, - 278, 282, 287, 288, 289, 290, 291, 295, 300, 305, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 337, 338, 342, 344, 349, 351, - 356, 357, 361, 362, 366, 368, 370, 373, 377, 379, - 384, 386, 388, 393, 398, 400, 405, 410, 412, 417, - 419, 424, 429, 434, 439, 444, 449, 454, 456, 461, - 466, 468, 473, 478, 483, 488, 490, 495, 500, 505, - 510, 511, 512, 516, 517, 521, 523, 525, 527, 529, - 531, 533, 535, 537, 539, 541, 546, 548, 553, 555, - 560, 565, 567, 569, 571, 573, 575, 577, 579, 581, - 583, 585, 587, 589, 591, 593, 595, 597, 599, 604, - 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, - 625, 626, 627, 628, 629, 630, 631, 635, 640, 642, - 644, 646, 651, 656, 657, 660, 661, 665, 667, 669, - 671, 673, 675, 680, 682, 684, 686, 691, 696, 698, - 701, 705, 708, 712, 714, 719, 721, 726, 731, 736, - 741, 746, 747, 748, 749, 750, 751, 752, 753, 754, - 758, 763, 768, 773, 778, 783, 788, 793, 798, 803, - 808, 810, 815, 817, 822, 827, 832, 837, 839, 844, - 846, 851, 856 + 0, 261, 261, 262, 266, 268, 270, 272, 274, 276, + 281, 285, 290, 291, 292, 293, 294, 298, 303, 308, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 340, 341, 345, 347, 352, 354, + 359, 360, 364, 365, 369, 371, 373, 376, 380, 382, + 387, 389, 391, 396, 401, 403, 408, 413, 415, 420, + 422, 427, 432, 437, 442, 447, 452, 457, 459, 464, + 469, 471, 476, 481, 486, 491, 493, 498, 503, 508, + 513, 514, 515, 519, 520, 524, 526, 528, 530, 532, + 534, 536, 538, 540, 542, 544, 546, 551, 553, 558, + 560, 565, 570, 572, 574, 576, 578, 580, 582, 584, + 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, + 629, 630, 631, 632, 633, 634, 635, 636, 640, 645, + 647, 649, 651, 656, 661, 662, 665, 666, 670, 672, + 674, 676, 678, 680, 685, 687, 689, 691, 696, 701, + 703, 706, 710, 713, 717, 719, 724, 726, 731, 736, + 738, 743, 744, 745, 749, 754, 759, 764, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 781, 786, 791, + 796, 801, 806, 811, 816, 821, 826, 831, 833, 838, + 840, 845, 850, 855, 860, 862, 867, 869, 874, 879 }; void @@ -4579,9 +4657,9 @@ namespace xsk { namespace gsc { namespace iw5 { #line 13 "parser.ypp" } } } // xsk::gsc::iw5 -#line 4583 "parser.cpp" +#line 4661 "parser.cpp" -#line 860 "parser.ypp" +#line 883 "parser.ypp" void xsk::gsc::iw5::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/iw5/xsk/parser.hpp b/src/iw5/xsk/parser.hpp index 4111285e..e7b716ec 100644 --- a/src/iw5/xsk/parser.hpp +++ b/src/iw5/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace iw5 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,101 +540,104 @@ namespace xsk { namespace gsc { namespace iw5 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waittill - char dummy63[sizeof (ast::stmt_waittill::ptr)]; + char dummy64[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy64[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy65[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy66[sizeof (ast::stmt_while::ptr)]; + char dummy67[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -640,7 +645,7 @@ namespace xsk { namespace gsc { namespace iw5 { // "localized string" // "float" // "integer" - char dummy67[sizeof (std::string)]; + char dummy68[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -991,30 +996,33 @@ namespace xsk { namespace gsc { namespace iw5 { S_expr_arguments = 168, // expr_arguments S_expr_arguments_no_empty = 169, // expr_arguments_no_empty S_expr_reference = 170, // expr_reference - S_expr_array = 171, // expr_array - S_expr_field = 172, // expr_field - S_expr_size = 173, // expr_size - S_expr_paren = 174, // expr_paren - S_expr_object = 175, // expr_object - S_expr_thisthread = 176, // expr_thisthread - S_expr_empty_array = 177, // expr_empty_array - S_expr_undefined = 178, // expr_undefined - S_expr_game = 179, // expr_game - S_expr_self = 180, // expr_self - S_expr_anim = 181, // expr_anim - S_expr_level = 182, // expr_level - S_expr_animation = 183, // expr_animation - S_expr_animtree = 184, // expr_animtree - S_expr_identifier_nosize = 185, // expr_identifier_nosize - S_expr_identifier = 186, // expr_identifier - S_expr_path = 187, // expr_path - S_expr_istring = 188, // expr_istring - S_expr_string = 189, // expr_string - S_expr_vector = 190, // expr_vector - S_expr_float = 191, // expr_float - S_expr_integer = 192, // expr_integer - S_expr_false = 193, // expr_false - S_expr_true = 194 // expr_true + S_expr_tuple = 171, // expr_tuple + S_expr_tuple_arguments = 172, // expr_tuple_arguments + S_expr_tuple_types = 173, // expr_tuple_types + S_expr_array = 174, // expr_array + S_expr_field = 175, // expr_field + S_expr_size = 176, // expr_size + S_expr_paren = 177, // expr_paren + S_expr_object = 178, // expr_object + S_expr_thisthread = 179, // expr_thisthread + S_expr_empty_array = 180, // expr_empty_array + S_expr_undefined = 181, // expr_undefined + S_expr_game = 182, // expr_game + S_expr_self = 183, // expr_self + S_expr_anim = 184, // expr_anim + S_expr_level = 185, // expr_level + S_expr_animation = 186, // expr_animation + S_expr_animtree = 187, // expr_animtree + S_expr_identifier_nosize = 188, // expr_identifier_nosize + S_expr_identifier = 189, // expr_identifier + S_expr_path = 190, // expr_path + S_expr_istring = 191, // expr_istring + S_expr_string = 192, // expr_string + S_expr_vector = 193, // expr_vector + S_expr_float = 194, // expr_float + S_expr_integer = 195, // expr_integer + S_expr_false = 196, // expr_false + S_expr_true = 197 // expr_true }; }; @@ -1080,6 +1088,8 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1202,6 +1212,10 @@ namespace xsk { namespace gsc { namespace iw5 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1851,6 +1865,20 @@ namespace xsk { namespace gsc { namespace iw5 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2352,6 +2380,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2474,6 +2504,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4796,8 +4830,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2363, ///< Last index in yytable_. - yynnts_ = 83, ///< Number of nonterminal symbols. + yylast_ = 2371, ///< Last index in yytable_. + yynnts_ = 86, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4853,6 +4887,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -4975,6 +5011,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5171,6 +5211,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5293,6 +5335,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5496,7 +5542,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw5 -#line 5500 "parser.hpp" +#line 5546 "parser.hpp" diff --git a/src/iw5/xsk/resolver.cpp b/src/iw5/xsk/resolver.cpp index 1eb336ff..e9808b20 100644 --- a/src/iw5/xsk/resolver.cpp +++ b/src/iw5/xsk/resolver.cpp @@ -45,7 +45,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -57,7 +57,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -74,7 +74,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -103,7 +103,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/iw6/xsk/assembler.cpp b/src/iw6/xsk/assembler.cpp index dbd76e14..a711cb65 100644 --- a/src/iw6/xsk/assembler.cpp +++ b/src/iw6/xsk/assembler.cpp @@ -384,7 +384,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -491,6 +491,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -554,7 +558,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -567,7 +571,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::iw6 diff --git a/src/iw6/xsk/compiler.cpp b/src/iw6/xsk/compiler.cpp index c22dd955..cb6f000e 100644 --- a/src/iw6/xsk/compiler.cpp +++ b/src/iw6/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -392,7 +397,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1030,11 +1035,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1540,7 +1552,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1585,6 +1597,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1624,7 +1659,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1710,7 +1745,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2238,7 +2273,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2305,11 +2340,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2332,11 +2367,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2364,7 +2399,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2373,7 +2408,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2381,8 +2416,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2414,13 +2449,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2580,23 +2615,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2623,7 +2675,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2637,7 +2689,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2650,7 +2701,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2828,8 +2879,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2844,7 +2894,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2877,7 +2927,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/iw6/xsk/compiler.hpp b/src/iw6/xsk/compiler.hpp index 3ed11b50..091594e6 100644 --- a/src/iw6/xsk/compiler.hpp +++ b/src/iw6/xsk/compiler.hpp @@ -95,6 +95,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -136,10 +137,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/iw6/xsk/decompiler.cpp b/src/iw6/xsk/decompiler.cpp index 6bcbb8bb..92893bf4 100644 --- a/src/iw6/xsk/decompiler.cpp +++ b/src/iw6/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,39 +1228,39 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1272,69 +1269,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1343,98 +1339,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1442,256 +1440,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1711,7 +1696,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1738,7 +1723,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1765,7 +1750,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1773,9 +1757,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1786,60 +1771,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1969,7 +1932,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2003,7 +1966,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2020,7 +1983,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2149,7 +2112,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2209,7 +2172,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2241,7 +2204,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2372,17 +2335,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2415,7 +2378,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2426,17 +2389,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2480,7 +2443,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2632,7 +2595,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2736,8 +2699,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2981,7 +2944,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3010,7 +2973,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3050,7 +3013,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3172,9 +3135,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3423,11 +3383,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3445,7 +3400,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3463,7 +3418,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/iw6/xsk/decompiler.hpp b/src/iw6/xsk/decompiler.hpp index 6d4378cf..6fa61337 100644 --- a/src/iw6/xsk/decompiler.hpp +++ b/src/iw6/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/iw6/xsk/disassembler.cpp b/src/iw6/xsk/disassembler.cpp index 4656e9a1..f9edf1ec 100644 --- a/src/iw6/xsk/disassembler.cpp +++ b/src/iw6/xsk/disassembler.cpp @@ -299,7 +299,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -493,7 +493,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -516,7 +516,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/iw6/xsk/iw6.cpp b/src/iw6/xsk/iw6.cpp index ff6386be..c235e9ab 100644 --- a/src/iw6/xsk/iw6.cpp +++ b/src/iw6/xsk/iw6.cpp @@ -174,7 +174,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/iw6/xsk/lexer.cpp b/src/iw6/xsk/lexer.cpp index 380b06b4..2e0b2a09 100644 --- a/src/iw6/xsk/lexer.cpp +++ b/src/iw6/xsk/lexer.cpp @@ -682,7 +682,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -716,7 +716,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -750,7 +750,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/iw6/xsk/parser.cpp b/src/iw6/xsk/parser.cpp index 4d9ed4f7..2222d48b 100644 --- a/src/iw6/xsk/parser.cpp +++ b/src/iw6/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace iw6 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -546,6 +552,8 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -668,6 +676,10 @@ namespace xsk { namespace gsc { namespace iw6 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -848,6 +860,8 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -970,6 +984,10 @@ namespace xsk { namespace gsc { namespace iw6 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1149,6 +1167,8 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1271,6 +1291,10 @@ namespace xsk { namespace gsc { namespace iw6 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1705,6 +1729,8 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1827,6 +1853,10 @@ namespace xsk { namespace gsc { namespace iw6 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -1984,1333 +2014,1375 @@ namespace xsk { namespace gsc { namespace iw6 { switch (yyn) { case 2: // root: program -#line 258 "parser.ypp" +#line 261 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 1990 "parser.cpp" - break; - - case 3: // root: %empty -#line 259 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 1996 "parser.cpp" - break; - - case 4: // program: program inline -#line 264 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2002 "parser.cpp" - break; - - case 5: // program: program include -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2008 "parser.cpp" - break; - - case 6: // program: program declaration -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2014 "parser.cpp" - break; - - case 7: // program: inline -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; - case 8: // program: include -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 262 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2026 "parser.cpp" break; - case 9: // program: declaration -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 267 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2032 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 278 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2038 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 283 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2044 "parser.cpp" break; - case 12: // declaration: "/#" -#line 287 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; - case 13: // declaration: "#/" -#line 288 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2056 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2062 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 281 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2068 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 286 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2074 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 296 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 290 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2080 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 301 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 291 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2086 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 306 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2092 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 310 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2098 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 311 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2104 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 299 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2110 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 304 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2116 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 309 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2122 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 313 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2128 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 314 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2134 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2140 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2146 "parser.cpp" break; - case 29: // stmt: stmt_if -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 24: // stmt: stmt_notify +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2152 "parser.cpp" break; - case 30: // stmt: stmt_ifelse -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 25: // stmt: stmt_wait +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2158 "parser.cpp" break; - case 31: // stmt: stmt_while -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2164 "parser.cpp" break; - case 32: // stmt: stmt_dowhile -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2170 "parser.cpp" break; - case 33: // stmt: stmt_for -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2176 "parser.cpp" break; - case 34: // stmt: stmt_foreach -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 29: // stmt: stmt_if +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2182 "parser.cpp" break; - case 35: // stmt: stmt_switch -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 30: // stmt: stmt_ifelse +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2188 "parser.cpp" break; - case 36: // stmt: stmt_case -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 31: // stmt: stmt_while +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2194 "parser.cpp" break; - case 37: // stmt: stmt_default -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 32: // stmt: stmt_dowhile +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2200 "parser.cpp" break; - case 38: // stmt: stmt_break -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 33: // stmt: stmt_for +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2206 "parser.cpp" break; - case 39: // stmt: stmt_continue -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 34: // stmt: stmt_foreach +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2212 "parser.cpp" break; - case 40: // stmt: stmt_return -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 35: // stmt: stmt_switch +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2218 "parser.cpp" break; - case 41: // stmt: stmt_breakpoint -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 36: // stmt: stmt_case +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2224 "parser.cpp" break; - case 42: // stmt: stmt_prof_begin -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 37: // stmt: stmt_default +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2230 "parser.cpp" break; - case 43: // stmt: stmt_prof_end -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 38: // stmt: stmt_break +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2236 "parser.cpp" break; - case 44: // stmt_or_dev: stmt -#line 337 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 39: // stmt: stmt_continue +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2242 "parser.cpp" break; - case 45: // stmt_or_dev: stmt_dev -#line 338 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 40: // stmt: stmt_return +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2248 "parser.cpp" break; - case 46: // stmt_list: stmt_list stmt -#line 343 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 41: // stmt: stmt_breakpoint +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2254 "parser.cpp" break; - case 47: // stmt_list: stmt -#line 345 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_prof_begin +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2260 "parser.cpp" break; - case 48: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 350 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_end +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2266 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev -#line 352 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt_or_dev: stmt +#line 340 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2272 "parser.cpp" break; - case 50: // stmt_dev: "/#" stmt_list "#/" -#line 356 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 45: // stmt_or_dev: stmt_dev +#line 341 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2278 "parser.cpp" break; - case 51: // stmt_dev: "/#" "#/" -#line 357 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 46: // stmt_list: stmt_list stmt +#line 346 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2284 "parser.cpp" break; - case 52: // stmt_block: "{" stmt_or_dev_list "}" -#line 361 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 47: // stmt_list: stmt +#line 348 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2290 "parser.cpp" break; - case 53: // stmt_block: "{" "}" -#line 362 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 48: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 353 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2296 "parser.cpp" break; - case 54: // stmt_expr: expr_assign -#line 367 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 49: // stmt_or_dev_list: stmt_or_dev +#line 355 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2302 "parser.cpp" break; - case 55: // stmt_expr: expr_increment -#line 369 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_dev: "/#" stmt_list "#/" +#line 359 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2308 "parser.cpp" break; - case 56: // stmt_expr: expr_decrement -#line 371 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" "#/" +#line 360 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2314 "parser.cpp" break; - case 57: // stmt_expr: %empty -#line 373 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 52: // stmt_block: "{" stmt_or_dev_list "}" +#line 364 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2320 "parser.cpp" break; - case 58: // stmt_call: expr_call ";" -#line 378 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 53: // stmt_block: "{" "}" +#line 365 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2326 "parser.cpp" break; - case 59: // stmt_call: expr_method ";" -#line 380 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 54: // stmt_expr: expr_assign +#line 370 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; - case 60: // stmt_assign: expr_assign ";" -#line 385 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 55: // stmt_expr: expr_increment +#line 372 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; - case 61: // stmt_assign: expr_increment ";" -#line 387 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_decrement +#line 374 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2344 "parser.cpp" break; - case 62: // stmt_assign: expr_decrement ";" -#line 389 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: %empty +#line 376 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2350 "parser.cpp" break; - case 63: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 394 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 58: // stmt_call: expr_call ";" +#line 381 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2356 "parser.cpp" break; - case 64: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 399 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 59: // stmt_call: expr_method ";" +#line 383 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2362 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 401 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 60: // stmt_assign: expr_assign ";" +#line 388 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2368 "parser.cpp" break; - case 66: // stmt_wait: "wait" expr ";" -#line 406 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 61: // stmt_assign: expr_increment ";" +#line 390 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2374 "parser.cpp" break; - case 67: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 411 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 62: // stmt_assign: expr_decrement ";" +#line 392 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2380 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 413 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 63: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 397 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2386 "parser.cpp" break; - case 69: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 418 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 64: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 402 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2392 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 420 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 65: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 404 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2398 "parser.cpp" break; - case 71: // stmt_waittillframeend: "waittillframeend" ";" -#line 425 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 66: // stmt_wait: "wait" expr ";" +#line 409 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2404 "parser.cpp" break; - case 72: // stmt_if: "if" "(" expr ")" stmt -#line 430 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 67: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 414 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2410 "parser.cpp" break; - case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 416 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2416 "parser.cpp" break; - case 74: // stmt_while: "while" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 69: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 421 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2422 "parser.cpp" break; - case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 423 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2428 "parser.cpp" break; - case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillframeend: "waittillframeend" ";" +#line 428 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2434 "parser.cpp" break; - case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_if: "if" "(" expr ")" stmt +#line 433 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2440 "parser.cpp" break; - case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 457 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2446 "parser.cpp" break; - case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 462 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 74: // stmt_while: "while" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2452 "parser.cpp" break; - case 80: // stmt_case: "case" expr_integer ":" -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2458 "parser.cpp" break; - case 81: // stmt_case: "case" expr_string ":" -#line 469 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2464 "parser.cpp" break; - case 82: // stmt_default: "default" ":" -#line 474 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2470 "parser.cpp" break; - case 83: // stmt_break: "break" ";" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 460 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2476 "parser.cpp" break; - case 84: // stmt_continue: "continue" ";" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 79: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 465 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2482 "parser.cpp" break; - case 85: // stmt_return: "return" expr ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 80: // stmt_case: "case" expr_integer ":" +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2488 "parser.cpp" break; - case 86: // stmt_return: "return" ";" -#line 491 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 81: // stmt_case: "case" expr_string ":" +#line 472 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; - case 87: // stmt_breakpoint: "breakpoint" ";" -#line 496 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_default: "default" ":" +#line 477 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2500 "parser.cpp" break; - case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 83: // stmt_break: "break" ";" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2506 "parser.cpp" break; - case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 84: // stmt_continue: "continue" ";" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2512 "parser.cpp" break; - case 90: // expr: expr_ternary -#line 510 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 85: // stmt_return: "return" expr ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2518 "parser.cpp" break; - case 91: // expr: expr_binary -#line 511 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 86: // stmt_return: "return" ";" +#line 494 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2524 "parser.cpp" break; - case 92: // expr: expr_primitive -#line 512 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 87: // stmt_breakpoint: "breakpoint" ";" +#line 499 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2530 "parser.cpp" break; - case 93: // expr_or_empty: expr -#line 516 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2536 "parser.cpp" break; - case 94: // expr_or_empty: %empty -#line 517 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2542 "parser.cpp" break; - case 95: // expr_assign: expr_object "=" expr -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 90: // expr: expr_ternary +#line 513 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2548 "parser.cpp" break; - case 96: // expr_assign: expr_object "|=" expr -#line 524 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 91: // expr: expr_binary +#line 514 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2554 "parser.cpp" break; - case 97: // expr_assign: expr_object "&=" expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 92: // expr: expr_primitive +#line 515 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2560 "parser.cpp" break; - case 98: // expr_assign: expr_object "^=" expr -#line 528 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr_or_empty: expr +#line 519 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2566 "parser.cpp" break; - case 99: // expr_assign: expr_object "<<=" expr -#line 530 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 94: // expr_or_empty: %empty +#line 520 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2572 "parser.cpp" break; - case 100: // expr_assign: expr_object ">>=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr_assign: expr_tuple "=" expr +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2578 "parser.cpp" break; - case 101: // expr_assign: expr_object "+=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_assign: expr_object "=" expr +#line 527 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2584 "parser.cpp" break; - case 102: // expr_assign: expr_object "-=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_assign: expr_object "|=" expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2590 "parser.cpp" break; - case 103: // expr_assign: expr_object "*=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_object "&=" expr +#line 531 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2596 "parser.cpp" break; - case 104: // expr_assign: expr_object "/=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "^=" expr +#line 533 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2602 "parser.cpp" break; - case 105: // expr_assign: expr_object "%=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "<<=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2608 "parser.cpp" break; - case 106: // expr_increment: "++" expr_object -#line 547 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 101: // expr_assign: expr_object ">>=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2614 "parser.cpp" break; - case 107: // expr_increment: expr_object "++" -#line 549 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 102: // expr_assign: expr_object "+=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2620 "parser.cpp" break; - case 108: // expr_decrement: "--" expr_object -#line 554 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 103: // expr_assign: expr_object "-=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2626 "parser.cpp" break; - case 109: // expr_decrement: expr_object "--" -#line 556 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 104: // expr_assign: expr_object "*=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2632 "parser.cpp" break; - case 110: // expr_ternary: expr "?" expr ":" expr -#line 561 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 105: // expr_assign: expr_object "/=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2638 "parser.cpp" break; - case 111: // expr_binary: expr "||" expr -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 106: // expr_assign: expr_object "%=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2644 "parser.cpp" break; - case 112: // expr_binary: expr "&&" expr -#line 568 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 107: // expr_increment: "++" expr_object +#line 552 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2650 "parser.cpp" break; - case 113: // expr_binary: expr "==" expr -#line 570 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_increment: expr_object "++" +#line 554 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2656 "parser.cpp" break; - case 114: // expr_binary: expr "!=" expr -#line 572 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_decrement: "--" expr_object +#line 559 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2662 "parser.cpp" break; - case 115: // expr_binary: expr "<=" expr -#line 574 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_decrement: expr_object "--" +#line 561 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2668 "parser.cpp" break; - case 116: // expr_binary: expr ">=" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_ternary: expr "?" expr ":" expr +#line 566 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2674 "parser.cpp" break; - case 117: // expr_binary: expr "<" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_binary: expr "||" expr +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2680 "parser.cpp" break; - case 118: // expr_binary: expr ">" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_binary: expr "&&" expr +#line 573 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2686 "parser.cpp" break; - case 119: // expr_binary: expr "|" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_binary: expr "==" expr +#line 575 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2692 "parser.cpp" break; - case 120: // expr_binary: expr "&" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "!=" expr +#line 577 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2698 "parser.cpp" break; - case 121: // expr_binary: expr "^" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "<=" expr +#line 579 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2704 "parser.cpp" break; - case 122: // expr_binary: expr "<<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr ">=" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2710 "parser.cpp" break; - case 123: // expr_binary: expr ">>" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "<" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2716 "parser.cpp" break; - case 124: // expr_binary: expr "+" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr ">" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2722 "parser.cpp" break; - case 125: // expr_binary: expr "-" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr "|" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2728 "parser.cpp" break; - case 126: // expr_binary: expr "*" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "&" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2734 "parser.cpp" break; - case 127: // expr_binary: expr "/" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr "^" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2740 "parser.cpp" break; - case 128: // expr_binary: expr "%" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "<<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2746 "parser.cpp" break; - case 129: // expr_primitive: expr_complement -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 124: // expr_binary: expr ">>" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2752 "parser.cpp" break; - case 130: // expr_primitive: expr_negate -#line 605 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 125: // expr_binary: expr "+" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2758 "parser.cpp" break; - case 131: // expr_primitive: expr_not -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 126: // expr_binary: expr "-" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2764 "parser.cpp" break; - case 132: // expr_primitive: expr_call -#line 607 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 127: // expr_binary: expr "*" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2770 "parser.cpp" break; - case 133: // expr_primitive: expr_method -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 128: // expr_binary: expr "/" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2776 "parser.cpp" break; - case 134: // expr_primitive: expr_add_array -#line 609 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 129: // expr_binary: expr "%" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2782 "parser.cpp" break; - case 135: // expr_primitive: expr_reference -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 130: // expr_primitive: expr_complement +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2788 "parser.cpp" break; - case 136: // expr_primitive: expr_array -#line 611 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 131: // expr_primitive: expr_negate +#line 610 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2794 "parser.cpp" break; - case 137: // expr_primitive: expr_field -#line 612 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 132: // expr_primitive: expr_not +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2800 "parser.cpp" break; - case 138: // expr_primitive: expr_size -#line 613 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 133: // expr_primitive: expr_call +#line 612 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2806 "parser.cpp" break; - case 139: // expr_primitive: expr_paren -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 134: // expr_primitive: expr_method +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2812 "parser.cpp" break; - case 140: // expr_primitive: expr_thisthread -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 135: // expr_primitive: expr_add_array +#line 614 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2818 "parser.cpp" break; - case 141: // expr_primitive: expr_empty_array -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 136: // expr_primitive: expr_reference +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2824 "parser.cpp" break; - case 142: // expr_primitive: expr_undefined -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 137: // expr_primitive: expr_array +#line 616 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2830 "parser.cpp" break; - case 143: // expr_primitive: expr_game -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 138: // expr_primitive: expr_field +#line 617 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2836 "parser.cpp" break; - case 144: // expr_primitive: expr_self -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 139: // expr_primitive: expr_size +#line 618 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2842 "parser.cpp" break; - case 145: // expr_primitive: expr_anim -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 140: // expr_primitive: expr_paren +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2848 "parser.cpp" break; - case 146: // expr_primitive: expr_level -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 141: // expr_primitive: expr_thisthread +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2854 "parser.cpp" break; - case 147: // expr_primitive: expr_animation -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 142: // expr_primitive: expr_empty_array +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2860 "parser.cpp" break; - case 148: // expr_primitive: expr_animtree -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 143: // expr_primitive: expr_undefined +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2866 "parser.cpp" break; - case 149: // expr_primitive: expr_identifier -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 144: // expr_primitive: expr_game +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2872 "parser.cpp" break; - case 150: // expr_primitive: expr_istring -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 145: // expr_primitive: expr_self +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2878 "parser.cpp" break; - case 151: // expr_primitive: expr_string -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 146: // expr_primitive: expr_anim +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2884 "parser.cpp" break; - case 152: // expr_primitive: expr_vector -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 147: // expr_primitive: expr_level +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2890 "parser.cpp" break; - case 153: // expr_primitive: expr_float -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 148: // expr_primitive: expr_animation +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2896 "parser.cpp" break; - case 154: // expr_primitive: expr_integer -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 149: // expr_primitive: expr_animtree +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2902 "parser.cpp" break; - case 155: // expr_primitive: expr_false -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 150: // expr_primitive: expr_identifier +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2908 "parser.cpp" break; - case 156: // expr_primitive: expr_true -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 151: // expr_primitive: expr_istring +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2914 "parser.cpp" break; - case 157: // expr_complement: "~" expr -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 152: // expr_primitive: expr_string +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2920 "parser.cpp" break; - case 158: // expr_negate: "-" expr_identifier -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 153: // expr_primitive: expr_vector +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2926 "parser.cpp" break; - case 159: // expr_negate: "-" expr_paren -#line 643 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 154: // expr_primitive: expr_float +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2932 "parser.cpp" break; - case 160: // expr_negate: "-" expr_array -#line 645 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 155: // expr_primitive: expr_integer +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2938 "parser.cpp" break; - case 161: // expr_negate: "-" expr_field -#line 647 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 156: // expr_primitive: expr_false +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2944 "parser.cpp" break; - case 162: // expr_not: "!" expr -#line 652 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 157: // expr_primitive: expr_true +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2950 "parser.cpp" break; - case 163: // expr_call: expr_function -#line 656 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 158: // expr_complement: "~" expr +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2956 "parser.cpp" break; - case 164: // expr_call: expr_pointer -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 159: // expr_negate: "-" expr_identifier +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 2962 "parser.cpp" break; - case 165: // expr_method: expr_object expr_function -#line 660 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 160: // expr_negate: "-" expr_paren +#line 648 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 2968 "parser.cpp" break; - case 166: // expr_method: expr_object expr_pointer -#line 661 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_negate: "-" expr_array +#line 650 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 2974 "parser.cpp" break; - case 167: // expr_function: expr_identifier "(" expr_arguments ")" -#line 666 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 162: // expr_negate: "-" expr_field +#line 652 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 2980 "parser.cpp" break; - case 168: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 668 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 163: // expr_not: "!" expr +#line 657 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2986 "parser.cpp" break; - case 169: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 670 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 164: // expr_call: expr_function +#line 661 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2992 "parser.cpp" break; - case 170: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 672 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 165: // expr_call: expr_pointer +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2998 "parser.cpp" break; - case 171: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 674 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 166: // expr_method: expr_object expr_function +#line 665 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3004 "parser.cpp" break; - case 172: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 167: // expr_method: expr_object expr_pointer +#line 666 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3010 "parser.cpp" break; - case 173: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 681 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 168: // expr_function: expr_identifier "(" expr_arguments ")" +#line 671 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3016 "parser.cpp" break; - case 174: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 683 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 169: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 673 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3022 "parser.cpp" break; - case 175: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 685 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 675 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3028 "parser.cpp" break; - case 176: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 687 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 171: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 677 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3034 "parser.cpp" break; - case 177: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 692 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 172: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 679 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3040 "parser.cpp" break; - case 178: // expr_parameters: expr_parameters "," expr_identifier -#line 697 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 173: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3046 "parser.cpp" break; - case 179: // expr_parameters: expr_identifier -#line 699 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 174: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 686 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3052 "parser.cpp" break; - case 180: // expr_parameters: %empty -#line 701 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 175: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 688 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3058 "parser.cpp" break; - case 181: // expr_arguments: expr_arguments_no_empty -#line 706 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 176: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 690 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3064 "parser.cpp" break; - case 182: // expr_arguments: %empty -#line 708 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 177: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 692 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3070 "parser.cpp" break; - case 183: // expr_arguments_no_empty: expr_arguments "," expr -#line 713 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 178: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 697 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3076 "parser.cpp" break; - case 184: // expr_arguments_no_empty: expr -#line 715 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 179: // expr_parameters: expr_parameters "," expr_identifier +#line 702 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3082 "parser.cpp" break; - case 185: // expr_reference: "::" expr_identifier -#line 720 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 180: // expr_parameters: expr_identifier +#line 704 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3088 "parser.cpp" break; - case 186: // expr_reference: expr_path "::" expr_identifier -#line 722 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 181: // expr_parameters: %empty +#line 706 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3094 "parser.cpp" break; - case 187: // expr_array: expr_object "[" expr "]" -#line 727 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 182: // expr_arguments: expr_arguments_no_empty +#line 711 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3100 "parser.cpp" break; - case 188: // expr_field: expr_object "." expr_identifier_nosize -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_arguments: %empty +#line 713 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3106 "parser.cpp" break; - case 189: // expr_size: expr_object "." "size" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 184: // expr_arguments_no_empty: expr_arguments "," expr +#line 718 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3112 "parser.cpp" break; - case 190: // expr_paren: "(" expr ")" -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments_no_empty: expr +#line 720 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3118 "parser.cpp" break; - case 191: // expr_object: expr_call -#line 746 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 186: // expr_reference: "::" expr_identifier +#line 725 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3124 "parser.cpp" break; - case 192: // expr_object: expr_method -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 187: // expr_reference: expr_path "::" expr_identifier +#line 727 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3130 "parser.cpp" break; - case 193: // expr_object: expr_array -#line 748 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 188: // expr_tuple: "[" expr_tuple_arguments "]" +#line 732 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3136 "parser.cpp" break; - case 194: // expr_object: expr_field -#line 749 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 189: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3142 "parser.cpp" break; - case 195: // expr_object: expr_game -#line 750 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 190: // expr_tuple_arguments: expr_tuple_types +#line 739 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3148 "parser.cpp" break; - case 196: // expr_object: expr_self -#line 751 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 191: // expr_tuple_types: expr_array +#line 743 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3154 "parser.cpp" break; - case 197: // expr_object: expr_anim -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 192: // expr_tuple_types: expr_field +#line 744 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3160 "parser.cpp" break; - case 198: // expr_object: expr_level -#line 753 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 193: // expr_tuple_types: expr_identifier +#line 745 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3166 "parser.cpp" break; - case 199: // expr_object: expr_identifier -#line 754 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 194: // expr_array: expr_object "[" expr "]" +#line 750 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3172 "parser.cpp" break; - case 200: // expr_thisthread: "thisthread" -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 195: // expr_field: expr_object "." expr_identifier_nosize +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3178 "parser.cpp" break; - case 201: // expr_empty_array: "[" "]" -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 196: // expr_size: expr_object "." "size" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3184 "parser.cpp" break; - case 202: // expr_undefined: "undefined" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 197: // expr_paren: "(" expr ")" +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3190 "parser.cpp" break; - case 203: // expr_game: "game" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_object: expr_call +#line 769 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3196 "parser.cpp" break; - case 204: // expr_self: "self" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_object: expr_method +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3202 "parser.cpp" break; - case 205: // expr_anim: "anim" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_object: expr_array +#line 771 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3208 "parser.cpp" break; - case 206: // expr_level: "level" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_field +#line 772 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3214 "parser.cpp" break; - case 207: // expr_animation: "%" "identifier" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 202: // expr_object: expr_game +#line 773 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3220 "parser.cpp" break; - case 208: // expr_animtree: "#animtree" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_self +#line 774 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3226 "parser.cpp" break; - case 209: // expr_identifier_nosize: "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 204: // expr_object: expr_anim +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3232 "parser.cpp" break; - case 210: // expr_identifier: "identifier" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_level +#line 776 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3238 "parser.cpp" break; - case 211: // expr_identifier: "size" -#line 811 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 206: // expr_object: expr_identifier +#line 777 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3244 "parser.cpp" break; - case 212: // expr_path: "identifier" -#line 816 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_thisthread: "thisthread" +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3250 "parser.cpp" break; - case 213: // expr_path: "path" -#line 818 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_empty_array: "[" "]" +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3256 "parser.cpp" break; - case 214: // expr_istring: "localized string" -#line 823 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 209: // expr_undefined: "undefined" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3262 "parser.cpp" break; - case 215: // expr_string: "string literal" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_game: "game" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3268 "parser.cpp" break; - case 216: // expr_vector: "(" expr "," expr "," expr ")" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 211: // expr_self: "self" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3274 "parser.cpp" break; - case 217: // expr_float: "-" "float" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 212: // expr_anim: "anim" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; - case 218: // expr_float: "float" -#line 840 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_level: "level" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; - case 219: // expr_integer: "-" "integer" -#line 845 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 214: // expr_animation: "%" "identifier" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3292 "parser.cpp" break; - case 220: // expr_integer: "integer" -#line 847 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 215: // expr_animtree: "#animtree" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3298 "parser.cpp" break; - case 221: // expr_false: "false" -#line 852 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 216: // expr_identifier_nosize: "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3304 "parser.cpp" break; - case 222: // expr_true: "true" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 217: // expr_identifier: "identifier" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3310 "parser.cpp" break; + case 218: // expr_identifier: "size" +#line 834 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3316 "parser.cpp" + break; -#line 3314 "parser.cpp" + case 219: // expr_path: "identifier" +#line 839 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3322 "parser.cpp" + break; + + case 220: // expr_path: "path" +#line 841 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3328 "parser.cpp" + break; + + case 221: // expr_istring: "localized string" +#line 846 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3334 "parser.cpp" + break; + + case 222: // expr_string: "string literal" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3340 "parser.cpp" + break; + + case 223: // expr_vector: "(" expr "," expr "," expr ")" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3346 "parser.cpp" + break; + + case 224: // expr_float: "-" "float" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3352 "parser.cpp" + break; + + case 225: // expr_float: "float" +#line 863 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3358 "parser.cpp" + break; + + case 226: // expr_integer: "-" "integer" +#line 868 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3364 "parser.cpp" + break; + + case 227: // expr_integer: "integer" +#line 870 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3370 "parser.cpp" + break; + + case 228: // expr_false: "false" +#line 875 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3376 "parser.cpp" + break; + + case 229: // expr_true: "true" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3382 "parser.cpp" + break; + + +#line 3386 "parser.cpp" default: break; @@ -3521,7 +3593,8 @@ namespace xsk { namespace gsc { namespace iw6 { "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", + "expr_tuple", "expr_tuple_arguments", "expr_tuple_types", "expr_array", + "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier_nosize", "expr_identifier", @@ -3795,469 +3868,484 @@ namespace xsk { namespace gsc { namespace iw6 { } - const short parser::yypact_ninf_ = -280; + const short parser::yypact_ninf_ = -281; - const short parser::yytable_ninf_ = -213; + const short parser::yytable_ninf_ = -220; const short parser::yypact_[] = { - 26, -280, -280, -44, -44, -8, -280, -280, 19, 26, - -280, -280, -280, -280, -280, -280, -30, -280, -280, -11, - 2, -75, -280, -280, -280, -280, -38, 1168, -280, -280, - -280, -6, -41, -280, -280, -31, -28, -280, 12, -280, - -280, -280, -280, -280, -280, -280, 1168, 1042, -38, 1168, - 1168, 51, -24, 23, -280, -280, -280, 2072, -280, -280, - -280, -280, -280, -280, 324, 440, -280, -280, -280, -280, - 515, 550, -280, -280, 651, -280, -280, -280, 661, 862, - 867, 1065, -280, -280, 71, 33, -280, -280, -280, -280, - -280, -280, -280, 35, 31, -38, 48, 57, 59, 61, - 73, 66, 76, 1364, 1042, -280, 2155, 77, 87, -280, - -280, -280, 1168, 82, -280, -280, -280, -280, 515, 550, - -280, 1073, -280, -280, -280, -280, 71, 91, -280, -280, - 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, - 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1231, - -36, -280, -280, 105, 1168, -38, -280, 831, -280, -280, - 1168, 1168, -38, 1168, 1168, -38, 1168, -280, 1168, 1164, - 1168, -280, 1530, 1168, 49, -38, 2037, 95, 95, 2186, - 2196, 187, 187, -37, -37, -37, -37, 2227, 2268, 2237, - -62, -62, -280, -280, -280, 1842, -280, -280, -280, -32, - -280, 109, 960, 1168, 100, 112, 1354, 113, 119, 120, - 121, -21, 114, 117, 122, 1105, 123, 129, 130, -280, - 39, 39, -280, -280, 907, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - 133, 135, 136, 137, 138, -280, -280, 1278, 105, 1882, - 18, 150, 1922, 52, 153, 1962, 2001, 151, 2155, 1164, - 109, 1168, -280, -280, 1168, -280, -280, 1013, 2107, -280, - 1168, 182, 1168, 618, -38, 1168, 108, 152, 154, -280, - -280, -280, -280, 2142, -280, 1168, 1168, 1073, 1073, -280, - -280, -280, -280, -280, -280, -280, 159, 162, 166, 167, - -280, -280, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, - 1168, 1168, 1168, 163, -280, 1168, 172, -280, 1168, 176, - 1168, 171, 2155, 55, -280, -280, -280, 1564, 183, 1598, - 175, -280, -280, -280, 696, -15, 1632, -280, -280, -280, - 62, 63, 1168, 1168, 1168, 1168, 2155, 2155, 2155, 2155, - 2155, 2155, 2155, 2155, 2155, 2155, 2155, 186, 75, 191, - 81, 192, 1666, 1168, -280, 1354, 1168, 1354, 1168, 1168, - -38, 31, 190, 194, 1700, 1408, 1452, 1496, 1168, -280, - 1168, -280, 1168, -280, 88, 199, 1734, -280, 2155, 195, - 1768, 221, -280, -280, -280, 202, 203, 1168, 204, 1168, - 208, 1168, 92, 101, 102, -280, 1354, 209, 618, 1354, - 1168, -280, -280, 219, -280, 222, -280, 223, -280, -280, - -280, -280, -280, 224, -280, 1802, 212, 229, 230, 1354, - 1354, -280, -280, -280, -280, -280 + 4, -281, -281, -72, -72, -41, -281, -281, 32, 4, + -281, -281, -281, -281, -281, -281, -21, -281, -281, -28, + -1, -22, -281, -281, -281, -281, -43, 1235, -281, -281, + -281, 5, -29, -281, -281, -26, -24, -281, 8, -281, + -281, -281, -281, -281, -281, -281, 1235, 1109, -43, 1235, + 1235, 612, 1, 47, -281, -281, -281, 2111, -281, -281, + -281, -281, -281, -281, 108, 145, -281, -281, -281, -281, + 372, 438, -281, -281, 633, -281, -281, -281, 664, 818, + 982, 987, -281, -281, 39, 59, -281, -281, -281, -281, + -281, -281, -281, 61, 16, -43, 65, 78, 79, 103, + 109, 127, 133, 1443, 1109, -281, 2194, 125, 136, -281, + -281, -281, 1235, 134, -281, -281, -281, -281, 372, 438, + -281, 1132, -281, -281, -281, -281, 39, 137, -281, -281, + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1298, + -35, -281, -281, 147, 1235, -43, -281, 951, -281, -281, + 1235, 1235, -43, 1235, 1235, -43, 1235, -281, 1235, 1231, + 1235, -281, 1609, 1235, 102, -43, 2076, -51, -51, 2225, + 865, 2276, 2276, -27, -27, -27, -27, 2235, 273, 2266, + 51, 51, -281, -281, -281, 1294, -281, -281, -281, 23, + -281, 150, 77, 1235, 148, 157, 1381, 160, 162, 163, + 166, -15, 158, 165, 167, 1172, 168, 172, 173, -281, + 409, 703, 703, -281, -281, 1027, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, 175, 184, 185, 186, 187, 142, -281, -281, 808, + 147, 1921, 30, 176, 1961, 36, 182, 2001, 2040, 195, + 2194, 1231, 150, 1235, -281, -281, 1235, -281, -281, 1080, + 2146, -281, 1235, 224, 1235, 738, -43, 1235, 151, 193, + 196, -281, -281, -281, -281, 2181, -281, 1235, 1235, 1298, + 35, -281, 112, 123, -4, 1132, 1132, -281, -281, -281, + -281, -281, -281, -281, 1235, 204, 206, 209, 210, -281, + -281, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1235, 207, -281, 1235, 211, -281, 1235, 212, 1235, + 214, 2194, 76, -281, -281, -281, 1643, 215, 1677, 201, + -281, -281, -281, 1407, -8, 1711, -281, -281, -281, 82, + 85, -281, 703, 2194, 1235, 1235, 1235, 1235, 2194, 2194, + 2194, 2194, 2194, 2194, 2194, 2194, 2194, 2194, 2194, 219, + 104, 220, 107, 221, 1745, 1235, -281, 1381, 1235, 1381, + 1235, 1235, -43, 16, 216, 222, -281, 1779, 1487, 1531, + 1575, 1235, -281, 1235, -281, 1235, -281, 120, 249, 1813, + -281, 2194, 223, 1847, 246, -281, -281, -281, 227, 229, + 1235, 232, 1235, 235, 1235, 124, 126, 138, -281, 1381, + 236, 738, 1381, 1235, -281, -281, 228, -281, 230, -281, + 247, -281, -281, -281, -281, -281, 250, -281, 1881, 242, + 243, 248, 1381, 1381, -281, -281, -281, -281, -281 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 211, 210, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 213, 212, 0, - 0, 0, 1, 4, 5, 6, 180, 0, 10, 11, - 215, 0, 0, 179, 208, 0, 0, 200, 0, 222, - 221, 202, 203, 204, 205, 206, 0, 182, 0, 0, - 0, 0, 0, 210, 214, 218, 220, 0, 90, 91, - 92, 129, 130, 131, 132, 133, 163, 164, 134, 135, - 136, 137, 138, 139, 0, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 0, 150, 151, 152, 153, - 154, 155, 156, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 182, 201, 184, 0, 181, 185, - 162, 157, 0, 0, 217, 219, 191, 192, 160, 161, - 159, 0, 195, 196, 197, 198, 158, 0, 207, 18, + 3, 12, 13, 0, 0, 0, 218, 217, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 220, 219, 0, + 0, 0, 1, 4, 5, 6, 181, 0, 10, 11, + 222, 0, 0, 180, 215, 0, 0, 207, 0, 229, + 228, 209, 210, 211, 212, 213, 0, 183, 0, 0, + 0, 0, 0, 217, 221, 225, 227, 0, 90, 91, + 92, 130, 131, 132, 133, 134, 164, 165, 135, 136, + 137, 138, 139, 140, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 0, 151, 152, 153, 154, + 155, 156, 157, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 183, 208, 185, 0, 182, 186, + 163, 158, 0, 0, 224, 226, 198, 199, 161, 162, + 160, 0, 202, 203, 204, 205, 159, 0, 214, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 165, 166, 0, 182, 0, 17, 0, 19, 178, - 0, 182, 0, 0, 182, 0, 0, 190, 0, 184, - 0, 177, 0, 0, 0, 0, 0, 122, 123, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 124, 125, 126, 127, 128, 0, 189, 209, 188, 0, - 181, 186, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 166, 167, 0, 183, 0, 17, 0, 19, 179, + 0, 183, 0, 0, 183, 0, 0, 197, 0, 185, + 0, 178, 0, 0, 0, 0, 0, 123, 124, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 125, 126, 127, 128, 129, 0, 196, 216, 195, 0, + 182, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 0, 44, 49, 0, 45, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 0, 0, 0, 191, 192, 193, 194, 0, 199, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, - 0, 0, 187, 167, 182, 51, 47, 0, 0, 71, - 0, 0, 0, 57, 0, 0, 0, 0, 0, 82, - 83, 84, 86, 0, 87, 182, 182, 106, 108, 52, - 48, 60, 61, 62, 58, 59, 0, 0, 0, 0, - 107, 109, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 169, 182, 0, 171, 182, 0, - 0, 0, 110, 0, 50, 46, 66, 0, 0, 0, - 0, 54, 55, 56, 0, 0, 0, 81, 80, 85, - 0, 0, 0, 0, 0, 0, 95, 101, 102, 103, - 104, 105, 96, 97, 98, 100, 99, 0, 0, 0, - 0, 0, 0, 182, 168, 0, 0, 0, 94, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 182, 170, - 182, 172, 182, 216, 0, 72, 0, 74, 93, 0, - 0, 0, 79, 88, 89, 0, 0, 182, 0, 182, - 0, 182, 0, 0, 0, 173, 0, 0, 57, 0, - 0, 63, 65, 181, 68, 181, 70, 181, 174, 175, - 176, 73, 75, 0, 77, 0, 0, 0, 0, 0, - 0, 64, 67, 69, 76, 78 + 0, 0, 0, 44, 49, 0, 45, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 0, 0, 0, 198, 199, 0, 200, 201, 0, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 184, 0, 0, 0, 194, 168, 183, 51, 47, 0, + 0, 71, 0, 0, 0, 57, 0, 0, 0, 0, + 0, 82, 83, 84, 86, 0, 87, 183, 183, 0, + 0, 190, 200, 201, 206, 107, 109, 52, 48, 60, + 61, 62, 58, 59, 0, 0, 0, 0, 0, 108, + 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 183, 0, 172, 183, 0, 0, + 0, 111, 0, 50, 46, 66, 0, 0, 0, 0, + 54, 55, 56, 0, 0, 0, 81, 80, 85, 0, + 0, 188, 0, 95, 0, 0, 0, 0, 96, 102, + 103, 104, 105, 106, 97, 98, 99, 101, 100, 0, + 0, 0, 0, 0, 0, 183, 169, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 189, 0, 0, 0, + 0, 183, 171, 183, 173, 183, 223, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 183, 0, 183, 0, 183, 0, 0, 0, 174, 0, + 0, 57, 0, 0, 63, 65, 182, 68, 182, 70, + 182, 175, 176, 177, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 64, 67, 69, 76, 78 }; const short parser::yypgoto_[] = { - -280, -280, -280, 276, 285, 286, -280, -280, -280, -172, - 72, -280, -280, -280, -93, -119, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, 189, - -280, -279, -277, -276, -280, -280, -280, -280, -280, -280, - -29, 25, -72, -57, -280, -280, 15, -42, -280, 211, - 294, -280, 249, 310, -280, -280, -280, 327, 378, 395, - 412, -280, -280, -280, 0, 9, -280, -18, -280, -280, - 93, -280, -280 + -281, -281, -281, 272, 298, 299, -281, -281, -281, 194, + 86, -281, -281, -281, -92, -121, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, 188, + -281, -280, -279, -278, -281, -281, -281, -281, -281, -281, + 92, 203, -66, -62, -281, -281, -127, -46, -281, -281, + -281, -13, 213, 337, -281, 289, 385, -281, -281, -281, + 392, 480, 512, 519, -281, -281, -281, 0, 10, -281, + -17, -281, -281, 130, -281, -281 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 222, - 223, 277, 224, 225, 226, 340, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 106, - 399, 250, 251, 252, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 32, 107, 200, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 198, 84, 85, 86, 87, 88, 89, - 90, 91, 92 + 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, + 224, 279, 225, 226, 227, 349, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 106, + 412, 251, 252, 253, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 32, 107, 200, 69, 256, + 300, 301, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 198, 84, 85, 86, + 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 158, 151, 31, 341, 108, 342, 343, 6, 16, - 196, 94, 19, 20, 379, 6, 95, 152, 6, 22, - 273, 26, 116, 30, 96, 170, 33, 99, 131, 132, - 276, 146, 147, 148, 281, 97, 100, 1, 2, 3, - 4, 5, 380, 21, 98, 101, 93, 27, 109, 151, - 28, 126, 17, 18, 144, 145, 146, 147, 148, 7, - 127, 197, 108, 29, 152, 17, 53, 102, 17, 53, - 324, 286, 6, 128, 153, 170, 117, 30, 35, 36, - 56, 38, -212, 127, 157, 6, 42, 43, 44, 45, - 35, 36, 155, 38, 113, 159, 156, 6, 42, 43, - 44, 45, 112, 160, 327, 335, 113, 374, 161, 170, - -199, -199, 170, -199, 382, 383, 163, -199, 162, 170, - 170, 153, 154, 7, 164, 165, -199, 389, 253, -199, - 127, 166, 170, 391, 170, 17, 53, 173, 170, 341, - 415, 342, 343, 171, 428, 170, 197, 17, 53, 170, - 175, 114, 115, 429, 430, 201, 154, 258, 170, 170, - 274, 279, 261, 280, 282, 264, 127, -199, -199, 199, - 283, 284, 285, 253, 289, 270, 260, 253, 290, 263, - 295, 296, 254, 291, 294, 151, 144, 145, 146, 147, - 148, 116, 116, 287, 301, 253, 302, 303, 304, 305, - 152, 325, 258, 395, 328, 397, 258, 331, 338, 115, - 352, 127, 347, 353, 348, 127, 57, 354, 355, 367, - 258, 258, 373, 416, 258, 151, 151, 254, 369, 127, - 127, 254, 371, 127, 376, 103, 378, 388, 110, 111, - 152, 152, 390, 392, 431, 117, 117, 434, 253, 254, - 420, 403, 131, 132, 116, 404, 418, 153, 137, 138, - 139, 140, 118, 421, 422, 424, 127, 444, 445, 426, - 432, 436, 151, 441, 437, 438, 439, 258, 144, 145, - 146, 147, 148, 258, 345, 23, 127, 152, 402, 333, - 442, 443, 127, 169, 24, 25, 300, 153, 153, 433, - 120, 172, 254, 0, 288, 0, 127, 127, 117, 0, - 350, 351, 0, 0, 0, 0, 0, 0, 0, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 0, - 368, 0, 0, 370, 153, 119, 253, 0, 253, 259, - 0, 0, 262, 127, 0, 265, 0, 266, 0, 268, - 0, 121, 269, -191, -191, 423, -191, 425, 255, 427, - -191, 0, 0, 0, 0, 258, 0, 258, 122, -191, - 401, 0, -191, 0, 127, 0, 127, 253, 394, 116, - 253, 0, 278, 0, 0, 0, 0, 0, 0, 0, - 254, 0, 254, 412, 293, 413, 0, 414, 0, 0, - 253, 253, 0, 255, 0, 0, 258, 255, 258, 258, - -191, -191, 0, 0, 0, 127, 0, 127, 127, 123, - 0, 255, 255, 0, 0, 255, 0, 0, 0, 258, - 258, 254, 0, 117, 254, 0, 124, 0, 127, 127, - 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, - 332, 0, 0, 125, 254, 254, 0, 257, 0, 337, - 0, 339, 0, 0, 346, 0, 0, 0, 0, -192, - -192, 0, -192, 0, 122, 0, -192, 0, 255, 0, - 0, 0, 0, 0, 255, -192, 256, 0, -192, 0, - 256, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 257, 0, 256, 256, 257, 0, 256, 372, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, - 297, 298, 0, 122, 257, 123, -192, -192, 0, 0, - 0, 384, 385, 386, 387, 0, 0, 122, 122, 0, - 0, 122, 124, 0, -193, -193, 0, -193, 0, 0, - 0, -193, 0, 0, 0, 396, 0, 398, 400, 125, - -193, 256, 0, -193, 0, 0, 0, 256, 0, 0, - 123, 0, 0, 0, 123, 0, 255, 257, 255, -194, - -194, 0, -194, 344, 0, 0, -194, 124, 123, 123, - 0, 124, 123, 0, 122, -194, 0, 0, -194, 435, - 122, -193, -193, 0, 125, 124, 124, 0, 125, 124, - 0, 0, 0, 0, 0, 0, 0, 255, 0, 255, - 255, 0, 125, 125, 0, 0, 125, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -194, -194, 0, 0, - 255, 255, 0, 0, 0, 123, 0, 35, 36, 0, - 38, 123, 0, 0, 6, 42, 43, 44, 45, 256, - 0, 256, 124, 113, 0, 0, 0, 0, 124, 0, - 0, 220, 221, 0, 0, 257, 0, 257, 0, 125, - 35, 36, 0, 38, 0, 125, 0, 6, 0, 0, - -195, -195, 122, -195, 122, 0, 149, -195, 0, 150, - 256, 0, 256, 256, 17, 53, -195, 0, 0, -195, - 0, 0, 0, 0, 0, 0, 257, 0, 344, 257, - 0, 0, 0, 256, 256, 35, 36, 0, 38, 0, - 0, 0, 6, 122, 0, 122, 122, 17, 53, 257, - 257, 149, 0, 123, 174, 123, 0, -195, -195, 310, - 311, 0, 0, 0, 0, 0, 122, 122, 0, 0, - 124, 0, 124, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 0, 0, 0, 125, 0, 125, - 0, 0, 17, 53, 123, 0, 123, 123, 0, 0, + 16, 108, 158, 6, 31, 350, 351, 352, 151, 16, + 21, 196, 152, 19, 20, 1, 2, 3, 4, 5, + 6, 391, 6, 94, 17, 18, 33, 199, 95, 96, + 26, 99, 22, 28, 262, 97, 100, 265, 131, 132, + 144, 145, 146, 147, 148, 98, 101, 154, 109, 392, + 6, 126, -193, -193, 7, 151, 27, 93, 108, 152, + 29, 127, 197, 102, 144, 145, 146, 147, 148, 157, + 17, 53, 17, 53, 153, 275, 30, 288, -206, -206, + 170, -206, 333, 30, 127, -206, 56, 170, 336, 277, + 154, 361, 362, 170, -206, 159, 203, -206, 128, 204, + 205, 7, 206, 207, 208, 209, -219, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 35, 36, 155, 38, + 160, 153, 156, 6, 42, 43, 44, 45, 386, 161, + 157, 127, 220, 170, 394, -206, -206, 395, 162, 170, + 221, 222, 170, 116, 146, 147, 148, -198, -198, 342, + -198, 350, 351, 352, -198, 201, 402, 260, 163, 404, + 164, 170, 263, -198, 170, 266, -198, 127, -191, -191, + 359, 360, 428, 17, 53, 272, 441, 170, 442, -192, + -192, 170, 170, 170, -199, -199, 165, -199, 166, 173, + 443, -199, 171, 151, 289, 170, 175, 152, 154, 197, + -199, 276, 260, -199, -198, -198, 260, 380, 282, 281, + 382, 284, 127, 285, 286, 57, 127, 287, 291, 314, + 304, 260, 260, 297, 298, 260, 292, 334, 293, 296, + 127, 127, 127, 337, 103, 127, 309, 110, 111, 151, + 151, -199, -199, 152, 152, 310, 311, 312, 313, 254, + 347, 340, 115, 356, 117, 364, 357, 365, 407, 153, + 366, 367, 390, 379, 118, 385, 388, 381, 383, 127, + 401, 403, 405, 429, 425, 433, 426, 416, 427, 260, + 449, 23, 450, 417, 431, 260, 354, 151, 434, 127, + 435, 152, 169, 437, 254, 127, 439, 445, 254, 451, + 172, 415, 452, 454, 455, 153, 153, 24, 25, 456, + 446, 308, 116, 116, 116, 127, 127, 254, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 131, 132, + 120, 290, 135, 136, 137, 138, 139, 140, 261, 396, + 0, 264, 0, 153, 267, 0, 268, 0, 270, 0, + 255, 271, 304, 127, 144, 145, 146, 147, 148, 0, + 257, 254, 127, 0, 436, 0, 438, 116, 440, 0, + 0, 0, 0, 0, 0, 0, 0, 260, 119, 260, + 0, 280, 414, 0, 0, 0, 278, 127, 0, 127, + 283, 0, 0, 295, 0, 255, 0, 0, 0, 255, + 0, -200, -200, 0, -200, 257, 0, 0, -200, 257, + 0, 0, 0, 117, 117, 117, 0, -200, 255, 260, + -200, 260, 260, 302, 257, 257, 121, 0, 257, 127, + 0, 127, 127, 122, 0, 0, 0, 0, 35, 36, + 0, 38, 260, 260, 116, 6, 42, 43, 44, 45, + 0, 341, 127, 127, 299, 0, 0, 0, -200, -200, + 346, 0, 348, 344, 0, 355, 0, -201, -201, 254, + -201, 254, 255, 0, -201, 0, 0, 271, 117, 0, + 0, 0, 257, -201, 258, 0, -201, 0, 257, 0, + 0, 0, 363, 0, 0, 17, 53, 0, 0, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 0, 254, 0, 116, 254, 0, 0, 384, 0, 0, + 0, 123, 0, 0, -201, -201, 0, 0, 0, 258, + 0, 0, 259, 258, 254, 254, 0, 0, 0, 122, + 0, 0, 397, 398, 399, 400, 0, 303, 258, 258, + 0, 0, 258, 124, 0, 117, 0, 0, 0, 0, + 125, 0, 0, 0, 0, 302, 409, 0, 411, 413, + 0, 408, 0, 410, 0, 0, 0, 259, 0, 0, + 255, 259, 255, 0, 122, 0, 0, 0, 122, 0, + 257, 0, 257, 0, 0, 121, 305, 306, 0, 0, + 259, 0, 122, 122, 122, 0, 258, 122, 0, 0, + 0, 448, 258, 444, 0, 0, 447, 0, 0, 0, + 0, 0, 255, 0, 117, 255, 0, 123, 0, 0, + 0, 0, 257, 0, 257, 257, 457, 458, 0, 0, + 0, 35, 36, 0, 38, 255, 255, 0, 6, 42, + 43, 44, 45, 112, 259, 257, 257, 113, 0, 124, + 353, 122, 35, 36, 0, 38, 125, 122, 0, 6, + 0, 0, 123, 0, 0, 0, 123, 0, 149, 0, + 0, 150, 0, 0, 0, 0, 0, 0, 0, 303, + 123, 123, 123, -202, -202, 123, -202, 0, 17, 53, + -202, 0, 114, 115, 124, 0, 0, 0, 124, -202, + 0, 125, -202, 0, 258, 125, 258, 0, 0, 17, + 53, 0, 124, 124, 124, 0, 0, 124, 0, 125, + 125, 125, 35, 36, 125, 38, 0, 121, 0, 6, + 42, 43, 44, 45, 122, 0, 0, 0, 113, 123, + -202, -202, 0, 0, 0, 123, 258, 0, 258, 258, + 0, 0, 259, 0, 259, 0, 0, 35, 36, 122, + 38, 122, 0, 0, 6, 42, 43, 44, 45, 258, + 258, 124, 0, 220, 0, 0, 0, 124, 125, 17, + 53, 221, 222, 0, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 259, 0, 353, 259, 0, 0, + 0, 122, 0, 122, 122, 315, 316, 0, 317, 318, + 0, 0, 0, 0, 17, 53, 0, 259, 259, 0, + 0, 0, 123, 0, 122, 122, 0, 35, 36, 0, + 38, 0, 0, 0, 6, 0, 0, -203, -203, 0, + -203, 0, 0, 149, -203, 0, 174, 123, 0, 123, + 0, 319, 320, -203, 124, 0, -203, 0, 0, 0, + 0, 125, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 0, 0, 0, 124, + 0, 124, 0, 0, 17, 53, 125, 0, 125, 123, + 0, 123, 123, 0, -203, -203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 0, 124, 124, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 125, 0, - 125, 125, 0, 0, 124, 124, 0, 0, 0, 0, - 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, + 131, 132, 123, 123, 135, 136, 137, 138, 139, 140, + 0, 124, 0, 124, 124, 0, 0, 0, 125, 0, + 125, 125, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 0, 202, 0, 124, 124, 0, 0, 0, 0, 203, 125, 125, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, - 44, 45, 0, 0, 157, 219, 113, 0, 0, 0, - 0, 0, 0, 0, 220, 221, 0, 0, 0, 0, - 0, -196, -196, 0, -196, 0, -197, -197, -196, -197, - 0, 0, 0, -197, 0, 0, 0, -196, 202, 0, - -196, 0, -197, 0, 0, -197, 203, 17, 53, 204, + 44, 45, 0, 0, 157, 219, 220, 0, 0, 0, + 0, 0, 0, 0, 221, 222, 0, 0, 0, 0, + 0, -204, -204, 0, -204, 0, -205, -205, -204, -205, + 0, 0, 0, -205, 0, 0, 0, -204, 202, 0, + -204, 0, -205, 0, 0, -205, 203, 17, 53, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, -196, -196, - 157, 299, 113, -197, -197, 0, 0, 0, 0, 0, - 220, 221, 275, 0, 0, 0, 0, 0, 0, 203, + 0, 0, 0, 6, 42, 43, 44, 45, -204, -204, + 157, 307, 220, -205, -205, 0, 0, 0, 0, 0, + 221, 222, 343, 0, 0, 0, 0, 0, 0, 203, 0, 0, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, - 36, 0, 38, 17, 53, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 220, 221, 334, 0, 0, 0, 0, - 0, 0, 203, 0, 0, 204, 205, 0, 206, 207, - 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 35, 36, 0, 38, 17, 53, 34, 6, - 42, 43, 44, 45, 0, 0, 157, 0, 113, 0, - 0, 0, 0, 0, 0, 0, 220, 221, 0, 0, - 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, - 43, 44, 45, 46, 0, 0, 0, 104, 105, 0, - 0, 48, 0, 0, -198, -198, 0, -198, 0, 17, - 53, -198, 35, 36, 0, 38, 0, 49, 50, 6, - -198, 34, 0, -198, 0, 0, 0, 0, 149, 0, - 0, 174, 0, 0, 51, 0, 0, 52, 17, 53, + 36, 0, 38, 17, 53, 34, 6, 42, 43, 44, + 45, 0, 0, 157, 0, 220, 0, 0, 0, 0, + 0, 0, 0, 221, 222, 0, 0, 0, 35, 36, + 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, + 46, 0, 0, 0, 104, 105, 0, 0, 48, 0, + 0, 35, 36, 0, 38, 0, 17, 53, 6, 0, + 0, 0, 0, 0, 49, 50, 0, 149, 34, 0, + 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 0, 0, 52, 17, 53, 30, 54, 55, + 56, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 0, 0, 47, 17, 53, + 0, 48, 0, 294, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, 40, - 41, 6, 42, 43, 44, 45, 46, 0, 0, 0, - 47, -198, -198, 0, 48, 0, 292, 0, 0, 17, - 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 50, 0, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, + 41, 6, 42, 43, 44, 45, 46, 269, 0, 0, + 47, 0, 0, 130, 48, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 49, 50, 0, 0, 34, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, 46, - 267, 0, 0, 47, 0, 0, 130, 48, 0, 131, + 274, 0, 0, 104, 0, 0, 130, 48, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 49, 50, 0, 0, 34, 0, 0, + 0, 0, 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, - 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, - 44, 45, 46, 0, 0, 0, 104, 0, 0, 0, - 48, 0, 0, 0, 0, 306, 307, 0, 308, 309, - 0, 0, 0, 0, 0, 0, 49, 50, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 35, 36, 0, - 38, 0, 0, 51, 6, 0, 52, 17, 53, 30, - 54, 55, 56, 149, 0, 0, 174, 0, 0, 0, - 0, 310, 311, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 312, 313, 314, 315, 316, - 317, 318, 319, 320, 321, 322, 0, 0, 0, 0, - 0, 0, 0, 203, 17, 53, 204, 205, 0, 206, - 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 0, 0, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 167, 220, 221, 0, - 0, 168, 0, 0, 0, 0, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, + 203, 0, 0, 204, 205, 0, 206, 207, 208, 209, + 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 220, 0, 0, 0, + 0, 0, 0, 0, 221, 222, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 0, 149, 0, 0, 174, 0, 0, 0, 0, + 319, 320, 0, 0, 0, 0, 0, 17, 53, 0, + 0, 0, 0, 0, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 167, 0, 0, 0, 0, + 168, 0, 0, 17, 53, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 53, 141, 142, 143, 144, 145, 146, 147, 148, - 406, 0, 0, 0, 0, 407, 0, 0, 0, 0, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 408, 0, 0, 0, 0, 409, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 410, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 130, 0, - 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 167, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 375, 0, 141, 142, - 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 377, 0, 141, 142, 143, 144, 145, 146, 147, 148, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 381, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, - 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 405, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 417, 0, 141, 142, - 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 419, 0, 141, 142, 143, 144, 145, 146, 147, 148, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 440, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 272, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 323, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 326, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 329, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 330, 0, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 419, + 0, 0, 0, 0, 420, 0, 0, 0, 0, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 421, 0, 0, 0, 0, 422, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 271, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 336, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, + 142, 143, 144, 145, 146, 147, 148, 423, 0, 0, + 0, 0, 424, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 167, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 387, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 389, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 393, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 406, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 418, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 430, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 432, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 453, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 332, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 335, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 338, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 339, 0, 0, + 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 273, 0, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 345, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 358, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 131, 132, 0, 134, 135, 136, 137, 138, 139, 140, + 131, 132, 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 131, 132, 0, 134, 135, 136, 137, 138, 139, - 140, 131, 132, 0, 0, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 0, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 131, 132, 0, 0, 135, 136, 137, 138, - 139, 140, 131, 132, 0, 0, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, - 146, 147, 148, 131, 132, 0, 0, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, - 145, 146, 147, 148 + 148, 0, 0, 0, 142, 143, 144, 145, 146, 147, + 148, 131, 132, 0, 0, 135, 136, 137, 138, 139, + 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, + 140, 0, 0, 0, 0, 142, 0, 144, 145, 146, + 147, 148, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148 }; const short parser::yycheck_[] = { - 0, 94, 74, 21, 283, 47, 283, 283, 46, 9, - 46, 52, 3, 4, 29, 46, 57, 74, 46, 0, - 52, 51, 51, 98, 55, 57, 26, 55, 65, 66, - 202, 93, 94, 95, 206, 35, 36, 11, 12, 13, - 14, 15, 57, 51, 35, 36, 52, 77, 48, 121, - 61, 51, 96, 97, 91, 92, 93, 94, 95, 97, - 51, 97, 104, 61, 121, 96, 97, 55, 96, 97, - 52, 92, 46, 97, 74, 57, 51, 98, 39, 40, - 101, 42, 59, 74, 53, 46, 47, 48, 49, 50, - 39, 40, 59, 42, 55, 95, 61, 46, 47, 48, - 49, 50, 51, 55, 52, 277, 55, 52, 51, 57, - 39, 40, 57, 42, 52, 52, 55, 46, 59, 57, - 57, 121, 51, 97, 51, 59, 55, 52, 157, 58, - 121, 55, 57, 52, 57, 96, 97, 55, 57, 418, - 52, 418, 418, 56, 52, 57, 97, 96, 97, 57, - 59, 100, 101, 52, 52, 155, 51, 157, 57, 57, - 51, 61, 162, 51, 51, 165, 157, 96, 97, 154, - 51, 51, 51, 202, 60, 175, 161, 206, 61, 164, - 51, 51, 157, 61, 61, 257, 91, 92, 93, 94, - 95, 220, 221, 211, 61, 224, 61, 61, 61, 61, - 257, 51, 202, 375, 51, 377, 206, 56, 26, 101, - 51, 202, 60, 51, 60, 206, 27, 51, 51, 56, - 220, 221, 51, 24, 224, 297, 298, 202, 56, 220, - 221, 206, 56, 224, 51, 46, 61, 51, 49, 50, - 297, 298, 51, 51, 416, 220, 221, 419, 277, 224, - 29, 61, 65, 66, 283, 61, 61, 257, 71, 72, - 73, 74, 51, 61, 61, 61, 257, 439, 440, 61, - 61, 52, 344, 61, 52, 52, 52, 277, 91, 92, - 93, 94, 95, 283, 284, 9, 277, 344, 381, 274, - 61, 61, 283, 104, 9, 9, 224, 297, 298, 418, - 51, 112, 277, -1, 211, -1, 297, 298, 283, -1, - 295, 296, -1, -1, -1, -1, -1, -1, -1, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, -1, - 325, -1, -1, 328, 344, 51, 375, -1, 377, 160, - -1, -1, 163, 344, -1, 166, -1, 168, -1, 170, - -1, 51, 173, 39, 40, 407, 42, 409, 157, 411, - 46, -1, -1, -1, -1, 375, -1, 377, 51, 55, - 380, -1, 58, -1, 375, -1, 377, 416, 373, 418, - 419, -1, 203, -1, -1, -1, -1, -1, -1, -1, - 375, -1, 377, 388, 215, 390, -1, 392, -1, -1, - 439, 440, -1, 202, -1, -1, 416, 206, 418, 419, - 96, 97, -1, -1, -1, 416, -1, 418, 419, 51, - -1, 220, 221, -1, -1, 224, -1, -1, -1, 439, - 440, 416, -1, 418, 419, -1, 51, -1, 439, 440, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - 271, -1, -1, 51, 439, 440, -1, 157, -1, 280, - -1, 282, -1, -1, 285, -1, -1, -1, -1, 39, - 40, -1, 42, -1, 157, -1, 46, -1, 277, -1, - -1, -1, -1, -1, 283, 55, 202, -1, 58, -1, - 206, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 202, -1, 220, 221, 206, -1, 224, 330, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 220, 221, -1, 206, 224, 157, 96, 97, -1, -1, - -1, 352, 353, 354, 355, -1, -1, 220, 221, -1, - -1, 224, 157, -1, 39, 40, -1, 42, -1, -1, - -1, 46, -1, -1, -1, 376, -1, 378, 379, 157, - 55, 277, -1, 58, -1, -1, -1, 283, -1, -1, - 202, -1, -1, -1, 206, -1, 375, 277, 377, 39, - 40, -1, 42, 283, -1, -1, 46, 202, 220, 221, - -1, 206, 224, -1, 277, 55, -1, -1, 58, 420, - 283, 96, 97, -1, 202, 220, 221, -1, 206, 224, - -1, -1, -1, -1, -1, -1, -1, 416, -1, 418, - 419, -1, 220, 221, -1, -1, 224, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, - 439, 440, -1, -1, -1, 277, -1, 39, 40, -1, - 42, 283, -1, -1, 46, 47, 48, 49, 50, 375, - -1, 377, 277, 55, -1, -1, -1, -1, 283, -1, - -1, 63, 64, -1, -1, 375, -1, 377, -1, 277, - 39, 40, -1, 42, -1, 283, -1, 46, -1, -1, - 39, 40, 375, 42, 377, -1, 55, 46, -1, 58, - 416, -1, 418, 419, 96, 97, 55, -1, -1, 58, - -1, -1, -1, -1, -1, -1, 416, -1, 418, 419, - -1, -1, -1, 439, 440, 39, 40, -1, 42, -1, - -1, -1, 46, 416, -1, 418, 419, 96, 97, 439, - 440, 55, -1, 375, 58, 377, -1, 96, 97, 63, - 64, -1, -1, -1, -1, -1, 439, 440, -1, -1, - 375, -1, 377, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, -1, -1, -1, 375, -1, 377, - -1, -1, 96, 97, 416, -1, 418, 419, -1, -1, + 0, 47, 94, 46, 21, 285, 285, 285, 74, 9, + 51, 46, 74, 3, 4, 11, 12, 13, 14, 15, + 46, 29, 46, 52, 96, 97, 26, 154, 57, 55, + 51, 55, 0, 61, 161, 35, 36, 164, 65, 66, + 91, 92, 93, 94, 95, 35, 36, 51, 48, 57, + 46, 51, 56, 57, 97, 121, 77, 52, 104, 121, + 61, 51, 97, 55, 91, 92, 93, 94, 95, 53, + 96, 97, 96, 97, 74, 52, 98, 92, 39, 40, + 57, 42, 52, 98, 74, 46, 101, 57, 52, 12, + 51, 56, 57, 57, 55, 95, 19, 58, 97, 22, + 23, 97, 25, 26, 27, 28, 59, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 59, 42, + 55, 121, 61, 46, 47, 48, 49, 50, 52, 51, + 53, 121, 55, 57, 52, 96, 97, 52, 59, 57, + 63, 64, 57, 51, 93, 94, 95, 39, 40, 276, + 42, 431, 431, 431, 46, 155, 52, 157, 55, 52, + 51, 57, 162, 55, 57, 165, 58, 157, 56, 57, + 297, 298, 52, 96, 97, 175, 52, 57, 52, 56, + 57, 57, 57, 57, 39, 40, 59, 42, 55, 55, + 52, 46, 56, 259, 211, 57, 59, 259, 51, 97, + 55, 51, 202, 58, 96, 97, 206, 334, 51, 61, + 337, 51, 202, 51, 51, 27, 206, 51, 60, 77, + 220, 221, 222, 51, 51, 225, 61, 51, 61, 61, + 220, 221, 222, 51, 46, 225, 61, 49, 50, 305, + 306, 96, 97, 305, 306, 61, 61, 61, 61, 157, + 26, 56, 101, 60, 51, 51, 60, 51, 385, 259, + 51, 51, 61, 56, 51, 51, 51, 56, 56, 259, + 51, 51, 51, 24, 401, 29, 403, 61, 405, 279, + 52, 9, 52, 61, 61, 285, 286, 353, 61, 279, + 61, 353, 104, 61, 202, 285, 61, 61, 206, 52, + 112, 393, 52, 61, 61, 305, 306, 9, 9, 61, + 431, 225, 220, 221, 222, 305, 306, 225, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 65, 66, + 51, 211, 69, 70, 71, 72, 73, 74, 160, 362, + -1, 163, -1, 353, 166, -1, 168, -1, 170, -1, + 157, 173, 362, 353, 91, 92, 93, 94, 95, -1, + 157, 279, 362, -1, 420, -1, 422, 285, 424, -1, + -1, -1, -1, -1, -1, -1, -1, 387, 51, 389, + -1, 203, 392, -1, -1, -1, 202, 387, -1, 389, + 206, -1, -1, 215, -1, 202, -1, -1, -1, 206, + -1, 39, 40, -1, 42, 202, -1, -1, 46, 206, + -1, -1, -1, 220, 221, 222, -1, 55, 225, 429, + 58, 431, 432, 220, 221, 222, 51, -1, 225, 429, + -1, 431, 432, 51, -1, -1, -1, -1, 39, 40, + -1, 42, 452, 453, 362, 46, 47, 48, 49, 50, + -1, 273, 452, 453, 55, -1, -1, -1, 96, 97, + 282, -1, 284, 279, -1, 287, -1, 39, 40, 387, + 42, 389, 279, -1, 46, -1, -1, 299, 285, -1, + -1, -1, 279, 55, 157, -1, 58, -1, 285, -1, + -1, -1, 314, -1, -1, 96, 97, -1, -1, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + -1, 429, -1, 431, 432, -1, -1, 339, -1, -1, + -1, 51, -1, -1, 96, 97, -1, -1, -1, 202, + -1, -1, 157, 206, 452, 453, -1, -1, -1, 157, + -1, -1, 364, 365, 366, 367, -1, 220, 221, 222, + -1, -1, 225, 51, -1, 362, -1, -1, -1, -1, + 51, -1, -1, -1, -1, 362, 388, -1, 390, 391, + -1, 387, -1, 389, -1, -1, -1, 202, -1, -1, + 387, 206, 389, -1, 202, -1, -1, -1, 206, -1, + 387, -1, 389, -1, -1, 220, 221, 222, -1, -1, + 225, -1, 220, 221, 222, -1, 279, 225, -1, -1, + -1, 433, 285, 429, -1, -1, 432, -1, -1, -1, + -1, -1, 429, -1, 431, 432, -1, 157, -1, -1, + -1, -1, 429, -1, 431, 432, 452, 453, -1, -1, + -1, 39, 40, -1, 42, 452, 453, -1, 46, 47, + 48, 49, 50, 51, 279, 452, 453, 55, -1, 157, + 285, 279, 39, 40, -1, 42, 157, 285, -1, 46, + -1, -1, 202, -1, -1, -1, 206, -1, 55, -1, + -1, 58, -1, -1, -1, -1, -1, -1, -1, 362, + 220, 221, 222, 39, 40, 225, 42, -1, 96, 97, + 46, -1, 100, 101, 202, -1, -1, -1, 206, 55, + -1, 202, 58, -1, 387, 206, 389, -1, -1, 96, + 97, -1, 220, 221, 222, -1, -1, 225, -1, 220, + 221, 222, 39, 40, 225, 42, -1, 362, -1, 46, + 47, 48, 49, 50, 362, -1, -1, -1, 55, 279, + 96, 97, -1, -1, -1, 285, 429, -1, 431, 432, + -1, -1, 387, -1, 389, -1, -1, 39, 40, 387, + 42, 389, -1, -1, 46, 47, 48, 49, 50, 452, + 453, 279, -1, 55, -1, -1, -1, 285, 279, 96, + 97, 63, 64, -1, 285, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 429, -1, 431, 432, -1, -1, + -1, 429, -1, 431, 432, 17, 18, -1, 20, 21, + -1, -1, -1, -1, 96, 97, -1, 452, 453, -1, + -1, -1, 362, -1, 452, 453, -1, 39, 40, -1, + 42, -1, -1, -1, 46, -1, -1, 39, 40, -1, + 42, -1, -1, 55, 46, -1, 58, 387, -1, 389, + -1, 63, 64, 55, 362, -1, 58, -1, -1, -1, + -1, 362, -1, -1, -1, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, -1, -1, -1, 387, + -1, 389, -1, -1, 96, 97, 387, -1, 389, 429, + -1, 431, 432, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 416, -1, 418, 419, -1, -1, 439, 440, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 416, -1, - 418, 419, -1, -1, 439, 440, -1, -1, -1, -1, - -1, -1, 11, -1, -1, -1, -1, -1, -1, -1, - 19, 439, 440, 22, 23, -1, 25, 26, 27, 28, + 65, 66, 452, 453, 69, 70, 71, 72, 73, 74, + -1, 429, -1, 431, 432, -1, -1, -1, 429, -1, + 431, 432, -1, 88, 89, 90, 91, 92, 93, 94, + 95, -1, 11, -1, 452, 453, -1, -1, -1, -1, + 19, 452, 453, 22, 23, -1, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, 46, 47, 48, 49, 50, -1, -1, 53, 54, 55, -1, -1, -1, @@ -4272,193 +4360,183 @@ namespace xsk { namespace gsc { namespace iw6 { 63, 64, 12, -1, -1, -1, -1, -1, -1, 19, -1, -1, 22, 23, -1, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, -1, 42, 96, 97, -1, 46, 47, 48, 49, + 40, -1, 42, 96, 97, 16, 46, 47, 48, 49, 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, - -1, -1, -1, 63, 64, 12, -1, -1, -1, -1, - -1, -1, 19, -1, -1, 22, 23, -1, 25, 26, - 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, -1, 42, 96, 97, 16, 46, - 47, 48, 49, 50, -1, -1, 53, -1, 55, -1, - -1, -1, -1, -1, -1, -1, 63, 64, -1, -1, - -1, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, -1, -1, -1, 55, 56, -1, - -1, 59, -1, -1, 39, 40, -1, 42, -1, 96, - 97, 46, 39, 40, -1, 42, -1, 75, 76, 46, - 55, 16, -1, 58, -1, -1, -1, -1, 55, -1, - -1, 58, -1, -1, 92, -1, -1, 95, 96, 97, + -1, -1, -1, 63, 64, -1, -1, -1, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, -1, -1, -1, 55, 56, -1, -1, 59, -1, + -1, 39, 40, -1, 42, -1, 96, 97, 46, -1, + -1, -1, -1, -1, 75, 76, -1, 55, 16, -1, + 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 92, -1, -1, 95, 96, 97, 98, 99, 100, + 101, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, -1, -1, -1, 55, 96, 97, + -1, 59, -1, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, + -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, - 55, 96, 97, -1, 59, -1, 61, -1, -1, 96, - 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 75, 76, -1, -1, 16, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 92, -1, -1, + 45, 46, 47, 48, 49, 50, 51, 56, -1, -1, + 55, -1, -1, 62, 59, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + 75, 76, -1, -1, 16, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 56, -1, -1, 55, -1, -1, 62, 59, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, 75, 76, -1, -1, 16, -1, -1, + -1, -1, -1, 75, 76, -1, -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, -1, -1, -1, 55, -1, -1, -1, - 59, -1, -1, -1, -1, 17, 18, -1, 20, 21, - -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, 40, -1, - 42, -1, -1, 92, 46, -1, 95, 96, 97, 98, - 99, 100, 101, 55, -1, -1, 58, -1, -1, -1, - -1, 63, 64, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, - -1, -1, -1, 19, 96, 97, 22, 23, -1, 25, - 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, - 46, 47, 48, 49, 50, -1, -1, 53, -1, 55, - -1, -1, -1, -1, -1, -1, 52, 63, 64, -1, - -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, + 19, -1, -1, 22, 23, -1, 25, 26, 27, 28, + -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, -1, 42, -1, -1, -1, 46, 47, 48, + 49, 50, -1, -1, 53, -1, 55, -1, -1, -1, + -1, -1, -1, -1, 63, 64, 39, 40, -1, 42, + -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, + -1, -1, 55, -1, -1, 58, -1, -1, -1, -1, + 63, 64, -1, -1, -1, -1, -1, 96, 97, -1, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 52, -1, -1, -1, -1, + 57, -1, -1, 96, 97, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 96, 97, 88, 89, 90, 91, 92, 93, 94, 95, - 52, -1, -1, -1, -1, 57, -1, -1, -1, -1, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 52, -1, -1, -1, -1, 57, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 52, -1, - -1, -1, -1, 57, -1, -1, -1, -1, 62, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 52, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 62, -1, -1, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, -1, 88, 89, - 90, 91, 92, 93, 94, 95, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 62, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 52, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 62, -1, -1, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, -1, 88, 89, - 90, 91, 92, 93, 94, 95, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 57, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 52, + -1, -1, -1, -1, 57, -1, -1, -1, -1, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 52, -1, -1, -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 60, -1, 62, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, - 93, 94, 95, 61, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 61, 62, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, - 93, 94, 95, 61, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 62, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 52, -1, -1, + -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 88, 89, 90, 91, 92, 93, 94, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 62, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 52, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 62, -1, -1, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 62, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 57, -1, -1, + -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 88, 89, + 90, 91, 92, 93, 94, 95, 60, -1, 62, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, + 94, 95, 61, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 61, 62, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, + 94, 95, 61, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 62, -1, -1, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 88, + 89, 90, 91, 92, 93, 94, 95, -1, -1, -1, + -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, + 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, + 65, 66, -1, -1, 69, 70, 71, 72, 73, 74, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 65, 66, -1, 68, 69, 70, 71, 72, 73, - 74, 65, 66, -1, -1, 69, 70, 71, 72, 73, - 74, -1, -1, -1, 88, 89, 90, 91, 92, 93, - 94, 95, -1, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 65, 66, -1, -1, 69, 70, 71, 72, - 73, 74, 65, 66, -1, -1, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, 89, 90, 91, 92, - 93, 94, 95, -1, -1, -1, 89, -1, 91, 92, - 93, 94, 95, 65, 66, -1, -1, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95 + 95, -1, -1, -1, 89, 90, 91, 92, 93, 94, + 95, 65, 66, -1, -1, 69, 70, 71, 72, 73, + 74, 65, 66, -1, -1, -1, -1, 71, 72, 73, + 74, -1, -1, -1, -1, 89, -1, 91, 92, 93, + 94, 95, -1, -1, -1, -1, -1, 91, 92, 93, + 94, 95 }; const unsigned char parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 46, 97, 113, 114, - 115, 116, 117, 118, 119, 120, 186, 96, 97, 187, - 187, 51, 0, 115, 116, 117, 51, 77, 61, 61, - 98, 189, 167, 186, 16, 39, 40, 41, 42, 43, + 115, 116, 117, 118, 119, 120, 189, 96, 97, 190, + 190, 51, 0, 115, 116, 117, 51, 77, 61, 61, + 98, 192, 167, 189, 16, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 55, 59, 75, 76, 92, 95, 97, 99, 100, 101, 151, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 52, 52, 57, 55, 186, 187, 55, - 186, 187, 55, 151, 55, 56, 151, 168, 169, 186, - 151, 151, 51, 55, 100, 101, 162, 163, 171, 172, - 174, 175, 179, 180, 181, 182, 186, 187, 97, 61, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 52, 52, 57, 55, 189, 190, 55, + 189, 190, 55, 151, 55, 56, 151, 168, 169, 189, + 151, 151, 51, 55, 100, 101, 162, 163, 174, 175, + 177, 178, 182, 183, 184, 185, 189, 190, 97, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 88, 89, 90, 91, 92, 93, 94, 95, 55, - 58, 164, 165, 186, 51, 59, 61, 53, 126, 186, + 58, 164, 165, 189, 51, 59, 61, 53, 126, 189, 55, 51, 59, 55, 51, 59, 55, 52, 57, 151, 57, 56, 151, 55, 58, 59, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 46, 97, 185, 168, - 169, 186, 11, 19, 22, 23, 25, 26, 27, 28, + 151, 151, 151, 151, 151, 151, 46, 97, 188, 168, + 169, 189, 11, 19, 22, 23, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 54, - 63, 64, 121, 122, 124, 125, 126, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 153, 154, 155, 162, 163, 171, 172, 175, 186, 151, - 168, 186, 151, 168, 186, 151, 151, 56, 151, 151, - 186, 60, 56, 52, 51, 12, 121, 123, 151, 61, - 51, 121, 51, 51, 51, 51, 92, 189, 192, 60, - 61, 61, 61, 151, 61, 51, 51, 175, 175, 54, - 122, 61, 61, 61, 61, 61, 17, 18, 20, 21, - 63, 64, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 56, 52, 51, 56, 52, 51, 56, - 57, 56, 151, 168, 12, 121, 61, 151, 26, 151, - 127, 153, 154, 155, 175, 186, 151, 60, 60, 61, - 168, 168, 51, 51, 51, 51, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 56, 168, 56, - 168, 56, 151, 51, 52, 52, 51, 52, 61, 29, - 57, 52, 52, 52, 151, 151, 151, 151, 51, 52, - 51, 52, 51, 52, 168, 121, 151, 121, 151, 152, - 151, 186, 126, 61, 61, 52, 52, 57, 52, 57, - 52, 57, 168, 168, 168, 52, 24, 52, 61, 52, - 29, 61, 61, 169, 61, 169, 61, 169, 52, 52, - 52, 121, 61, 127, 121, 151, 52, 52, 52, 52, - 52, 61, 61, 61, 121, 121 + 55, 63, 64, 121, 122, 124, 125, 126, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 153, 154, 155, 162, 163, 171, 174, 175, 178, + 189, 151, 168, 189, 151, 168, 189, 151, 151, 56, + 151, 151, 189, 60, 56, 52, 51, 12, 121, 123, + 151, 61, 51, 121, 51, 51, 51, 51, 92, 192, + 195, 60, 61, 61, 61, 151, 61, 51, 51, 55, + 172, 173, 174, 175, 189, 178, 178, 54, 122, 61, + 61, 61, 61, 61, 77, 17, 18, 20, 21, 63, + 64, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 56, 52, 51, 56, 52, 51, 56, 57, + 56, 151, 168, 12, 121, 61, 151, 26, 151, 127, + 153, 154, 155, 178, 189, 151, 60, 60, 61, 168, + 168, 56, 57, 151, 51, 51, 51, 51, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 56, + 168, 56, 168, 56, 151, 51, 52, 52, 51, 52, + 61, 29, 57, 52, 52, 52, 173, 151, 151, 151, + 151, 51, 52, 51, 52, 51, 52, 168, 121, 151, + 121, 151, 152, 151, 189, 126, 61, 61, 52, 52, + 57, 52, 57, 52, 57, 168, 168, 168, 52, 24, + 52, 61, 52, 29, 61, 61, 169, 61, 169, 61, + 169, 52, 52, 52, 121, 61, 127, 121, 151, 52, + 52, 52, 52, 52, 61, 61, 61, 121, 121 }; const unsigned char @@ -4474,19 +4552,19 @@ namespace xsk { namespace gsc { namespace iw6 { 134, 135, 136, 137, 138, 139, 140, 141, 141, 142, 143, 143, 144, 145, 146, 147, 147, 148, 149, 150, 151, 151, 151, 152, 152, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 154, 154, 155, 155, - 156, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, + 153, 153, 153, 153, 153, 153, 153, 154, 154, 155, + 155, 156, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 159, 160, 160, - 160, 160, 161, 162, 162, 163, 163, 164, 164, 164, - 164, 164, 164, 165, 165, 165, 165, 166, 167, 167, - 167, 168, 168, 169, 169, 170, 170, 171, 172, 173, - 174, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 186, 187, 187, 188, 189, 190, 191, 191, 192, - 192, 193, 194 + 158, 158, 158, 158, 158, 158, 158, 158, 159, 160, + 160, 160, 160, 161, 162, 162, 163, 163, 164, 164, + 164, 164, 164, 164, 165, 165, 165, 165, 166, 167, + 167, 167, 168, 168, 169, 169, 170, 170, 171, 172, + 172, 173, 173, 173, 174, 175, 176, 177, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 189, 190, + 190, 191, 192, 193, 194, 194, 195, 195, 196, 197 }; const signed char @@ -4502,19 +4580,19 @@ namespace xsk { namespace gsc { namespace iw6 { 6, 2, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, - 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 1, 1, 2, 2, 4, 6, 5, - 7, 5, 7, 8, 9, 9, 9, 3, 3, 1, - 0, 1, 0, 3, 1, 2, 3, 4, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, - 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 1, 1, 2, 2, 4, 6, + 5, 7, 5, 7, 8, 9, 9, 9, 3, 3, + 1, 0, 1, 0, 3, 1, 2, 3, 3, 3, + 1, 1, 1, 1, 4, 3, 3, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4524,29 +4602,29 @@ namespace xsk { namespace gsc { namespace iw6 { const short parser::yyrline_[] = { - 0, 258, 258, 259, 263, 265, 267, 269, 271, 273, - 278, 282, 287, 288, 289, 290, 291, 295, 300, 305, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 337, 338, 342, 344, 349, 351, - 356, 357, 361, 362, 366, 368, 370, 373, 377, 379, - 384, 386, 388, 393, 398, 400, 405, 410, 412, 417, - 419, 424, 429, 434, 439, 444, 449, 454, 456, 461, - 466, 468, 473, 478, 483, 488, 490, 495, 500, 505, - 510, 511, 512, 516, 517, 521, 523, 525, 527, 529, - 531, 533, 535, 537, 539, 541, 546, 548, 553, 555, - 560, 565, 567, 569, 571, 573, 575, 577, 579, 581, - 583, 585, 587, 589, 591, 593, 595, 597, 599, 604, - 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, - 625, 626, 627, 628, 629, 630, 631, 635, 640, 642, - 644, 646, 651, 656, 657, 660, 661, 665, 667, 669, - 671, 673, 675, 680, 682, 684, 686, 691, 696, 698, - 701, 705, 708, 712, 714, 719, 721, 726, 731, 736, - 741, 746, 747, 748, 749, 750, 751, 752, 753, 754, - 758, 763, 768, 773, 778, 783, 788, 793, 798, 803, - 808, 810, 815, 817, 822, 827, 832, 837, 839, 844, - 846, 851, 856 + 0, 261, 261, 262, 266, 268, 270, 272, 274, 276, + 281, 285, 290, 291, 292, 293, 294, 298, 303, 308, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 340, 341, 345, 347, 352, 354, + 359, 360, 364, 365, 369, 371, 373, 376, 380, 382, + 387, 389, 391, 396, 401, 403, 408, 413, 415, 420, + 422, 427, 432, 437, 442, 447, 452, 457, 459, 464, + 469, 471, 476, 481, 486, 491, 493, 498, 503, 508, + 513, 514, 515, 519, 520, 524, 526, 528, 530, 532, + 534, 536, 538, 540, 542, 544, 546, 551, 553, 558, + 560, 565, 570, 572, 574, 576, 578, 580, 582, 584, + 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, + 629, 630, 631, 632, 633, 634, 635, 636, 640, 645, + 647, 649, 651, 656, 661, 662, 665, 666, 670, 672, + 674, 676, 678, 680, 685, 687, 689, 691, 696, 701, + 703, 706, 710, 713, 717, 719, 724, 726, 731, 736, + 738, 743, 744, 745, 749, 754, 759, 764, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 781, 786, 791, + 796, 801, 806, 811, 816, 821, 826, 831, 833, 838, + 840, 845, 850, 855, 860, 862, 867, 869, 874, 879 }; void @@ -4579,9 +4657,9 @@ namespace xsk { namespace gsc { namespace iw6 { #line 13 "parser.ypp" } } } // xsk::gsc::iw6 -#line 4583 "parser.cpp" +#line 4661 "parser.cpp" -#line 860 "parser.ypp" +#line 883 "parser.ypp" void xsk::gsc::iw6::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/iw6/xsk/parser.hpp b/src/iw6/xsk/parser.hpp index e9e84f2e..60ae7f12 100644 --- a/src/iw6/xsk/parser.hpp +++ b/src/iw6/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace iw6 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,101 +540,104 @@ namespace xsk { namespace gsc { namespace iw6 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waittill - char dummy63[sizeof (ast::stmt_waittill::ptr)]; + char dummy64[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy64[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy65[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy66[sizeof (ast::stmt_while::ptr)]; + char dummy67[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -640,7 +645,7 @@ namespace xsk { namespace gsc { namespace iw6 { // "localized string" // "float" // "integer" - char dummy67[sizeof (std::string)]; + char dummy68[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -991,30 +996,33 @@ namespace xsk { namespace gsc { namespace iw6 { S_expr_arguments = 168, // expr_arguments S_expr_arguments_no_empty = 169, // expr_arguments_no_empty S_expr_reference = 170, // expr_reference - S_expr_array = 171, // expr_array - S_expr_field = 172, // expr_field - S_expr_size = 173, // expr_size - S_expr_paren = 174, // expr_paren - S_expr_object = 175, // expr_object - S_expr_thisthread = 176, // expr_thisthread - S_expr_empty_array = 177, // expr_empty_array - S_expr_undefined = 178, // expr_undefined - S_expr_game = 179, // expr_game - S_expr_self = 180, // expr_self - S_expr_anim = 181, // expr_anim - S_expr_level = 182, // expr_level - S_expr_animation = 183, // expr_animation - S_expr_animtree = 184, // expr_animtree - S_expr_identifier_nosize = 185, // expr_identifier_nosize - S_expr_identifier = 186, // expr_identifier - S_expr_path = 187, // expr_path - S_expr_istring = 188, // expr_istring - S_expr_string = 189, // expr_string - S_expr_vector = 190, // expr_vector - S_expr_float = 191, // expr_float - S_expr_integer = 192, // expr_integer - S_expr_false = 193, // expr_false - S_expr_true = 194 // expr_true + S_expr_tuple = 171, // expr_tuple + S_expr_tuple_arguments = 172, // expr_tuple_arguments + S_expr_tuple_types = 173, // expr_tuple_types + S_expr_array = 174, // expr_array + S_expr_field = 175, // expr_field + S_expr_size = 176, // expr_size + S_expr_paren = 177, // expr_paren + S_expr_object = 178, // expr_object + S_expr_thisthread = 179, // expr_thisthread + S_expr_empty_array = 180, // expr_empty_array + S_expr_undefined = 181, // expr_undefined + S_expr_game = 182, // expr_game + S_expr_self = 183, // expr_self + S_expr_anim = 184, // expr_anim + S_expr_level = 185, // expr_level + S_expr_animation = 186, // expr_animation + S_expr_animtree = 187, // expr_animtree + S_expr_identifier_nosize = 188, // expr_identifier_nosize + S_expr_identifier = 189, // expr_identifier + S_expr_path = 190, // expr_path + S_expr_istring = 191, // expr_istring + S_expr_string = 192, // expr_string + S_expr_vector = 193, // expr_vector + S_expr_float = 194, // expr_float + S_expr_integer = 195, // expr_integer + S_expr_false = 196, // expr_false + S_expr_true = 197 // expr_true }; }; @@ -1080,6 +1088,8 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1202,6 +1212,10 @@ namespace xsk { namespace gsc { namespace iw6 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1851,6 +1865,20 @@ namespace xsk { namespace gsc { namespace iw6 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2352,6 +2380,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2474,6 +2504,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4796,8 +4830,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2363, ///< Last index in yytable_. - yynnts_ = 83, ///< Number of nonterminal symbols. + yylast_ = 2371, ///< Last index in yytable_. + yynnts_ = 86, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4853,6 +4887,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -4975,6 +5011,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5171,6 +5211,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5293,6 +5335,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5496,7 +5542,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw6 -#line 5500 "parser.hpp" +#line 5546 "parser.hpp" diff --git a/src/iw6/xsk/resolver.cpp b/src/iw6/xsk/resolver.cpp index 5965822e..fd90e19b 100644 --- a/src/iw6/xsk/resolver.cpp +++ b/src/iw6/xsk/resolver.cpp @@ -47,7 +47,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -59,7 +59,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -76,7 +76,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -105,7 +105,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/iw7/xsk/assembler.cpp b/src/iw7/xsk/assembler.cpp index bdf28892..cacaacb7 100644 --- a/src/iw7/xsk/assembler.cpp +++ b/src/iw7/xsk/assembler.cpp @@ -384,7 +384,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -491,6 +491,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -554,7 +558,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -567,7 +571,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::iw7 diff --git a/src/iw7/xsk/compiler.cpp b/src/iw7/xsk/compiler.cpp index 66cab5d4..580ff2a8 100644 --- a/src/iw7/xsk/compiler.cpp +++ b/src/iw7/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -392,7 +397,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1030,11 +1035,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1540,7 +1552,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1585,6 +1597,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1624,7 +1659,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1710,7 +1745,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2238,7 +2273,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2305,11 +2340,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2332,11 +2367,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2364,7 +2399,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2373,7 +2408,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2381,8 +2416,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2414,13 +2449,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2580,23 +2615,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2623,7 +2675,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2637,7 +2689,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2650,7 +2701,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2828,8 +2879,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2844,7 +2894,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2877,7 +2927,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/iw7/xsk/compiler.hpp b/src/iw7/xsk/compiler.hpp index 71fb2464..6817836c 100644 --- a/src/iw7/xsk/compiler.hpp +++ b/src/iw7/xsk/compiler.hpp @@ -95,6 +95,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -136,10 +137,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/iw7/xsk/decompiler.cpp b/src/iw7/xsk/decompiler.cpp index 35d5648b..aa195804 100644 --- a/src/iw7/xsk/decompiler.cpp +++ b/src/iw7/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,39 +1228,39 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1272,69 +1269,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1343,98 +1339,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1442,256 +1440,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1711,7 +1696,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1738,7 +1723,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1765,7 +1750,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1773,9 +1757,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1786,60 +1771,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1969,7 +1932,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2003,7 +1966,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2020,7 +1983,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2149,7 +2112,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2209,7 +2172,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2241,7 +2204,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2372,17 +2335,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2415,7 +2378,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2426,17 +2389,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2480,7 +2443,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2632,7 +2595,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2736,8 +2699,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2981,7 +2944,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3010,7 +2973,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3050,7 +3013,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3172,9 +3135,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3423,11 +3383,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3445,7 +3400,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3463,7 +3418,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/iw7/xsk/decompiler.hpp b/src/iw7/xsk/decompiler.hpp index 8541a610..399ba6f6 100644 --- a/src/iw7/xsk/decompiler.hpp +++ b/src/iw7/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/iw7/xsk/disassembler.cpp b/src/iw7/xsk/disassembler.cpp index 24559d5b..10315d38 100644 --- a/src/iw7/xsk/disassembler.cpp +++ b/src/iw7/xsk/disassembler.cpp @@ -299,7 +299,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -493,7 +493,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -516,7 +516,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/iw7/xsk/iw7.cpp b/src/iw7/xsk/iw7.cpp index 0dc72d8c..69e49951 100644 --- a/src/iw7/xsk/iw7.cpp +++ b/src/iw7/xsk/iw7.cpp @@ -174,7 +174,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/iw7/xsk/lexer.cpp b/src/iw7/xsk/lexer.cpp index 3eccfe01..1ec6bc58 100644 --- a/src/iw7/xsk/lexer.cpp +++ b/src/iw7/xsk/lexer.cpp @@ -682,7 +682,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -716,7 +716,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -750,7 +750,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/iw7/xsk/parser.cpp b/src/iw7/xsk/parser.cpp index ef720b29..ad13d856 100644 --- a/src/iw7/xsk/parser.cpp +++ b/src/iw7/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace iw7 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -546,6 +552,8 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -668,6 +676,10 @@ namespace xsk { namespace gsc { namespace iw7 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -848,6 +860,8 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -970,6 +984,10 @@ namespace xsk { namespace gsc { namespace iw7 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1149,6 +1167,8 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1271,6 +1291,10 @@ namespace xsk { namespace gsc { namespace iw7 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1705,6 +1729,8 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1827,6 +1853,10 @@ namespace xsk { namespace gsc { namespace iw7 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -1984,1333 +2014,1375 @@ namespace xsk { namespace gsc { namespace iw7 { switch (yyn) { case 2: // root: program -#line 258 "parser.ypp" +#line 261 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 1990 "parser.cpp" - break; - - case 3: // root: %empty -#line 259 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 1996 "parser.cpp" - break; - - case 4: // program: program inline -#line 264 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2002 "parser.cpp" - break; - - case 5: // program: program include -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2008 "parser.cpp" - break; - - case 6: // program: program declaration -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2014 "parser.cpp" - break; - - case 7: // program: inline -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; - case 8: // program: include -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 262 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2026 "parser.cpp" break; - case 9: // program: declaration -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 267 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2032 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 278 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2038 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 283 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2044 "parser.cpp" break; - case 12: // declaration: "/#" -#line 287 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; - case 13: // declaration: "#/" -#line 288 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2056 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2062 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 281 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2068 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 286 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2074 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 296 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 290 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2080 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 301 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 291 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2086 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 306 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2092 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 310 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2098 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 311 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2104 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 299 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2110 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 304 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2116 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 309 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2122 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 313 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2128 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 314 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2134 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2140 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2146 "parser.cpp" break; - case 29: // stmt: stmt_if -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 24: // stmt: stmt_notify +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2152 "parser.cpp" break; - case 30: // stmt: stmt_ifelse -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 25: // stmt: stmt_wait +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2158 "parser.cpp" break; - case 31: // stmt: stmt_while -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2164 "parser.cpp" break; - case 32: // stmt: stmt_dowhile -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2170 "parser.cpp" break; - case 33: // stmt: stmt_for -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2176 "parser.cpp" break; - case 34: // stmt: stmt_foreach -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 29: // stmt: stmt_if +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2182 "parser.cpp" break; - case 35: // stmt: stmt_switch -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 30: // stmt: stmt_ifelse +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2188 "parser.cpp" break; - case 36: // stmt: stmt_case -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 31: // stmt: stmt_while +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2194 "parser.cpp" break; - case 37: // stmt: stmt_default -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 32: // stmt: stmt_dowhile +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2200 "parser.cpp" break; - case 38: // stmt: stmt_break -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 33: // stmt: stmt_for +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2206 "parser.cpp" break; - case 39: // stmt: stmt_continue -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 34: // stmt: stmt_foreach +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2212 "parser.cpp" break; - case 40: // stmt: stmt_return -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 35: // stmt: stmt_switch +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2218 "parser.cpp" break; - case 41: // stmt: stmt_breakpoint -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 36: // stmt: stmt_case +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2224 "parser.cpp" break; - case 42: // stmt: stmt_prof_begin -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 37: // stmt: stmt_default +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2230 "parser.cpp" break; - case 43: // stmt: stmt_prof_end -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 38: // stmt: stmt_break +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2236 "parser.cpp" break; - case 44: // stmt_or_dev: stmt -#line 337 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 39: // stmt: stmt_continue +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2242 "parser.cpp" break; - case 45: // stmt_or_dev: stmt_dev -#line 338 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 40: // stmt: stmt_return +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2248 "parser.cpp" break; - case 46: // stmt_list: stmt_list stmt -#line 343 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 41: // stmt: stmt_breakpoint +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2254 "parser.cpp" break; - case 47: // stmt_list: stmt -#line 345 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_prof_begin +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2260 "parser.cpp" break; - case 48: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 350 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_end +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2266 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev -#line 352 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt_or_dev: stmt +#line 340 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2272 "parser.cpp" break; - case 50: // stmt_dev: "/#" stmt_list "#/" -#line 356 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 45: // stmt_or_dev: stmt_dev +#line 341 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2278 "parser.cpp" break; - case 51: // stmt_dev: "/#" "#/" -#line 357 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 46: // stmt_list: stmt_list stmt +#line 346 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2284 "parser.cpp" break; - case 52: // stmt_block: "{" stmt_or_dev_list "}" -#line 361 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 47: // stmt_list: stmt +#line 348 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2290 "parser.cpp" break; - case 53: // stmt_block: "{" "}" -#line 362 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 48: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 353 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2296 "parser.cpp" break; - case 54: // stmt_expr: expr_assign -#line 367 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 49: // stmt_or_dev_list: stmt_or_dev +#line 355 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2302 "parser.cpp" break; - case 55: // stmt_expr: expr_increment -#line 369 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_dev: "/#" stmt_list "#/" +#line 359 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2308 "parser.cpp" break; - case 56: // stmt_expr: expr_decrement -#line 371 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" "#/" +#line 360 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2314 "parser.cpp" break; - case 57: // stmt_expr: %empty -#line 373 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 52: // stmt_block: "{" stmt_or_dev_list "}" +#line 364 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2320 "parser.cpp" break; - case 58: // stmt_call: expr_call ";" -#line 378 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 53: // stmt_block: "{" "}" +#line 365 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2326 "parser.cpp" break; - case 59: // stmt_call: expr_method ";" -#line 380 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 54: // stmt_expr: expr_assign +#line 370 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; - case 60: // stmt_assign: expr_assign ";" -#line 385 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 55: // stmt_expr: expr_increment +#line 372 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; - case 61: // stmt_assign: expr_increment ";" -#line 387 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_decrement +#line 374 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2344 "parser.cpp" break; - case 62: // stmt_assign: expr_decrement ";" -#line 389 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: %empty +#line 376 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2350 "parser.cpp" break; - case 63: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 394 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 58: // stmt_call: expr_call ";" +#line 381 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2356 "parser.cpp" break; - case 64: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 399 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 59: // stmt_call: expr_method ";" +#line 383 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2362 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 401 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 60: // stmt_assign: expr_assign ";" +#line 388 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2368 "parser.cpp" break; - case 66: // stmt_wait: "wait" expr ";" -#line 406 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 61: // stmt_assign: expr_increment ";" +#line 390 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2374 "parser.cpp" break; - case 67: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 411 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 62: // stmt_assign: expr_decrement ";" +#line 392 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2380 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 413 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 63: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 397 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2386 "parser.cpp" break; - case 69: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 418 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 64: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 402 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2392 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 420 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 65: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 404 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2398 "parser.cpp" break; - case 71: // stmt_waittillframeend: "waittillframeend" ";" -#line 425 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 66: // stmt_wait: "wait" expr ";" +#line 409 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2404 "parser.cpp" break; - case 72: // stmt_if: "if" "(" expr ")" stmt -#line 430 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 67: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 414 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2410 "parser.cpp" break; - case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 416 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2416 "parser.cpp" break; - case 74: // stmt_while: "while" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 69: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 421 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2422 "parser.cpp" break; - case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 423 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2428 "parser.cpp" break; - case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillframeend: "waittillframeend" ";" +#line 428 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2434 "parser.cpp" break; - case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_if: "if" "(" expr ")" stmt +#line 433 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2440 "parser.cpp" break; - case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 457 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2446 "parser.cpp" break; - case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 462 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 74: // stmt_while: "while" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2452 "parser.cpp" break; - case 80: // stmt_case: "case" expr_integer ":" -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2458 "parser.cpp" break; - case 81: // stmt_case: "case" expr_string ":" -#line 469 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2464 "parser.cpp" break; - case 82: // stmt_default: "default" ":" -#line 474 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2470 "parser.cpp" break; - case 83: // stmt_break: "break" ";" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 460 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2476 "parser.cpp" break; - case 84: // stmt_continue: "continue" ";" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 79: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 465 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2482 "parser.cpp" break; - case 85: // stmt_return: "return" expr ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 80: // stmt_case: "case" expr_integer ":" +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2488 "parser.cpp" break; - case 86: // stmt_return: "return" ";" -#line 491 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 81: // stmt_case: "case" expr_string ":" +#line 472 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; - case 87: // stmt_breakpoint: "breakpoint" ";" -#line 496 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_default: "default" ":" +#line 477 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2500 "parser.cpp" break; - case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 83: // stmt_break: "break" ";" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2506 "parser.cpp" break; - case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 84: // stmt_continue: "continue" ";" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2512 "parser.cpp" break; - case 90: // expr: expr_ternary -#line 510 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 85: // stmt_return: "return" expr ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2518 "parser.cpp" break; - case 91: // expr: expr_binary -#line 511 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 86: // stmt_return: "return" ";" +#line 494 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2524 "parser.cpp" break; - case 92: // expr: expr_primitive -#line 512 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 87: // stmt_breakpoint: "breakpoint" ";" +#line 499 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2530 "parser.cpp" break; - case 93: // expr_or_empty: expr -#line 516 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2536 "parser.cpp" break; - case 94: // expr_or_empty: %empty -#line 517 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2542 "parser.cpp" break; - case 95: // expr_assign: expr_object "=" expr -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 90: // expr: expr_ternary +#line 513 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2548 "parser.cpp" break; - case 96: // expr_assign: expr_object "|=" expr -#line 524 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 91: // expr: expr_binary +#line 514 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2554 "parser.cpp" break; - case 97: // expr_assign: expr_object "&=" expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 92: // expr: expr_primitive +#line 515 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2560 "parser.cpp" break; - case 98: // expr_assign: expr_object "^=" expr -#line 528 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr_or_empty: expr +#line 519 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2566 "parser.cpp" break; - case 99: // expr_assign: expr_object "<<=" expr -#line 530 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 94: // expr_or_empty: %empty +#line 520 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2572 "parser.cpp" break; - case 100: // expr_assign: expr_object ">>=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr_assign: expr_tuple "=" expr +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2578 "parser.cpp" break; - case 101: // expr_assign: expr_object "+=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_assign: expr_object "=" expr +#line 527 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2584 "parser.cpp" break; - case 102: // expr_assign: expr_object "-=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_assign: expr_object "|=" expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2590 "parser.cpp" break; - case 103: // expr_assign: expr_object "*=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_object "&=" expr +#line 531 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2596 "parser.cpp" break; - case 104: // expr_assign: expr_object "/=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "^=" expr +#line 533 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2602 "parser.cpp" break; - case 105: // expr_assign: expr_object "%=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "<<=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2608 "parser.cpp" break; - case 106: // expr_increment: "++" expr_object -#line 547 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 101: // expr_assign: expr_object ">>=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2614 "parser.cpp" break; - case 107: // expr_increment: expr_object "++" -#line 549 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 102: // expr_assign: expr_object "+=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2620 "parser.cpp" break; - case 108: // expr_decrement: "--" expr_object -#line 554 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 103: // expr_assign: expr_object "-=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2626 "parser.cpp" break; - case 109: // expr_decrement: expr_object "--" -#line 556 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 104: // expr_assign: expr_object "*=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2632 "parser.cpp" break; - case 110: // expr_ternary: expr "?" expr ":" expr -#line 561 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 105: // expr_assign: expr_object "/=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2638 "parser.cpp" break; - case 111: // expr_binary: expr "||" expr -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 106: // expr_assign: expr_object "%=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2644 "parser.cpp" break; - case 112: // expr_binary: expr "&&" expr -#line 568 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 107: // expr_increment: "++" expr_object +#line 552 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2650 "parser.cpp" break; - case 113: // expr_binary: expr "==" expr -#line 570 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_increment: expr_object "++" +#line 554 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2656 "parser.cpp" break; - case 114: // expr_binary: expr "!=" expr -#line 572 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_decrement: "--" expr_object +#line 559 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2662 "parser.cpp" break; - case 115: // expr_binary: expr "<=" expr -#line 574 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_decrement: expr_object "--" +#line 561 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2668 "parser.cpp" break; - case 116: // expr_binary: expr ">=" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_ternary: expr "?" expr ":" expr +#line 566 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2674 "parser.cpp" break; - case 117: // expr_binary: expr "<" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_binary: expr "||" expr +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2680 "parser.cpp" break; - case 118: // expr_binary: expr ">" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_binary: expr "&&" expr +#line 573 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2686 "parser.cpp" break; - case 119: // expr_binary: expr "|" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_binary: expr "==" expr +#line 575 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2692 "parser.cpp" break; - case 120: // expr_binary: expr "&" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "!=" expr +#line 577 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2698 "parser.cpp" break; - case 121: // expr_binary: expr "^" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "<=" expr +#line 579 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2704 "parser.cpp" break; - case 122: // expr_binary: expr "<<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr ">=" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2710 "parser.cpp" break; - case 123: // expr_binary: expr ">>" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "<" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2716 "parser.cpp" break; - case 124: // expr_binary: expr "+" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr ">" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2722 "parser.cpp" break; - case 125: // expr_binary: expr "-" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr "|" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2728 "parser.cpp" break; - case 126: // expr_binary: expr "*" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "&" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2734 "parser.cpp" break; - case 127: // expr_binary: expr "/" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr "^" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2740 "parser.cpp" break; - case 128: // expr_binary: expr "%" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "<<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2746 "parser.cpp" break; - case 129: // expr_primitive: expr_complement -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 124: // expr_binary: expr ">>" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2752 "parser.cpp" break; - case 130: // expr_primitive: expr_negate -#line 605 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 125: // expr_binary: expr "+" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2758 "parser.cpp" break; - case 131: // expr_primitive: expr_not -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 126: // expr_binary: expr "-" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2764 "parser.cpp" break; - case 132: // expr_primitive: expr_call -#line 607 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 127: // expr_binary: expr "*" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2770 "parser.cpp" break; - case 133: // expr_primitive: expr_method -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 128: // expr_binary: expr "/" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2776 "parser.cpp" break; - case 134: // expr_primitive: expr_add_array -#line 609 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 129: // expr_binary: expr "%" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2782 "parser.cpp" break; - case 135: // expr_primitive: expr_reference -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 130: // expr_primitive: expr_complement +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2788 "parser.cpp" break; - case 136: // expr_primitive: expr_array -#line 611 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 131: // expr_primitive: expr_negate +#line 610 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2794 "parser.cpp" break; - case 137: // expr_primitive: expr_field -#line 612 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 132: // expr_primitive: expr_not +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2800 "parser.cpp" break; - case 138: // expr_primitive: expr_size -#line 613 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 133: // expr_primitive: expr_call +#line 612 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2806 "parser.cpp" break; - case 139: // expr_primitive: expr_paren -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 134: // expr_primitive: expr_method +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2812 "parser.cpp" break; - case 140: // expr_primitive: expr_thisthread -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 135: // expr_primitive: expr_add_array +#line 614 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2818 "parser.cpp" break; - case 141: // expr_primitive: expr_empty_array -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 136: // expr_primitive: expr_reference +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2824 "parser.cpp" break; - case 142: // expr_primitive: expr_undefined -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 137: // expr_primitive: expr_array +#line 616 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2830 "parser.cpp" break; - case 143: // expr_primitive: expr_game -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 138: // expr_primitive: expr_field +#line 617 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2836 "parser.cpp" break; - case 144: // expr_primitive: expr_self -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 139: // expr_primitive: expr_size +#line 618 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2842 "parser.cpp" break; - case 145: // expr_primitive: expr_anim -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 140: // expr_primitive: expr_paren +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2848 "parser.cpp" break; - case 146: // expr_primitive: expr_level -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 141: // expr_primitive: expr_thisthread +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2854 "parser.cpp" break; - case 147: // expr_primitive: expr_animation -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 142: // expr_primitive: expr_empty_array +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2860 "parser.cpp" break; - case 148: // expr_primitive: expr_animtree -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 143: // expr_primitive: expr_undefined +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2866 "parser.cpp" break; - case 149: // expr_primitive: expr_identifier -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 144: // expr_primitive: expr_game +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2872 "parser.cpp" break; - case 150: // expr_primitive: expr_istring -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 145: // expr_primitive: expr_self +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2878 "parser.cpp" break; - case 151: // expr_primitive: expr_string -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 146: // expr_primitive: expr_anim +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2884 "parser.cpp" break; - case 152: // expr_primitive: expr_vector -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 147: // expr_primitive: expr_level +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2890 "parser.cpp" break; - case 153: // expr_primitive: expr_float -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 148: // expr_primitive: expr_animation +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2896 "parser.cpp" break; - case 154: // expr_primitive: expr_integer -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 149: // expr_primitive: expr_animtree +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2902 "parser.cpp" break; - case 155: // expr_primitive: expr_false -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 150: // expr_primitive: expr_identifier +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2908 "parser.cpp" break; - case 156: // expr_primitive: expr_true -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 151: // expr_primitive: expr_istring +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2914 "parser.cpp" break; - case 157: // expr_complement: "~" expr -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 152: // expr_primitive: expr_string +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2920 "parser.cpp" break; - case 158: // expr_negate: "-" expr_identifier -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 153: // expr_primitive: expr_vector +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2926 "parser.cpp" break; - case 159: // expr_negate: "-" expr_paren -#line 643 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 154: // expr_primitive: expr_float +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2932 "parser.cpp" break; - case 160: // expr_negate: "-" expr_array -#line 645 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 155: // expr_primitive: expr_integer +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2938 "parser.cpp" break; - case 161: // expr_negate: "-" expr_field -#line 647 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 156: // expr_primitive: expr_false +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2944 "parser.cpp" break; - case 162: // expr_not: "!" expr -#line 652 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 157: // expr_primitive: expr_true +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2950 "parser.cpp" break; - case 163: // expr_call: expr_function -#line 656 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 158: // expr_complement: "~" expr +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2956 "parser.cpp" break; - case 164: // expr_call: expr_pointer -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 159: // expr_negate: "-" expr_identifier +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 2962 "parser.cpp" break; - case 165: // expr_method: expr_object expr_function -#line 660 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 160: // expr_negate: "-" expr_paren +#line 648 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 2968 "parser.cpp" break; - case 166: // expr_method: expr_object expr_pointer -#line 661 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_negate: "-" expr_array +#line 650 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 2974 "parser.cpp" break; - case 167: // expr_function: expr_identifier "(" expr_arguments ")" -#line 666 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 162: // expr_negate: "-" expr_field +#line 652 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 2980 "parser.cpp" break; - case 168: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 668 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 163: // expr_not: "!" expr +#line 657 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2986 "parser.cpp" break; - case 169: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 670 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 164: // expr_call: expr_function +#line 661 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2992 "parser.cpp" break; - case 170: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 672 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 165: // expr_call: expr_pointer +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2998 "parser.cpp" break; - case 171: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 674 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 166: // expr_method: expr_object expr_function +#line 665 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3004 "parser.cpp" break; - case 172: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 167: // expr_method: expr_object expr_pointer +#line 666 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3010 "parser.cpp" break; - case 173: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 681 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 168: // expr_function: expr_identifier "(" expr_arguments ")" +#line 671 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3016 "parser.cpp" break; - case 174: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 683 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 169: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 673 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3022 "parser.cpp" break; - case 175: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 685 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 675 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3028 "parser.cpp" break; - case 176: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 687 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 171: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 677 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3034 "parser.cpp" break; - case 177: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 692 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 172: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 679 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3040 "parser.cpp" break; - case 178: // expr_parameters: expr_parameters "," expr_identifier -#line 697 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 173: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3046 "parser.cpp" break; - case 179: // expr_parameters: expr_identifier -#line 699 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 174: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 686 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3052 "parser.cpp" break; - case 180: // expr_parameters: %empty -#line 701 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 175: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 688 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3058 "parser.cpp" break; - case 181: // expr_arguments: expr_arguments_no_empty -#line 706 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 176: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 690 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3064 "parser.cpp" break; - case 182: // expr_arguments: %empty -#line 708 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 177: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 692 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3070 "parser.cpp" break; - case 183: // expr_arguments_no_empty: expr_arguments "," expr -#line 713 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 178: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 697 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3076 "parser.cpp" break; - case 184: // expr_arguments_no_empty: expr -#line 715 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 179: // expr_parameters: expr_parameters "," expr_identifier +#line 702 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3082 "parser.cpp" break; - case 185: // expr_reference: "::" expr_identifier -#line 720 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 180: // expr_parameters: expr_identifier +#line 704 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3088 "parser.cpp" break; - case 186: // expr_reference: expr_path "::" expr_identifier -#line 722 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 181: // expr_parameters: %empty +#line 706 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3094 "parser.cpp" break; - case 187: // expr_array: expr_object "[" expr "]" -#line 727 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 182: // expr_arguments: expr_arguments_no_empty +#line 711 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3100 "parser.cpp" break; - case 188: // expr_field: expr_object "." expr_identifier_nosize -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_arguments: %empty +#line 713 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3106 "parser.cpp" break; - case 189: // expr_size: expr_object "." "size" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 184: // expr_arguments_no_empty: expr_arguments "," expr +#line 718 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3112 "parser.cpp" break; - case 190: // expr_paren: "(" expr ")" -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments_no_empty: expr +#line 720 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3118 "parser.cpp" break; - case 191: // expr_object: expr_call -#line 746 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 186: // expr_reference: "::" expr_identifier +#line 725 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3124 "parser.cpp" break; - case 192: // expr_object: expr_method -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 187: // expr_reference: expr_path "::" expr_identifier +#line 727 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3130 "parser.cpp" break; - case 193: // expr_object: expr_array -#line 748 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 188: // expr_tuple: "[" expr_tuple_arguments "]" +#line 732 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3136 "parser.cpp" break; - case 194: // expr_object: expr_field -#line 749 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 189: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3142 "parser.cpp" break; - case 195: // expr_object: expr_game -#line 750 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 190: // expr_tuple_arguments: expr_tuple_types +#line 739 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3148 "parser.cpp" break; - case 196: // expr_object: expr_self -#line 751 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 191: // expr_tuple_types: expr_array +#line 743 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3154 "parser.cpp" break; - case 197: // expr_object: expr_anim -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 192: // expr_tuple_types: expr_field +#line 744 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3160 "parser.cpp" break; - case 198: // expr_object: expr_level -#line 753 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 193: // expr_tuple_types: expr_identifier +#line 745 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3166 "parser.cpp" break; - case 199: // expr_object: expr_identifier -#line 754 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 194: // expr_array: expr_object "[" expr "]" +#line 750 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3172 "parser.cpp" break; - case 200: // expr_thisthread: "thisthread" -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 195: // expr_field: expr_object "." expr_identifier_nosize +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3178 "parser.cpp" break; - case 201: // expr_empty_array: "[" "]" -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 196: // expr_size: expr_object "." "size" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3184 "parser.cpp" break; - case 202: // expr_undefined: "undefined" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 197: // expr_paren: "(" expr ")" +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3190 "parser.cpp" break; - case 203: // expr_game: "game" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_object: expr_call +#line 769 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3196 "parser.cpp" break; - case 204: // expr_self: "self" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_object: expr_method +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3202 "parser.cpp" break; - case 205: // expr_anim: "anim" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_object: expr_array +#line 771 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3208 "parser.cpp" break; - case 206: // expr_level: "level" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_field +#line 772 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3214 "parser.cpp" break; - case 207: // expr_animation: "%" "identifier" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 202: // expr_object: expr_game +#line 773 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3220 "parser.cpp" break; - case 208: // expr_animtree: "#animtree" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_self +#line 774 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3226 "parser.cpp" break; - case 209: // expr_identifier_nosize: "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 204: // expr_object: expr_anim +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3232 "parser.cpp" break; - case 210: // expr_identifier: "identifier" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_level +#line 776 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3238 "parser.cpp" break; - case 211: // expr_identifier: "size" -#line 811 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 206: // expr_object: expr_identifier +#line 777 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3244 "parser.cpp" break; - case 212: // expr_path: "identifier" -#line 816 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_thisthread: "thisthread" +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3250 "parser.cpp" break; - case 213: // expr_path: "path" -#line 818 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_empty_array: "[" "]" +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3256 "parser.cpp" break; - case 214: // expr_istring: "localized string" -#line 823 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 209: // expr_undefined: "undefined" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3262 "parser.cpp" break; - case 215: // expr_string: "string literal" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_game: "game" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3268 "parser.cpp" break; - case 216: // expr_vector: "(" expr "," expr "," expr ")" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 211: // expr_self: "self" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3274 "parser.cpp" break; - case 217: // expr_float: "-" "float" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 212: // expr_anim: "anim" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; - case 218: // expr_float: "float" -#line 840 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_level: "level" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; - case 219: // expr_integer: "-" "integer" -#line 845 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 214: // expr_animation: "%" "identifier" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3292 "parser.cpp" break; - case 220: // expr_integer: "integer" -#line 847 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 215: // expr_animtree: "#animtree" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3298 "parser.cpp" break; - case 221: // expr_false: "false" -#line 852 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 216: // expr_identifier_nosize: "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3304 "parser.cpp" break; - case 222: // expr_true: "true" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 217: // expr_identifier: "identifier" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3310 "parser.cpp" break; + case 218: // expr_identifier: "size" +#line 834 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3316 "parser.cpp" + break; -#line 3314 "parser.cpp" + case 219: // expr_path: "identifier" +#line 839 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3322 "parser.cpp" + break; + + case 220: // expr_path: "path" +#line 841 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3328 "parser.cpp" + break; + + case 221: // expr_istring: "localized string" +#line 846 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3334 "parser.cpp" + break; + + case 222: // expr_string: "string literal" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3340 "parser.cpp" + break; + + case 223: // expr_vector: "(" expr "," expr "," expr ")" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3346 "parser.cpp" + break; + + case 224: // expr_float: "-" "float" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3352 "parser.cpp" + break; + + case 225: // expr_float: "float" +#line 863 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3358 "parser.cpp" + break; + + case 226: // expr_integer: "-" "integer" +#line 868 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3364 "parser.cpp" + break; + + case 227: // expr_integer: "integer" +#line 870 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3370 "parser.cpp" + break; + + case 228: // expr_false: "false" +#line 875 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3376 "parser.cpp" + break; + + case 229: // expr_true: "true" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3382 "parser.cpp" + break; + + +#line 3386 "parser.cpp" default: break; @@ -3521,7 +3593,8 @@ namespace xsk { namespace gsc { namespace iw7 { "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", + "expr_tuple", "expr_tuple_arguments", "expr_tuple_types", "expr_array", + "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier_nosize", "expr_identifier", @@ -3795,469 +3868,484 @@ namespace xsk { namespace gsc { namespace iw7 { } - const short parser::yypact_ninf_ = -280; + const short parser::yypact_ninf_ = -281; - const short parser::yytable_ninf_ = -213; + const short parser::yytable_ninf_ = -220; const short parser::yypact_[] = { - 26, -280, -280, -44, -44, -8, -280, -280, 19, 26, - -280, -280, -280, -280, -280, -280, -30, -280, -280, -11, - 2, -75, -280, -280, -280, -280, -38, 1168, -280, -280, - -280, -6, -41, -280, -280, -31, -28, -280, 12, -280, - -280, -280, -280, -280, -280, -280, 1168, 1042, -38, 1168, - 1168, 51, -24, 23, -280, -280, -280, 2072, -280, -280, - -280, -280, -280, -280, 324, 440, -280, -280, -280, -280, - 515, 550, -280, -280, 651, -280, -280, -280, 661, 862, - 867, 1065, -280, -280, 71, 33, -280, -280, -280, -280, - -280, -280, -280, 35, 31, -38, 48, 57, 59, 61, - 73, 66, 76, 1364, 1042, -280, 2155, 77, 87, -280, - -280, -280, 1168, 82, -280, -280, -280, -280, 515, 550, - -280, 1073, -280, -280, -280, -280, 71, 91, -280, -280, - 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, - 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1231, - -36, -280, -280, 105, 1168, -38, -280, 831, -280, -280, - 1168, 1168, -38, 1168, 1168, -38, 1168, -280, 1168, 1164, - 1168, -280, 1530, 1168, 49, -38, 2037, 95, 95, 2186, - 2196, 187, 187, -37, -37, -37, -37, 2227, 2268, 2237, - -62, -62, -280, -280, -280, 1842, -280, -280, -280, -32, - -280, 109, 960, 1168, 100, 112, 1354, 113, 119, 120, - 121, -21, 114, 117, 122, 1105, 123, 129, 130, -280, - 39, 39, -280, -280, 907, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - 133, 135, 136, 137, 138, -280, -280, 1278, 105, 1882, - 18, 150, 1922, 52, 153, 1962, 2001, 151, 2155, 1164, - 109, 1168, -280, -280, 1168, -280, -280, 1013, 2107, -280, - 1168, 182, 1168, 618, -38, 1168, 108, 152, 154, -280, - -280, -280, -280, 2142, -280, 1168, 1168, 1073, 1073, -280, - -280, -280, -280, -280, -280, -280, 159, 162, 166, 167, - -280, -280, 1168, 1168, 1168, 1168, 1168, 1168, 1168, 1168, - 1168, 1168, 1168, 163, -280, 1168, 172, -280, 1168, 176, - 1168, 171, 2155, 55, -280, -280, -280, 1564, 183, 1598, - 175, -280, -280, -280, 696, -15, 1632, -280, -280, -280, - 62, 63, 1168, 1168, 1168, 1168, 2155, 2155, 2155, 2155, - 2155, 2155, 2155, 2155, 2155, 2155, 2155, 186, 75, 191, - 81, 192, 1666, 1168, -280, 1354, 1168, 1354, 1168, 1168, - -38, 31, 190, 194, 1700, 1408, 1452, 1496, 1168, -280, - 1168, -280, 1168, -280, 88, 199, 1734, -280, 2155, 195, - 1768, 221, -280, -280, -280, 202, 203, 1168, 204, 1168, - 208, 1168, 92, 101, 102, -280, 1354, 209, 618, 1354, - 1168, -280, -280, 219, -280, 222, -280, 223, -280, -280, - -280, -280, -280, 224, -280, 1802, 212, 229, 230, 1354, - 1354, -280, -280, -280, -280, -280 + 4, -281, -281, -72, -72, -41, -281, -281, 32, 4, + -281, -281, -281, -281, -281, -281, -21, -281, -281, -28, + -1, -22, -281, -281, -281, -281, -43, 1235, -281, -281, + -281, 5, -29, -281, -281, -26, -24, -281, 8, -281, + -281, -281, -281, -281, -281, -281, 1235, 1109, -43, 1235, + 1235, 612, 1, 47, -281, -281, -281, 2111, -281, -281, + -281, -281, -281, -281, 108, 145, -281, -281, -281, -281, + 372, 438, -281, -281, 633, -281, -281, -281, 664, 818, + 982, 987, -281, -281, 39, 59, -281, -281, -281, -281, + -281, -281, -281, 61, 16, -43, 65, 78, 79, 103, + 109, 127, 133, 1443, 1109, -281, 2194, 125, 136, -281, + -281, -281, 1235, 134, -281, -281, -281, -281, 372, 438, + -281, 1132, -281, -281, -281, -281, 39, 137, -281, -281, + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1298, + -35, -281, -281, 147, 1235, -43, -281, 951, -281, -281, + 1235, 1235, -43, 1235, 1235, -43, 1235, -281, 1235, 1231, + 1235, -281, 1609, 1235, 102, -43, 2076, -51, -51, 2225, + 865, 2276, 2276, -27, -27, -27, -27, 2235, 273, 2266, + 51, 51, -281, -281, -281, 1294, -281, -281, -281, 23, + -281, 150, 77, 1235, 148, 157, 1381, 160, 162, 163, + 166, -15, 158, 165, 167, 1172, 168, 172, 173, -281, + 409, 703, 703, -281, -281, 1027, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, 175, 184, 185, 186, 187, 142, -281, -281, 808, + 147, 1921, 30, 176, 1961, 36, 182, 2001, 2040, 195, + 2194, 1231, 150, 1235, -281, -281, 1235, -281, -281, 1080, + 2146, -281, 1235, 224, 1235, 738, -43, 1235, 151, 193, + 196, -281, -281, -281, -281, 2181, -281, 1235, 1235, 1298, + 35, -281, 112, 123, -4, 1132, 1132, -281, -281, -281, + -281, -281, -281, -281, 1235, 204, 206, 209, 210, -281, + -281, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, 1235, + 1235, 1235, 207, -281, 1235, 211, -281, 1235, 212, 1235, + 214, 2194, 76, -281, -281, -281, 1643, 215, 1677, 201, + -281, -281, -281, 1407, -8, 1711, -281, -281, -281, 82, + 85, -281, 703, 2194, 1235, 1235, 1235, 1235, 2194, 2194, + 2194, 2194, 2194, 2194, 2194, 2194, 2194, 2194, 2194, 219, + 104, 220, 107, 221, 1745, 1235, -281, 1381, 1235, 1381, + 1235, 1235, -43, 16, 216, 222, -281, 1779, 1487, 1531, + 1575, 1235, -281, 1235, -281, 1235, -281, 120, 249, 1813, + -281, 2194, 223, 1847, 246, -281, -281, -281, 227, 229, + 1235, 232, 1235, 235, 1235, 124, 126, 138, -281, 1381, + 236, 738, 1381, 1235, -281, -281, 228, -281, 230, -281, + 247, -281, -281, -281, -281, -281, 250, -281, 1881, 242, + 243, 248, 1381, 1381, -281, -281, -281, -281, -281 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 211, 210, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 213, 212, 0, - 0, 0, 1, 4, 5, 6, 180, 0, 10, 11, - 215, 0, 0, 179, 208, 0, 0, 200, 0, 222, - 221, 202, 203, 204, 205, 206, 0, 182, 0, 0, - 0, 0, 0, 210, 214, 218, 220, 0, 90, 91, - 92, 129, 130, 131, 132, 133, 163, 164, 134, 135, - 136, 137, 138, 139, 0, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 0, 150, 151, 152, 153, - 154, 155, 156, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 182, 201, 184, 0, 181, 185, - 162, 157, 0, 0, 217, 219, 191, 192, 160, 161, - 159, 0, 195, 196, 197, 198, 158, 0, 207, 18, + 3, 12, 13, 0, 0, 0, 218, 217, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 220, 219, 0, + 0, 0, 1, 4, 5, 6, 181, 0, 10, 11, + 222, 0, 0, 180, 215, 0, 0, 207, 0, 229, + 228, 209, 210, 211, 212, 213, 0, 183, 0, 0, + 0, 0, 0, 217, 221, 225, 227, 0, 90, 91, + 92, 130, 131, 132, 133, 134, 164, 165, 135, 136, + 137, 138, 139, 140, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 0, 151, 152, 153, 154, + 155, 156, 157, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 183, 208, 185, 0, 182, 186, + 163, 158, 0, 0, 224, 226, 198, 199, 161, 162, + 160, 0, 202, 203, 204, 205, 159, 0, 214, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 165, 166, 0, 182, 0, 17, 0, 19, 178, - 0, 182, 0, 0, 182, 0, 0, 190, 0, 184, - 0, 177, 0, 0, 0, 0, 0, 122, 123, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 124, 125, 126, 127, 128, 0, 189, 209, 188, 0, - 181, 186, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 166, 167, 0, 183, 0, 17, 0, 19, 179, + 0, 183, 0, 0, 183, 0, 0, 197, 0, 185, + 0, 178, 0, 0, 0, 0, 0, 123, 124, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 125, 126, 127, 128, 129, 0, 196, 216, 195, 0, + 182, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, - 0, 0, 44, 49, 0, 45, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 0, 0, 0, 191, 192, 193, 194, 0, 199, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 183, 0, - 0, 0, 187, 167, 182, 51, 47, 0, 0, 71, - 0, 0, 0, 57, 0, 0, 0, 0, 0, 82, - 83, 84, 86, 0, 87, 182, 182, 106, 108, 52, - 48, 60, 61, 62, 58, 59, 0, 0, 0, 0, - 107, 109, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 169, 182, 0, 171, 182, 0, - 0, 0, 110, 0, 50, 46, 66, 0, 0, 0, - 0, 54, 55, 56, 0, 0, 0, 81, 80, 85, - 0, 0, 0, 0, 0, 0, 95, 101, 102, 103, - 104, 105, 96, 97, 98, 100, 99, 0, 0, 0, - 0, 0, 0, 182, 168, 0, 0, 0, 94, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 182, 170, - 182, 172, 182, 216, 0, 72, 0, 74, 93, 0, - 0, 0, 79, 88, 89, 0, 0, 182, 0, 182, - 0, 182, 0, 0, 0, 173, 0, 0, 57, 0, - 0, 63, 65, 181, 68, 181, 70, 181, 174, 175, - 176, 73, 75, 0, 77, 0, 0, 0, 0, 0, - 0, 64, 67, 69, 76, 78 + 0, 0, 0, 44, 49, 0, 45, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 0, 0, 0, 198, 199, 0, 200, 201, 0, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 184, 0, 0, 0, 194, 168, 183, 51, 47, 0, + 0, 71, 0, 0, 0, 57, 0, 0, 0, 0, + 0, 82, 83, 84, 86, 0, 87, 183, 183, 0, + 0, 190, 200, 201, 206, 107, 109, 52, 48, 60, + 61, 62, 58, 59, 0, 0, 0, 0, 0, 108, + 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 170, 183, 0, 172, 183, 0, 0, + 0, 111, 0, 50, 46, 66, 0, 0, 0, 0, + 54, 55, 56, 0, 0, 0, 81, 80, 85, 0, + 0, 188, 0, 95, 0, 0, 0, 0, 96, 102, + 103, 104, 105, 106, 97, 98, 99, 101, 100, 0, + 0, 0, 0, 0, 0, 183, 169, 0, 0, 0, + 94, 0, 0, 0, 0, 0, 189, 0, 0, 0, + 0, 183, 171, 183, 173, 183, 223, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 183, 0, 183, 0, 183, 0, 0, 0, 174, 0, + 0, 57, 0, 0, 63, 65, 182, 68, 182, 70, + 182, 175, 176, 177, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 64, 67, 69, 76, 78 }; const short parser::yypgoto_[] = { - -280, -280, -280, 276, 285, 286, -280, -280, -280, -172, - 72, -280, -280, -280, -93, -119, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, -280, - -280, -280, -280, -280, -280, -280, -280, -280, -280, 189, - -280, -279, -277, -276, -280, -280, -280, -280, -280, -280, - -29, 25, -72, -57, -280, -280, 15, -42, -280, 211, - 294, -280, 249, 310, -280, -280, -280, 327, 378, 395, - 412, -280, -280, -280, 0, 9, -280, -18, -280, -280, - 93, -280, -280 + -281, -281, -281, 272, 298, 299, -281, -281, -281, 194, + 86, -281, -281, -281, -92, -121, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, -281, + -281, -281, -281, -281, -281, -281, -281, -281, -281, 188, + -281, -280, -279, -278, -281, -281, -281, -281, -281, -281, + 92, 203, -66, -62, -281, -281, -127, -46, -281, -281, + -281, -13, 213, 337, -281, 289, 385, -281, -281, -281, + 392, 480, 512, 519, -281, -281, -281, 0, 10, -281, + -17, -281, -281, 130, -281, -281 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 222, - 223, 277, 224, 225, 226, 340, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 106, - 399, 250, 251, 252, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 32, 107, 200, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 198, 84, 85, 86, 87, 88, 89, - 90, 91, 92 + 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, + 224, 279, 225, 226, 227, 349, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 106, + 412, 251, 252, 253, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 32, 107, 200, 69, 256, + 300, 301, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 198, 84, 85, 86, + 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 158, 151, 31, 341, 108, 342, 343, 6, 16, - 196, 94, 19, 20, 379, 6, 95, 152, 6, 22, - 273, 26, 116, 30, 96, 170, 33, 99, 131, 132, - 276, 146, 147, 148, 281, 97, 100, 1, 2, 3, - 4, 5, 380, 21, 98, 101, 93, 27, 109, 151, - 28, 126, 17, 18, 144, 145, 146, 147, 148, 7, - 127, 197, 108, 29, 152, 17, 53, 102, 17, 53, - 324, 286, 6, 128, 153, 170, 117, 30, 35, 36, - 56, 38, -212, 127, 157, 6, 42, 43, 44, 45, - 35, 36, 155, 38, 113, 159, 156, 6, 42, 43, - 44, 45, 112, 160, 327, 335, 113, 374, 161, 170, - -199, -199, 170, -199, 382, 383, 163, -199, 162, 170, - 170, 153, 154, 7, 164, 165, -199, 389, 253, -199, - 127, 166, 170, 391, 170, 17, 53, 173, 170, 341, - 415, 342, 343, 171, 428, 170, 197, 17, 53, 170, - 175, 114, 115, 429, 430, 201, 154, 258, 170, 170, - 274, 279, 261, 280, 282, 264, 127, -199, -199, 199, - 283, 284, 285, 253, 289, 270, 260, 253, 290, 263, - 295, 296, 254, 291, 294, 151, 144, 145, 146, 147, - 148, 116, 116, 287, 301, 253, 302, 303, 304, 305, - 152, 325, 258, 395, 328, 397, 258, 331, 338, 115, - 352, 127, 347, 353, 348, 127, 57, 354, 355, 367, - 258, 258, 373, 416, 258, 151, 151, 254, 369, 127, - 127, 254, 371, 127, 376, 103, 378, 388, 110, 111, - 152, 152, 390, 392, 431, 117, 117, 434, 253, 254, - 420, 403, 131, 132, 116, 404, 418, 153, 137, 138, - 139, 140, 118, 421, 422, 424, 127, 444, 445, 426, - 432, 436, 151, 441, 437, 438, 439, 258, 144, 145, - 146, 147, 148, 258, 345, 23, 127, 152, 402, 333, - 442, 443, 127, 169, 24, 25, 300, 153, 153, 433, - 120, 172, 254, 0, 288, 0, 127, 127, 117, 0, - 350, 351, 0, 0, 0, 0, 0, 0, 0, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 0, - 368, 0, 0, 370, 153, 119, 253, 0, 253, 259, - 0, 0, 262, 127, 0, 265, 0, 266, 0, 268, - 0, 121, 269, -191, -191, 423, -191, 425, 255, 427, - -191, 0, 0, 0, 0, 258, 0, 258, 122, -191, - 401, 0, -191, 0, 127, 0, 127, 253, 394, 116, - 253, 0, 278, 0, 0, 0, 0, 0, 0, 0, - 254, 0, 254, 412, 293, 413, 0, 414, 0, 0, - 253, 253, 0, 255, 0, 0, 258, 255, 258, 258, - -191, -191, 0, 0, 0, 127, 0, 127, 127, 123, - 0, 255, 255, 0, 0, 255, 0, 0, 0, 258, - 258, 254, 0, 117, 254, 0, 124, 0, 127, 127, - 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, - 332, 0, 0, 125, 254, 254, 0, 257, 0, 337, - 0, 339, 0, 0, 346, 0, 0, 0, 0, -192, - -192, 0, -192, 0, 122, 0, -192, 0, 255, 0, - 0, 0, 0, 0, 255, -192, 256, 0, -192, 0, - 256, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 257, 0, 256, 256, 257, 0, 256, 372, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, - 297, 298, 0, 122, 257, 123, -192, -192, 0, 0, - 0, 384, 385, 386, 387, 0, 0, 122, 122, 0, - 0, 122, 124, 0, -193, -193, 0, -193, 0, 0, - 0, -193, 0, 0, 0, 396, 0, 398, 400, 125, - -193, 256, 0, -193, 0, 0, 0, 256, 0, 0, - 123, 0, 0, 0, 123, 0, 255, 257, 255, -194, - -194, 0, -194, 344, 0, 0, -194, 124, 123, 123, - 0, 124, 123, 0, 122, -194, 0, 0, -194, 435, - 122, -193, -193, 0, 125, 124, 124, 0, 125, 124, - 0, 0, 0, 0, 0, 0, 0, 255, 0, 255, - 255, 0, 125, 125, 0, 0, 125, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -194, -194, 0, 0, - 255, 255, 0, 0, 0, 123, 0, 35, 36, 0, - 38, 123, 0, 0, 6, 42, 43, 44, 45, 256, - 0, 256, 124, 113, 0, 0, 0, 0, 124, 0, - 0, 220, 221, 0, 0, 257, 0, 257, 0, 125, - 35, 36, 0, 38, 0, 125, 0, 6, 0, 0, - -195, -195, 122, -195, 122, 0, 149, -195, 0, 150, - 256, 0, 256, 256, 17, 53, -195, 0, 0, -195, - 0, 0, 0, 0, 0, 0, 257, 0, 344, 257, - 0, 0, 0, 256, 256, 35, 36, 0, 38, 0, - 0, 0, 6, 122, 0, 122, 122, 17, 53, 257, - 257, 149, 0, 123, 174, 123, 0, -195, -195, 310, - 311, 0, 0, 0, 0, 0, 122, 122, 0, 0, - 124, 0, 124, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 0, 0, 0, 125, 0, 125, - 0, 0, 17, 53, 123, 0, 123, 123, 0, 0, + 16, 108, 158, 6, 31, 350, 351, 352, 151, 16, + 21, 196, 152, 19, 20, 1, 2, 3, 4, 5, + 6, 391, 6, 94, 17, 18, 33, 199, 95, 96, + 26, 99, 22, 28, 262, 97, 100, 265, 131, 132, + 144, 145, 146, 147, 148, 98, 101, 154, 109, 392, + 6, 126, -193, -193, 7, 151, 27, 93, 108, 152, + 29, 127, 197, 102, 144, 145, 146, 147, 148, 157, + 17, 53, 17, 53, 153, 275, 30, 288, -206, -206, + 170, -206, 333, 30, 127, -206, 56, 170, 336, 277, + 154, 361, 362, 170, -206, 159, 203, -206, 128, 204, + 205, 7, 206, 207, 208, 209, -219, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 35, 36, 155, 38, + 160, 153, 156, 6, 42, 43, 44, 45, 386, 161, + 157, 127, 220, 170, 394, -206, -206, 395, 162, 170, + 221, 222, 170, 116, 146, 147, 148, -198, -198, 342, + -198, 350, 351, 352, -198, 201, 402, 260, 163, 404, + 164, 170, 263, -198, 170, 266, -198, 127, -191, -191, + 359, 360, 428, 17, 53, 272, 441, 170, 442, -192, + -192, 170, 170, 170, -199, -199, 165, -199, 166, 173, + 443, -199, 171, 151, 289, 170, 175, 152, 154, 197, + -199, 276, 260, -199, -198, -198, 260, 380, 282, 281, + 382, 284, 127, 285, 286, 57, 127, 287, 291, 314, + 304, 260, 260, 297, 298, 260, 292, 334, 293, 296, + 127, 127, 127, 337, 103, 127, 309, 110, 111, 151, + 151, -199, -199, 152, 152, 310, 311, 312, 313, 254, + 347, 340, 115, 356, 117, 364, 357, 365, 407, 153, + 366, 367, 390, 379, 118, 385, 388, 381, 383, 127, + 401, 403, 405, 429, 425, 433, 426, 416, 427, 260, + 449, 23, 450, 417, 431, 260, 354, 151, 434, 127, + 435, 152, 169, 437, 254, 127, 439, 445, 254, 451, + 172, 415, 452, 454, 455, 153, 153, 24, 25, 456, + 446, 308, 116, 116, 116, 127, 127, 254, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 131, 132, + 120, 290, 135, 136, 137, 138, 139, 140, 261, 396, + 0, 264, 0, 153, 267, 0, 268, 0, 270, 0, + 255, 271, 304, 127, 144, 145, 146, 147, 148, 0, + 257, 254, 127, 0, 436, 0, 438, 116, 440, 0, + 0, 0, 0, 0, 0, 0, 0, 260, 119, 260, + 0, 280, 414, 0, 0, 0, 278, 127, 0, 127, + 283, 0, 0, 295, 0, 255, 0, 0, 0, 255, + 0, -200, -200, 0, -200, 257, 0, 0, -200, 257, + 0, 0, 0, 117, 117, 117, 0, -200, 255, 260, + -200, 260, 260, 302, 257, 257, 121, 0, 257, 127, + 0, 127, 127, 122, 0, 0, 0, 0, 35, 36, + 0, 38, 260, 260, 116, 6, 42, 43, 44, 45, + 0, 341, 127, 127, 299, 0, 0, 0, -200, -200, + 346, 0, 348, 344, 0, 355, 0, -201, -201, 254, + -201, 254, 255, 0, -201, 0, 0, 271, 117, 0, + 0, 0, 257, -201, 258, 0, -201, 0, 257, 0, + 0, 0, 363, 0, 0, 17, 53, 0, 0, 368, + 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, + 0, 254, 0, 116, 254, 0, 0, 384, 0, 0, + 0, 123, 0, 0, -201, -201, 0, 0, 0, 258, + 0, 0, 259, 258, 254, 254, 0, 0, 0, 122, + 0, 0, 397, 398, 399, 400, 0, 303, 258, 258, + 0, 0, 258, 124, 0, 117, 0, 0, 0, 0, + 125, 0, 0, 0, 0, 302, 409, 0, 411, 413, + 0, 408, 0, 410, 0, 0, 0, 259, 0, 0, + 255, 259, 255, 0, 122, 0, 0, 0, 122, 0, + 257, 0, 257, 0, 0, 121, 305, 306, 0, 0, + 259, 0, 122, 122, 122, 0, 258, 122, 0, 0, + 0, 448, 258, 444, 0, 0, 447, 0, 0, 0, + 0, 0, 255, 0, 117, 255, 0, 123, 0, 0, + 0, 0, 257, 0, 257, 257, 457, 458, 0, 0, + 0, 35, 36, 0, 38, 255, 255, 0, 6, 42, + 43, 44, 45, 112, 259, 257, 257, 113, 0, 124, + 353, 122, 35, 36, 0, 38, 125, 122, 0, 6, + 0, 0, 123, 0, 0, 0, 123, 0, 149, 0, + 0, 150, 0, 0, 0, 0, 0, 0, 0, 303, + 123, 123, 123, -202, -202, 123, -202, 0, 17, 53, + -202, 0, 114, 115, 124, 0, 0, 0, 124, -202, + 0, 125, -202, 0, 258, 125, 258, 0, 0, 17, + 53, 0, 124, 124, 124, 0, 0, 124, 0, 125, + 125, 125, 35, 36, 125, 38, 0, 121, 0, 6, + 42, 43, 44, 45, 122, 0, 0, 0, 113, 123, + -202, -202, 0, 0, 0, 123, 258, 0, 258, 258, + 0, 0, 259, 0, 259, 0, 0, 35, 36, 122, + 38, 122, 0, 0, 6, 42, 43, 44, 45, 258, + 258, 124, 0, 220, 0, 0, 0, 124, 125, 17, + 53, 221, 222, 0, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 259, 0, 353, 259, 0, 0, + 0, 122, 0, 122, 122, 315, 316, 0, 317, 318, + 0, 0, 0, 0, 17, 53, 0, 259, 259, 0, + 0, 0, 123, 0, 122, 122, 0, 35, 36, 0, + 38, 0, 0, 0, 6, 0, 0, -203, -203, 0, + -203, 0, 0, 149, -203, 0, 174, 123, 0, 123, + 0, 319, 320, -203, 124, 0, -203, 0, 0, 0, + 0, 125, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 0, 0, 0, 124, + 0, 124, 0, 0, 17, 53, 125, 0, 125, 123, + 0, 123, 123, 0, -203, -203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 0, 124, 124, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 125, 0, - 125, 125, 0, 0, 124, 124, 0, 0, 0, 0, - 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, + 131, 132, 123, 123, 135, 136, 137, 138, 139, 140, + 0, 124, 0, 124, 124, 0, 0, 0, 125, 0, + 125, 125, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 0, 202, 0, 124, 124, 0, 0, 0, 0, 203, 125, 125, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, - 44, 45, 0, 0, 157, 219, 113, 0, 0, 0, - 0, 0, 0, 0, 220, 221, 0, 0, 0, 0, - 0, -196, -196, 0, -196, 0, -197, -197, -196, -197, - 0, 0, 0, -197, 0, 0, 0, -196, 202, 0, - -196, 0, -197, 0, 0, -197, 203, 17, 53, 204, + 44, 45, 0, 0, 157, 219, 220, 0, 0, 0, + 0, 0, 0, 0, 221, 222, 0, 0, 0, 0, + 0, -204, -204, 0, -204, 0, -205, -205, -204, -205, + 0, 0, 0, -205, 0, 0, 0, -204, 202, 0, + -204, 0, -205, 0, 0, -205, 203, 17, 53, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, -196, -196, - 157, 299, 113, -197, -197, 0, 0, 0, 0, 0, - 220, 221, 275, 0, 0, 0, 0, 0, 0, 203, + 0, 0, 0, 6, 42, 43, 44, 45, -204, -204, + 157, 307, 220, -205, -205, 0, 0, 0, 0, 0, + 221, 222, 343, 0, 0, 0, 0, 0, 0, 203, 0, 0, 204, 205, 0, 206, 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, 35, - 36, 0, 38, 17, 53, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 220, 221, 334, 0, 0, 0, 0, - 0, 0, 203, 0, 0, 204, 205, 0, 206, 207, - 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 35, 36, 0, 38, 17, 53, 34, 6, - 42, 43, 44, 45, 0, 0, 157, 0, 113, 0, - 0, 0, 0, 0, 0, 0, 220, 221, 0, 0, - 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, - 43, 44, 45, 46, 0, 0, 0, 104, 105, 0, - 0, 48, 0, 0, -198, -198, 0, -198, 0, 17, - 53, -198, 35, 36, 0, 38, 0, 49, 50, 6, - -198, 34, 0, -198, 0, 0, 0, 0, 149, 0, - 0, 174, 0, 0, 51, 0, 0, 52, 17, 53, + 36, 0, 38, 17, 53, 34, 6, 42, 43, 44, + 45, 0, 0, 157, 0, 220, 0, 0, 0, 0, + 0, 0, 0, 221, 222, 0, 0, 0, 35, 36, + 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, + 46, 0, 0, 0, 104, 105, 0, 0, 48, 0, + 0, 35, 36, 0, 38, 0, 17, 53, 6, 0, + 0, 0, 0, 0, 49, 50, 0, 149, 34, 0, + 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 51, 0, 0, 52, 17, 53, 30, 54, 55, + 56, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 0, 0, 47, 17, 53, + 0, 48, 0, 294, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, 40, - 41, 6, 42, 43, 44, 45, 46, 0, 0, 0, - 47, -198, -198, 0, 48, 0, 292, 0, 0, 17, - 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 50, 0, 0, 34, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, + 41, 6, 42, 43, 44, 45, 46, 269, 0, 0, + 47, 0, 0, 130, 48, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 49, 50, 0, 0, 34, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, 46, - 267, 0, 0, 47, 0, 0, 130, 48, 0, 131, + 274, 0, 0, 104, 0, 0, 130, 48, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 49, 50, 0, 0, 34, 0, 0, + 0, 0, 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 51, 0, 0, 52, 17, 53, 30, 54, 55, 56, - 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, - 44, 45, 46, 0, 0, 0, 104, 0, 0, 0, - 48, 0, 0, 0, 0, 306, 307, 0, 308, 309, - 0, 0, 0, 0, 0, 0, 49, 50, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 35, 36, 0, - 38, 0, 0, 51, 6, 0, 52, 17, 53, 30, - 54, 55, 56, 149, 0, 0, 174, 0, 0, 0, - 0, 310, 311, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 312, 313, 314, 315, 316, - 317, 318, 319, 320, 321, 322, 0, 0, 0, 0, - 0, 0, 0, 203, 17, 53, 204, 205, 0, 206, - 207, 208, 209, 0, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 0, 0, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 167, 220, 221, 0, - 0, 168, 0, 0, 0, 0, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, + 203, 0, 0, 204, 205, 0, 206, 207, 208, 209, + 0, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 220, 0, 0, 0, + 0, 0, 0, 0, 221, 222, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, + 0, 0, 149, 0, 0, 174, 0, 0, 0, 0, + 319, 320, 0, 0, 0, 0, 0, 17, 53, 0, + 0, 0, 0, 0, 321, 322, 323, 324, 325, 326, + 327, 328, 329, 330, 331, 167, 0, 0, 0, 0, + 168, 0, 0, 17, 53, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 53, 141, 142, 143, 144, 145, 146, 147, 148, - 406, 0, 0, 0, 0, 407, 0, 0, 0, 0, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 408, 0, 0, 0, 0, 409, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 410, 0, - 0, 0, 0, 411, 0, 0, 0, 0, 130, 0, - 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 167, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 375, 0, 141, 142, - 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 377, 0, 141, 142, 143, 144, 145, 146, 147, 148, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 381, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, - 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 405, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 417, 0, 141, 142, - 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 419, 0, 141, 142, 143, 144, 145, 146, 147, 148, - 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 440, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 272, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 323, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 326, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 329, 0, - 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 330, 0, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 419, + 0, 0, 0, 0, 420, 0, 0, 0, 0, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 421, 0, 0, 0, 0, 422, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 271, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 336, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, + 142, 143, 144, 145, 146, 147, 148, 423, 0, 0, + 0, 0, 424, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 167, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 387, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 389, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 393, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 406, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 418, 0, 141, 142, 143, 144, 145, 146, 147, + 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 430, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 432, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 453, 0, 141, 142, 143, 144, 145, + 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 332, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 335, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 338, 0, 0, + 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 339, 0, 0, + 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 273, 0, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, + 142, 143, 144, 145, 146, 147, 148, 345, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 358, 130, 0, 0, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 131, 132, 0, 134, 135, 136, 137, 138, 139, 140, + 131, 132, 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 131, 132, 0, 134, 135, 136, 137, 138, 139, - 140, 131, 132, 0, 0, 135, 136, 137, 138, 139, - 140, 0, 0, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 0, 0, 141, 142, 143, 144, 145, 146, - 147, 148, 131, 132, 0, 0, 135, 136, 137, 138, - 139, 140, 131, 132, 0, 0, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, - 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, - 146, 147, 148, 131, 132, 0, 0, 135, 136, 137, - 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, - 145, 146, 147, 148 + 148, 0, 0, 0, 142, 143, 144, 145, 146, 147, + 148, 131, 132, 0, 0, 135, 136, 137, 138, 139, + 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, + 140, 0, 0, 0, 0, 142, 0, 144, 145, 146, + 147, 148, 0, 0, 0, 0, 0, 144, 145, 146, + 147, 148 }; const short parser::yycheck_[] = { - 0, 94, 74, 21, 283, 47, 283, 283, 46, 9, - 46, 52, 3, 4, 29, 46, 57, 74, 46, 0, - 52, 51, 51, 98, 55, 57, 26, 55, 65, 66, - 202, 93, 94, 95, 206, 35, 36, 11, 12, 13, - 14, 15, 57, 51, 35, 36, 52, 77, 48, 121, - 61, 51, 96, 97, 91, 92, 93, 94, 95, 97, - 51, 97, 104, 61, 121, 96, 97, 55, 96, 97, - 52, 92, 46, 97, 74, 57, 51, 98, 39, 40, - 101, 42, 59, 74, 53, 46, 47, 48, 49, 50, - 39, 40, 59, 42, 55, 95, 61, 46, 47, 48, - 49, 50, 51, 55, 52, 277, 55, 52, 51, 57, - 39, 40, 57, 42, 52, 52, 55, 46, 59, 57, - 57, 121, 51, 97, 51, 59, 55, 52, 157, 58, - 121, 55, 57, 52, 57, 96, 97, 55, 57, 418, - 52, 418, 418, 56, 52, 57, 97, 96, 97, 57, - 59, 100, 101, 52, 52, 155, 51, 157, 57, 57, - 51, 61, 162, 51, 51, 165, 157, 96, 97, 154, - 51, 51, 51, 202, 60, 175, 161, 206, 61, 164, - 51, 51, 157, 61, 61, 257, 91, 92, 93, 94, - 95, 220, 221, 211, 61, 224, 61, 61, 61, 61, - 257, 51, 202, 375, 51, 377, 206, 56, 26, 101, - 51, 202, 60, 51, 60, 206, 27, 51, 51, 56, - 220, 221, 51, 24, 224, 297, 298, 202, 56, 220, - 221, 206, 56, 224, 51, 46, 61, 51, 49, 50, - 297, 298, 51, 51, 416, 220, 221, 419, 277, 224, - 29, 61, 65, 66, 283, 61, 61, 257, 71, 72, - 73, 74, 51, 61, 61, 61, 257, 439, 440, 61, - 61, 52, 344, 61, 52, 52, 52, 277, 91, 92, - 93, 94, 95, 283, 284, 9, 277, 344, 381, 274, - 61, 61, 283, 104, 9, 9, 224, 297, 298, 418, - 51, 112, 277, -1, 211, -1, 297, 298, 283, -1, - 295, 296, -1, -1, -1, -1, -1, -1, -1, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, -1, - 325, -1, -1, 328, 344, 51, 375, -1, 377, 160, - -1, -1, 163, 344, -1, 166, -1, 168, -1, 170, - -1, 51, 173, 39, 40, 407, 42, 409, 157, 411, - 46, -1, -1, -1, -1, 375, -1, 377, 51, 55, - 380, -1, 58, -1, 375, -1, 377, 416, 373, 418, - 419, -1, 203, -1, -1, -1, -1, -1, -1, -1, - 375, -1, 377, 388, 215, 390, -1, 392, -1, -1, - 439, 440, -1, 202, -1, -1, 416, 206, 418, 419, - 96, 97, -1, -1, -1, 416, -1, 418, 419, 51, - -1, 220, 221, -1, -1, 224, -1, -1, -1, 439, - 440, 416, -1, 418, 419, -1, 51, -1, 439, 440, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - 271, -1, -1, 51, 439, 440, -1, 157, -1, 280, - -1, 282, -1, -1, 285, -1, -1, -1, -1, 39, - 40, -1, 42, -1, 157, -1, 46, -1, 277, -1, - -1, -1, -1, -1, 283, 55, 202, -1, 58, -1, - 206, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 202, -1, 220, 221, 206, -1, 224, 330, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 220, 221, -1, 206, 224, 157, 96, 97, -1, -1, - -1, 352, 353, 354, 355, -1, -1, 220, 221, -1, - -1, 224, 157, -1, 39, 40, -1, 42, -1, -1, - -1, 46, -1, -1, -1, 376, -1, 378, 379, 157, - 55, 277, -1, 58, -1, -1, -1, 283, -1, -1, - 202, -1, -1, -1, 206, -1, 375, 277, 377, 39, - 40, -1, 42, 283, -1, -1, 46, 202, 220, 221, - -1, 206, 224, -1, 277, 55, -1, -1, 58, 420, - 283, 96, 97, -1, 202, 220, 221, -1, 206, 224, - -1, -1, -1, -1, -1, -1, -1, 416, -1, 418, - 419, -1, 220, 221, -1, -1, 224, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 96, 97, -1, -1, - 439, 440, -1, -1, -1, 277, -1, 39, 40, -1, - 42, 283, -1, -1, 46, 47, 48, 49, 50, 375, - -1, 377, 277, 55, -1, -1, -1, -1, 283, -1, - -1, 63, 64, -1, -1, 375, -1, 377, -1, 277, - 39, 40, -1, 42, -1, 283, -1, 46, -1, -1, - 39, 40, 375, 42, 377, -1, 55, 46, -1, 58, - 416, -1, 418, 419, 96, 97, 55, -1, -1, 58, - -1, -1, -1, -1, -1, -1, 416, -1, 418, 419, - -1, -1, -1, 439, 440, 39, 40, -1, 42, -1, - -1, -1, 46, 416, -1, 418, 419, 96, 97, 439, - 440, 55, -1, 375, 58, 377, -1, 96, 97, 63, - 64, -1, -1, -1, -1, -1, 439, 440, -1, -1, - 375, -1, 377, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, -1, -1, -1, 375, -1, 377, - -1, -1, 96, 97, 416, -1, 418, 419, -1, -1, + 0, 47, 94, 46, 21, 285, 285, 285, 74, 9, + 51, 46, 74, 3, 4, 11, 12, 13, 14, 15, + 46, 29, 46, 52, 96, 97, 26, 154, 57, 55, + 51, 55, 0, 61, 161, 35, 36, 164, 65, 66, + 91, 92, 93, 94, 95, 35, 36, 51, 48, 57, + 46, 51, 56, 57, 97, 121, 77, 52, 104, 121, + 61, 51, 97, 55, 91, 92, 93, 94, 95, 53, + 96, 97, 96, 97, 74, 52, 98, 92, 39, 40, + 57, 42, 52, 98, 74, 46, 101, 57, 52, 12, + 51, 56, 57, 57, 55, 95, 19, 58, 97, 22, + 23, 97, 25, 26, 27, 28, 59, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 59, 42, + 55, 121, 61, 46, 47, 48, 49, 50, 52, 51, + 53, 121, 55, 57, 52, 96, 97, 52, 59, 57, + 63, 64, 57, 51, 93, 94, 95, 39, 40, 276, + 42, 431, 431, 431, 46, 155, 52, 157, 55, 52, + 51, 57, 162, 55, 57, 165, 58, 157, 56, 57, + 297, 298, 52, 96, 97, 175, 52, 57, 52, 56, + 57, 57, 57, 57, 39, 40, 59, 42, 55, 55, + 52, 46, 56, 259, 211, 57, 59, 259, 51, 97, + 55, 51, 202, 58, 96, 97, 206, 334, 51, 61, + 337, 51, 202, 51, 51, 27, 206, 51, 60, 77, + 220, 221, 222, 51, 51, 225, 61, 51, 61, 61, + 220, 221, 222, 51, 46, 225, 61, 49, 50, 305, + 306, 96, 97, 305, 306, 61, 61, 61, 61, 157, + 26, 56, 101, 60, 51, 51, 60, 51, 385, 259, + 51, 51, 61, 56, 51, 51, 51, 56, 56, 259, + 51, 51, 51, 24, 401, 29, 403, 61, 405, 279, + 52, 9, 52, 61, 61, 285, 286, 353, 61, 279, + 61, 353, 104, 61, 202, 285, 61, 61, 206, 52, + 112, 393, 52, 61, 61, 305, 306, 9, 9, 61, + 431, 225, 220, 221, 222, 305, 306, 225, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 65, 66, + 51, 211, 69, 70, 71, 72, 73, 74, 160, 362, + -1, 163, -1, 353, 166, -1, 168, -1, 170, -1, + 157, 173, 362, 353, 91, 92, 93, 94, 95, -1, + 157, 279, 362, -1, 420, -1, 422, 285, 424, -1, + -1, -1, -1, -1, -1, -1, -1, 387, 51, 389, + -1, 203, 392, -1, -1, -1, 202, 387, -1, 389, + 206, -1, -1, 215, -1, 202, -1, -1, -1, 206, + -1, 39, 40, -1, 42, 202, -1, -1, 46, 206, + -1, -1, -1, 220, 221, 222, -1, 55, 225, 429, + 58, 431, 432, 220, 221, 222, 51, -1, 225, 429, + -1, 431, 432, 51, -1, -1, -1, -1, 39, 40, + -1, 42, 452, 453, 362, 46, 47, 48, 49, 50, + -1, 273, 452, 453, 55, -1, -1, -1, 96, 97, + 282, -1, 284, 279, -1, 287, -1, 39, 40, 387, + 42, 389, 279, -1, 46, -1, -1, 299, 285, -1, + -1, -1, 279, 55, 157, -1, 58, -1, 285, -1, + -1, -1, 314, -1, -1, 96, 97, -1, -1, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + -1, 429, -1, 431, 432, -1, -1, 339, -1, -1, + -1, 51, -1, -1, 96, 97, -1, -1, -1, 202, + -1, -1, 157, 206, 452, 453, -1, -1, -1, 157, + -1, -1, 364, 365, 366, 367, -1, 220, 221, 222, + -1, -1, 225, 51, -1, 362, -1, -1, -1, -1, + 51, -1, -1, -1, -1, 362, 388, -1, 390, 391, + -1, 387, -1, 389, -1, -1, -1, 202, -1, -1, + 387, 206, 389, -1, 202, -1, -1, -1, 206, -1, + 387, -1, 389, -1, -1, 220, 221, 222, -1, -1, + 225, -1, 220, 221, 222, -1, 279, 225, -1, -1, + -1, 433, 285, 429, -1, -1, 432, -1, -1, -1, + -1, -1, 429, -1, 431, 432, -1, 157, -1, -1, + -1, -1, 429, -1, 431, 432, 452, 453, -1, -1, + -1, 39, 40, -1, 42, 452, 453, -1, 46, 47, + 48, 49, 50, 51, 279, 452, 453, 55, -1, 157, + 285, 279, 39, 40, -1, 42, 157, 285, -1, 46, + -1, -1, 202, -1, -1, -1, 206, -1, 55, -1, + -1, 58, -1, -1, -1, -1, -1, -1, -1, 362, + 220, 221, 222, 39, 40, 225, 42, -1, 96, 97, + 46, -1, 100, 101, 202, -1, -1, -1, 206, 55, + -1, 202, 58, -1, 387, 206, 389, -1, -1, 96, + 97, -1, 220, 221, 222, -1, -1, 225, -1, 220, + 221, 222, 39, 40, 225, 42, -1, 362, -1, 46, + 47, 48, 49, 50, 362, -1, -1, -1, 55, 279, + 96, 97, -1, -1, -1, 285, 429, -1, 431, 432, + -1, -1, 387, -1, 389, -1, -1, 39, 40, 387, + 42, 389, -1, -1, 46, 47, 48, 49, 50, 452, + 453, 279, -1, 55, -1, -1, -1, 285, 279, 96, + 97, 63, 64, -1, 285, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 429, -1, 431, 432, -1, -1, + -1, 429, -1, 431, 432, 17, 18, -1, 20, 21, + -1, -1, -1, -1, 96, 97, -1, 452, 453, -1, + -1, -1, 362, -1, 452, 453, -1, 39, 40, -1, + 42, -1, -1, -1, 46, -1, -1, 39, 40, -1, + 42, -1, -1, 55, 46, -1, 58, 387, -1, 389, + -1, 63, 64, 55, 362, -1, 58, -1, -1, -1, + -1, 362, -1, -1, -1, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, -1, -1, -1, 387, + -1, 389, -1, -1, 96, 97, 387, -1, 389, 429, + -1, 431, 432, -1, 96, 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 416, -1, 418, 419, -1, -1, 439, 440, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 416, -1, - 418, 419, -1, -1, 439, 440, -1, -1, -1, -1, - -1, -1, 11, -1, -1, -1, -1, -1, -1, -1, - 19, 439, 440, 22, 23, -1, 25, 26, 27, 28, + 65, 66, 452, 453, 69, 70, 71, 72, 73, 74, + -1, 429, -1, 431, 432, -1, -1, -1, 429, -1, + 431, 432, -1, 88, 89, 90, 91, 92, 93, 94, + 95, -1, 11, -1, 452, 453, -1, -1, -1, -1, + 19, 452, 453, 22, 23, -1, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, 46, 47, 48, 49, 50, -1, -1, 53, 54, 55, -1, -1, -1, @@ -4272,193 +4360,183 @@ namespace xsk { namespace gsc { namespace iw7 { 63, 64, 12, -1, -1, -1, -1, -1, -1, 19, -1, -1, 22, 23, -1, 25, 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, -1, 42, 96, 97, -1, 46, 47, 48, 49, + 40, -1, 42, 96, 97, 16, 46, 47, 48, 49, 50, -1, -1, 53, -1, 55, -1, -1, -1, -1, - -1, -1, -1, 63, 64, 12, -1, -1, -1, -1, - -1, -1, 19, -1, -1, 22, 23, -1, 25, 26, - 27, 28, -1, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, -1, 42, 96, 97, 16, 46, - 47, 48, 49, 50, -1, -1, 53, -1, 55, -1, - -1, -1, -1, -1, -1, -1, 63, 64, -1, -1, - -1, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, -1, -1, -1, 55, 56, -1, - -1, 59, -1, -1, 39, 40, -1, 42, -1, 96, - 97, 46, 39, 40, -1, 42, -1, 75, 76, 46, - 55, 16, -1, 58, -1, -1, -1, -1, 55, -1, - -1, 58, -1, -1, 92, -1, -1, 95, 96, 97, + -1, -1, -1, 63, 64, -1, -1, -1, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, -1, -1, -1, 55, 56, -1, -1, 59, -1, + -1, 39, 40, -1, 42, -1, 96, 97, 46, -1, + -1, -1, -1, -1, 75, 76, -1, 55, 16, -1, + 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 92, -1, -1, 95, 96, 97, 98, 99, 100, + 101, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, -1, -1, -1, 55, 96, 97, + -1, 59, -1, 61, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 75, 76, -1, + -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, - 55, 96, 97, -1, 59, -1, 61, -1, -1, 96, - 97, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 75, 76, -1, -1, 16, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 92, -1, -1, + 45, 46, 47, 48, 49, 50, 51, 56, -1, -1, + 55, -1, -1, 62, 59, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + 75, 76, -1, -1, 16, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 56, -1, -1, 55, -1, -1, 62, 59, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, 75, 76, -1, -1, 16, -1, -1, + -1, -1, -1, 75, 76, -1, -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, 92, -1, -1, 95, 96, 97, 98, 99, 100, 101, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, -1, -1, -1, 55, -1, -1, -1, - 59, -1, -1, -1, -1, 17, 18, -1, 20, 21, - -1, -1, -1, -1, -1, -1, 75, 76, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, 40, -1, - 42, -1, -1, 92, 46, -1, 95, 96, 97, 98, - 99, 100, 101, 55, -1, -1, 58, -1, -1, -1, - -1, 63, 64, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, - -1, -1, -1, 19, 96, 97, 22, 23, -1, 25, - 26, 27, 28, -1, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, - 46, 47, 48, 49, 50, -1, -1, 53, -1, 55, - -1, -1, -1, -1, -1, -1, 52, 63, 64, -1, - -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, + 19, -1, -1, 22, 23, -1, 25, 26, 27, 28, + -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, -1, 42, -1, -1, -1, 46, 47, 48, + 49, 50, -1, -1, 53, -1, 55, -1, -1, -1, + -1, -1, -1, -1, 63, 64, 39, 40, -1, 42, + -1, -1, -1, 46, -1, -1, -1, -1, -1, -1, + -1, -1, 55, -1, -1, 58, -1, -1, -1, -1, + 63, 64, -1, -1, -1, -1, -1, 96, 97, -1, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 52, -1, -1, -1, -1, + 57, -1, -1, 96, 97, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 96, 97, 88, 89, 90, 91, 92, 93, 94, 95, - 52, -1, -1, -1, -1, 57, -1, -1, -1, -1, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 52, -1, -1, -1, -1, 57, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 52, -1, - -1, -1, -1, 57, -1, -1, -1, -1, 62, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 52, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 62, -1, -1, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, -1, 88, 89, - 90, 91, 92, 93, 94, 95, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 52, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 62, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 52, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 62, -1, -1, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, -1, 88, 89, - 90, 91, 92, 93, 94, 95, 62, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 52, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 56, -1, - -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 57, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 52, + -1, -1, -1, -1, 57, -1, -1, -1, -1, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 52, -1, -1, -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 60, -1, 62, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, - 93, 94, 95, 61, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, 91, 92, 93, 94, 95, 61, 62, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 88, 89, 90, 91, 92, - 93, 94, 95, 61, 62, -1, -1, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 62, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 52, -1, -1, + -1, -1, 57, -1, -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 88, 89, 90, 91, 92, 93, 94, 95, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 62, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 52, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 62, -1, -1, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 52, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 62, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 52, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 62, -1, -1, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 62, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 52, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 56, -1, -1, + -1, -1, -1, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 57, -1, -1, + -1, -1, 62, -1, -1, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 88, 89, + 90, 91, 92, 93, 94, 95, 60, -1, 62, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, + 94, 95, 61, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, + 89, 90, 91, 92, 93, 94, 95, 61, 62, -1, + -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 88, 89, 90, 91, 92, 93, + 94, 95, 61, 62, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 62, -1, -1, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 88, + 89, 90, 91, 92, 93, 94, 95, -1, -1, -1, + -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, + 65, 66, -1, 68, 69, 70, 71, 72, 73, 74, + 65, 66, -1, -1, 69, 70, 71, 72, 73, 74, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 65, 66, -1, 68, 69, 70, 71, 72, 73, - 74, 65, 66, -1, -1, 69, 70, 71, 72, 73, - 74, -1, -1, -1, 88, 89, 90, 91, 92, 93, - 94, 95, -1, -1, 88, 89, 90, 91, 92, 93, - 94, 95, 65, 66, -1, -1, 69, 70, 71, 72, - 73, 74, 65, 66, -1, -1, 69, 70, 71, 72, - 73, 74, -1, -1, -1, -1, 89, 90, 91, 92, - 93, 94, 95, -1, -1, -1, 89, -1, 91, 92, - 93, 94, 95, 65, 66, -1, -1, 69, 70, 71, - 72, 73, 74, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95 + 95, -1, -1, -1, 89, 90, 91, 92, 93, 94, + 95, 65, 66, -1, -1, 69, 70, 71, 72, 73, + 74, 65, 66, -1, -1, -1, -1, 71, 72, 73, + 74, -1, -1, -1, -1, 89, -1, 91, 92, 93, + 94, 95, -1, -1, -1, -1, -1, 91, 92, 93, + 94, 95 }; const unsigned char parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 46, 97, 113, 114, - 115, 116, 117, 118, 119, 120, 186, 96, 97, 187, - 187, 51, 0, 115, 116, 117, 51, 77, 61, 61, - 98, 189, 167, 186, 16, 39, 40, 41, 42, 43, + 115, 116, 117, 118, 119, 120, 189, 96, 97, 190, + 190, 51, 0, 115, 116, 117, 51, 77, 61, 61, + 98, 192, 167, 189, 16, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 51, 55, 59, 75, 76, 92, 95, 97, 99, 100, 101, 151, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 52, 52, 57, 55, 186, 187, 55, - 186, 187, 55, 151, 55, 56, 151, 168, 169, 186, - 151, 151, 51, 55, 100, 101, 162, 163, 171, 172, - 174, 175, 179, 180, 181, 182, 186, 187, 97, 61, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 52, 52, 57, 55, 189, 190, 55, + 189, 190, 55, 151, 55, 56, 151, 168, 169, 189, + 151, 151, 51, 55, 100, 101, 162, 163, 174, 175, + 177, 178, 182, 183, 184, 185, 189, 190, 97, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 88, 89, 90, 91, 92, 93, 94, 95, 55, - 58, 164, 165, 186, 51, 59, 61, 53, 126, 186, + 58, 164, 165, 189, 51, 59, 61, 53, 126, 189, 55, 51, 59, 55, 51, 59, 55, 52, 57, 151, 57, 56, 151, 55, 58, 59, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 46, 97, 185, 168, - 169, 186, 11, 19, 22, 23, 25, 26, 27, 28, + 151, 151, 151, 151, 151, 151, 46, 97, 188, 168, + 169, 189, 11, 19, 22, 23, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 54, - 63, 64, 121, 122, 124, 125, 126, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 153, 154, 155, 162, 163, 171, 172, 175, 186, 151, - 168, 186, 151, 168, 186, 151, 151, 56, 151, 151, - 186, 60, 56, 52, 51, 12, 121, 123, 151, 61, - 51, 121, 51, 51, 51, 51, 92, 189, 192, 60, - 61, 61, 61, 151, 61, 51, 51, 175, 175, 54, - 122, 61, 61, 61, 61, 61, 17, 18, 20, 21, - 63, 64, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 56, 52, 51, 56, 52, 51, 56, - 57, 56, 151, 168, 12, 121, 61, 151, 26, 151, - 127, 153, 154, 155, 175, 186, 151, 60, 60, 61, - 168, 168, 51, 51, 51, 51, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 56, 168, 56, - 168, 56, 151, 51, 52, 52, 51, 52, 61, 29, - 57, 52, 52, 52, 151, 151, 151, 151, 51, 52, - 51, 52, 51, 52, 168, 121, 151, 121, 151, 152, - 151, 186, 126, 61, 61, 52, 52, 57, 52, 57, - 52, 57, 168, 168, 168, 52, 24, 52, 61, 52, - 29, 61, 61, 169, 61, 169, 61, 169, 52, 52, - 52, 121, 61, 127, 121, 151, 52, 52, 52, 52, - 52, 61, 61, 61, 121, 121 + 55, 63, 64, 121, 122, 124, 125, 126, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 153, 154, 155, 162, 163, 171, 174, 175, 178, + 189, 151, 168, 189, 151, 168, 189, 151, 151, 56, + 151, 151, 189, 60, 56, 52, 51, 12, 121, 123, + 151, 61, 51, 121, 51, 51, 51, 51, 92, 192, + 195, 60, 61, 61, 61, 151, 61, 51, 51, 55, + 172, 173, 174, 175, 189, 178, 178, 54, 122, 61, + 61, 61, 61, 61, 77, 17, 18, 20, 21, 63, + 64, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 56, 52, 51, 56, 52, 51, 56, 57, + 56, 151, 168, 12, 121, 61, 151, 26, 151, 127, + 153, 154, 155, 178, 189, 151, 60, 60, 61, 168, + 168, 56, 57, 151, 51, 51, 51, 51, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 56, + 168, 56, 168, 56, 151, 51, 52, 52, 51, 52, + 61, 29, 57, 52, 52, 52, 173, 151, 151, 151, + 151, 51, 52, 51, 52, 51, 52, 168, 121, 151, + 121, 151, 152, 151, 189, 126, 61, 61, 52, 52, + 57, 52, 57, 52, 57, 168, 168, 168, 52, 24, + 52, 61, 52, 29, 61, 61, 169, 61, 169, 61, + 169, 52, 52, 52, 121, 61, 127, 121, 151, 52, + 52, 52, 52, 52, 61, 61, 61, 121, 121 }; const unsigned char @@ -4474,19 +4552,19 @@ namespace xsk { namespace gsc { namespace iw7 { 134, 135, 136, 137, 138, 139, 140, 141, 141, 142, 143, 143, 144, 145, 146, 147, 147, 148, 149, 150, 151, 151, 151, 152, 152, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 154, 154, 155, 155, - 156, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, + 153, 153, 153, 153, 153, 153, 153, 154, 154, 155, + 155, 156, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 159, 160, 160, - 160, 160, 161, 162, 162, 163, 163, 164, 164, 164, - 164, 164, 164, 165, 165, 165, 165, 166, 167, 167, - 167, 168, 168, 169, 169, 170, 170, 171, 172, 173, - 174, 175, 175, 175, 175, 175, 175, 175, 175, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 186, 187, 187, 188, 189, 190, 191, 191, 192, - 192, 193, 194 + 158, 158, 158, 158, 158, 158, 158, 158, 159, 160, + 160, 160, 160, 161, 162, 162, 163, 163, 164, 164, + 164, 164, 164, 164, 165, 165, 165, 165, 166, 167, + 167, 167, 168, 168, 169, 169, 170, 170, 171, 172, + 172, 173, 173, 173, 174, 175, 176, 177, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 189, 190, + 190, 191, 192, 193, 194, 194, 195, 195, 196, 197 }; const signed char @@ -4502,19 +4580,19 @@ namespace xsk { namespace gsc { namespace iw7 { 6, 2, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, - 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, + 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 1, 1, 2, 2, 4, 6, 5, - 7, 5, 7, 8, 9, 9, 9, 3, 3, 1, - 0, 1, 0, 3, 1, 2, 3, 4, 3, 3, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, - 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 1, 1, 2, 2, 4, 6, + 5, 7, 5, 7, 8, 9, 9, 9, 3, 3, + 1, 0, 1, 0, 3, 1, 2, 3, 3, 3, + 1, 1, 1, 1, 4, 3, 3, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4524,29 +4602,29 @@ namespace xsk { namespace gsc { namespace iw7 { const short parser::yyrline_[] = { - 0, 258, 258, 259, 263, 265, 267, 269, 271, 273, - 278, 282, 287, 288, 289, 290, 291, 295, 300, 305, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 337, 338, 342, 344, 349, 351, - 356, 357, 361, 362, 366, 368, 370, 373, 377, 379, - 384, 386, 388, 393, 398, 400, 405, 410, 412, 417, - 419, 424, 429, 434, 439, 444, 449, 454, 456, 461, - 466, 468, 473, 478, 483, 488, 490, 495, 500, 505, - 510, 511, 512, 516, 517, 521, 523, 525, 527, 529, - 531, 533, 535, 537, 539, 541, 546, 548, 553, 555, - 560, 565, 567, 569, 571, 573, 575, 577, 579, 581, - 583, 585, 587, 589, 591, 593, 595, 597, 599, 604, - 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, - 625, 626, 627, 628, 629, 630, 631, 635, 640, 642, - 644, 646, 651, 656, 657, 660, 661, 665, 667, 669, - 671, 673, 675, 680, 682, 684, 686, 691, 696, 698, - 701, 705, 708, 712, 714, 719, 721, 726, 731, 736, - 741, 746, 747, 748, 749, 750, 751, 752, 753, 754, - 758, 763, 768, 773, 778, 783, 788, 793, 798, 803, - 808, 810, 815, 817, 822, 827, 832, 837, 839, 844, - 846, 851, 856 + 0, 261, 261, 262, 266, 268, 270, 272, 274, 276, + 281, 285, 290, 291, 292, 293, 294, 298, 303, 308, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, + 333, 334, 335, 336, 340, 341, 345, 347, 352, 354, + 359, 360, 364, 365, 369, 371, 373, 376, 380, 382, + 387, 389, 391, 396, 401, 403, 408, 413, 415, 420, + 422, 427, 432, 437, 442, 447, 452, 457, 459, 464, + 469, 471, 476, 481, 486, 491, 493, 498, 503, 508, + 513, 514, 515, 519, 520, 524, 526, 528, 530, 532, + 534, 536, 538, 540, 542, 544, 546, 551, 553, 558, + 560, 565, 570, 572, 574, 576, 578, 580, 582, 584, + 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, + 629, 630, 631, 632, 633, 634, 635, 636, 640, 645, + 647, 649, 651, 656, 661, 662, 665, 666, 670, 672, + 674, 676, 678, 680, 685, 687, 689, 691, 696, 701, + 703, 706, 710, 713, 717, 719, 724, 726, 731, 736, + 738, 743, 744, 745, 749, 754, 759, 764, 769, 770, + 771, 772, 773, 774, 775, 776, 777, 781, 786, 791, + 796, 801, 806, 811, 816, 821, 826, 831, 833, 838, + 840, 845, 850, 855, 860, 862, 867, 869, 874, 879 }; void @@ -4579,9 +4657,9 @@ namespace xsk { namespace gsc { namespace iw7 { #line 13 "parser.ypp" } } } // xsk::gsc::iw7 -#line 4583 "parser.cpp" +#line 4661 "parser.cpp" -#line 860 "parser.ypp" +#line 883 "parser.ypp" void xsk::gsc::iw7::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/iw7/xsk/parser.hpp b/src/iw7/xsk/parser.hpp index b3ef9935..4b2e5bbc 100644 --- a/src/iw7/xsk/parser.hpp +++ b/src/iw7/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace iw7 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,101 +540,104 @@ namespace xsk { namespace gsc { namespace iw7 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waittill - char dummy63[sizeof (ast::stmt_waittill::ptr)]; + char dummy64[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy64[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy65[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy66[sizeof (ast::stmt_while::ptr)]; + char dummy67[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -640,7 +645,7 @@ namespace xsk { namespace gsc { namespace iw7 { // "localized string" // "float" // "integer" - char dummy67[sizeof (std::string)]; + char dummy68[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -991,30 +996,33 @@ namespace xsk { namespace gsc { namespace iw7 { S_expr_arguments = 168, // expr_arguments S_expr_arguments_no_empty = 169, // expr_arguments_no_empty S_expr_reference = 170, // expr_reference - S_expr_array = 171, // expr_array - S_expr_field = 172, // expr_field - S_expr_size = 173, // expr_size - S_expr_paren = 174, // expr_paren - S_expr_object = 175, // expr_object - S_expr_thisthread = 176, // expr_thisthread - S_expr_empty_array = 177, // expr_empty_array - S_expr_undefined = 178, // expr_undefined - S_expr_game = 179, // expr_game - S_expr_self = 180, // expr_self - S_expr_anim = 181, // expr_anim - S_expr_level = 182, // expr_level - S_expr_animation = 183, // expr_animation - S_expr_animtree = 184, // expr_animtree - S_expr_identifier_nosize = 185, // expr_identifier_nosize - S_expr_identifier = 186, // expr_identifier - S_expr_path = 187, // expr_path - S_expr_istring = 188, // expr_istring - S_expr_string = 189, // expr_string - S_expr_vector = 190, // expr_vector - S_expr_float = 191, // expr_float - S_expr_integer = 192, // expr_integer - S_expr_false = 193, // expr_false - S_expr_true = 194 // expr_true + S_expr_tuple = 171, // expr_tuple + S_expr_tuple_arguments = 172, // expr_tuple_arguments + S_expr_tuple_types = 173, // expr_tuple_types + S_expr_array = 174, // expr_array + S_expr_field = 175, // expr_field + S_expr_size = 176, // expr_size + S_expr_paren = 177, // expr_paren + S_expr_object = 178, // expr_object + S_expr_thisthread = 179, // expr_thisthread + S_expr_empty_array = 180, // expr_empty_array + S_expr_undefined = 181, // expr_undefined + S_expr_game = 182, // expr_game + S_expr_self = 183, // expr_self + S_expr_anim = 184, // expr_anim + S_expr_level = 185, // expr_level + S_expr_animation = 186, // expr_animation + S_expr_animtree = 187, // expr_animtree + S_expr_identifier_nosize = 188, // expr_identifier_nosize + S_expr_identifier = 189, // expr_identifier + S_expr_path = 190, // expr_path + S_expr_istring = 191, // expr_istring + S_expr_string = 192, // expr_string + S_expr_vector = 193, // expr_vector + S_expr_float = 194, // expr_float + S_expr_integer = 195, // expr_integer + S_expr_false = 196, // expr_false + S_expr_true = 197 // expr_true }; }; @@ -1080,6 +1088,8 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1202,6 +1212,10 @@ namespace xsk { namespace gsc { namespace iw7 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1851,6 +1865,20 @@ namespace xsk { namespace gsc { namespace iw7 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2352,6 +2380,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2474,6 +2504,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4796,8 +4830,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2363, ///< Last index in yytable_. - yynnts_ = 83, ///< Number of nonterminal symbols. + yylast_ = 2371, ///< Last index in yytable_. + yynnts_ = 86, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4853,6 +4887,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -4975,6 +5011,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5171,6 +5211,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5293,6 +5335,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5496,7 +5542,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw7 -#line 5500 "parser.hpp" +#line 5546 "parser.hpp" diff --git a/src/iw7/xsk/resolver.cpp b/src/iw7/xsk/resolver.cpp index e7579f9c..bbfdbbd1 100644 --- a/src/iw7/xsk/resolver.cpp +++ b/src/iw7/xsk/resolver.cpp @@ -47,7 +47,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -59,7 +59,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -76,7 +76,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -105,7 +105,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/iw8/xsk/assembler.cpp b/src/iw8/xsk/assembler.cpp index 6d1d2a0e..8f39fbfd 100644 --- a/src/iw8/xsk/assembler.cpp +++ b/src/iw8/xsk/assembler.cpp @@ -439,7 +439,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_far_call(inst, true); break;*/ default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -546,6 +546,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -623,7 +627,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -636,7 +640,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::iw8 diff --git a/src/iw8/xsk/compiler.cpp b/src/iw8/xsk/compiler.cpp index faee51fc..089941f9 100644 --- a/src/iw8/xsk/compiler.cpp +++ b/src/iw8/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -395,7 +400,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1044,11 +1049,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1580,7 +1592,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); data.push_back(variable_create_index(entry, blk)); } @@ -1644,6 +1656,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1683,7 +1718,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1769,7 +1804,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2298,7 +2333,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2365,11 +2400,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2392,11 +2427,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2424,7 +2459,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2433,7 +2468,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2441,8 +2476,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2474,13 +2509,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2640,23 +2675,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2683,7 +2735,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2697,7 +2749,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2710,7 +2761,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2888,8 +2939,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2904,7 +2954,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2937,7 +2987,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/iw8/xsk/compiler.hpp b/src/iw8/xsk/compiler.hpp index 4c594485..0005043d 100644 --- a/src/iw8/xsk/compiler.hpp +++ b/src/iw8/xsk/compiler.hpp @@ -98,6 +98,7 @@ private: void emit_expr_istrue(const ast::expr_istrue::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -139,10 +140,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/iw8/xsk/decompiler.cpp b/src/iw8/xsk/decompiler.cpp index 65a10b50..8a254f37 100644 --- a/src/iw8/xsk/decompiler.cpp +++ b/src/iw8/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,45 +1228,45 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waitframe: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1278,69 +1275,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1349,98 +1345,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1448,256 +1446,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_FormalParams: { auto count = std::stoi(inst->data[0]); @@ -1706,29 +1691,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[i])); } - } break; + } case opcode::OP_IsDefined: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_IsTrue: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNotAfterAnd: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1748,7 +1733,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1775,7 +1760,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1802,7 +1787,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1810,9 +1794,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1823,60 +1808,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -2006,7 +1969,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2040,7 +2003,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2057,7 +2020,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2186,7 +2149,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2246,7 +2209,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2278,7 +2241,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2409,17 +2372,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2452,7 +2415,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2463,17 +2426,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2517,7 +2480,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2669,7 +2632,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2773,8 +2736,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -3018,7 +2981,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3047,7 +3010,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3087,7 +3050,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3215,9 +3178,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3466,11 +3426,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3488,7 +3443,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3506,7 +3461,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/iw8/xsk/decompiler.hpp b/src/iw8/xsk/decompiler.hpp index fa1b5903..8b2a6e2e 100644 --- a/src/iw8/xsk/decompiler.hpp +++ b/src/iw8/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/iw8/xsk/disassembler.cpp b/src/iw8/xsk/disassembler.cpp index 0c4dd1f2..24ea3a50 100644 --- a/src/iw8/xsk/disassembler.cpp +++ b/src/iw8/xsk/disassembler.cpp @@ -352,7 +352,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_far_call(inst, true); break;*/ default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -559,7 +559,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -582,7 +582,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/iw8/xsk/iw8.cpp b/src/iw8/xsk/iw8.cpp index c33cee72..f19d8630 100644 --- a/src/iw8/xsk/iw8.cpp +++ b/src/iw8/xsk/iw8.cpp @@ -212,7 +212,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/iw8/xsk/lexer.cpp b/src/iw8/xsk/lexer.cpp index 62c68da4..6814c600 100644 --- a/src/iw8/xsk/lexer.cpp +++ b/src/iw8/xsk/lexer.cpp @@ -696,7 +696,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -730,7 +730,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -764,7 +764,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/iw8/xsk/parser.cpp b/src/iw8/xsk/parser.cpp index 4793965d..8e998797 100644 --- a/src/iw8/xsk/parser.cpp +++ b/src/iw8/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -374,6 +376,10 @@ namespace xsk { namespace gsc { namespace iw8 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -558,6 +564,8 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -688,6 +696,10 @@ namespace xsk { namespace gsc { namespace iw8 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -872,6 +884,8 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -1002,6 +1016,10 @@ namespace xsk { namespace gsc { namespace iw8 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1185,6 +1203,8 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1315,6 +1335,10 @@ namespace xsk { namespace gsc { namespace iw8 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1753,6 +1777,8 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1883,6 +1909,10 @@ namespace xsk { namespace gsc { namespace iw8 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -2044,1375 +2074,1417 @@ namespace xsk { namespace gsc { namespace iw8 { switch (yyn) { case 2: // root: program -#line 264 "parser.ypp" +#line 267 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2050 "parser.cpp" - break; - - case 3: // root: %empty -#line 265 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 2056 "parser.cpp" - break; - - case 4: // program: program inline -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2062 "parser.cpp" - break; - - case 5: // program: program include -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2068 "parser.cpp" - break; - - case 6: // program: program declaration -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2074 "parser.cpp" - break; - - case 7: // program: inline -#line 276 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2080 "parser.cpp" break; - case 8: // program: include -#line 278 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 268 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2086 "parser.cpp" break; - case 9: // program: declaration -#line 280 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2092 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 284 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2098 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 289 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2104 "parser.cpp" break; - case 12: // declaration: "/#" -#line 293 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 279 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2110 "parser.cpp" break; - case 13: // declaration: "#/" -#line 294 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 281 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2116 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 295 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 283 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2122 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 296 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 287 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2128 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 297 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 292 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2134 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 302 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 296 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2140 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 307 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 297 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2146 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 312 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 298 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2152 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 299 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2158 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 300 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2164 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 305 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2170 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 310 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2176 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 315 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2182 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2188 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2194 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2200 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2206 "parser.cpp" break; - case 29: // stmt: stmt_waitframe -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } + case 24: // stmt: stmt_notify +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2212 "parser.cpp" break; - case 30: // stmt: stmt_if -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 25: // stmt: stmt_wait +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2218 "parser.cpp" break; - case 31: // stmt: stmt_ifelse -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2224 "parser.cpp" break; - case 32: // stmt: stmt_while -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2230 "parser.cpp" break; - case 33: // stmt: stmt_dowhile -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2236 "parser.cpp" break; - case 34: // stmt: stmt_for -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 29: // stmt: stmt_waitframe +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2242 "parser.cpp" break; - case 35: // stmt: stmt_foreach -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 30: // stmt: stmt_if +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2248 "parser.cpp" break; - case 36: // stmt: stmt_switch -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 31: // stmt: stmt_ifelse +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2254 "parser.cpp" break; - case 37: // stmt: stmt_case -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 32: // stmt: stmt_while +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2260 "parser.cpp" break; - case 38: // stmt: stmt_default -#line 334 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 33: // stmt: stmt_dowhile +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2266 "parser.cpp" break; - case 39: // stmt: stmt_break -#line 335 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 34: // stmt: stmt_for +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2272 "parser.cpp" break; - case 40: // stmt: stmt_continue -#line 336 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 35: // stmt: stmt_foreach +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2278 "parser.cpp" break; - case 41: // stmt: stmt_return -#line 337 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 36: // stmt: stmt_switch +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2284 "parser.cpp" break; - case 42: // stmt: stmt_breakpoint -#line 338 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 37: // stmt: stmt_case +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2290 "parser.cpp" break; - case 43: // stmt: stmt_prof_begin -#line 339 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 38: // stmt: stmt_default +#line 337 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2296 "parser.cpp" break; - case 44: // stmt: stmt_prof_end -#line 340 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 39: // stmt: stmt_break +#line 338 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2302 "parser.cpp" break; - case 45: // stmt_or_dev: stmt -#line 344 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 40: // stmt: stmt_continue +#line 339 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2308 "parser.cpp" break; - case 46: // stmt_or_dev: stmt_dev -#line 345 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 41: // stmt: stmt_return +#line 340 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2314 "parser.cpp" break; - case 47: // stmt_list: stmt_list stmt -#line 350 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_breakpoint +#line 341 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2320 "parser.cpp" break; - case 48: // stmt_list: stmt -#line 352 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_begin +#line 342 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2326 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 357 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt: stmt_prof_end +#line 343 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2332 "parser.cpp" break; - case 50: // stmt_or_dev_list: stmt_or_dev -#line 359 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 45: // stmt_or_dev: stmt +#line 347 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2338 "parser.cpp" break; - case 51: // stmt_dev: "/#" stmt_list "#/" -#line 363 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 46: // stmt_or_dev: stmt_dev +#line 348 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2344 "parser.cpp" break; - case 52: // stmt_dev: "/#" "#/" -#line 364 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 47: // stmt_list: stmt_list stmt +#line 353 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2350 "parser.cpp" break; - case 53: // stmt_block: "{" stmt_or_dev_list "}" -#line 368 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 48: // stmt_list: stmt +#line 355 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2356 "parser.cpp" break; - case 54: // stmt_block: "{" "}" -#line 369 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 360 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2362 "parser.cpp" break; - case 55: // stmt_expr: expr_assign -#line 374 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_or_dev_list: stmt_or_dev +#line 362 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2368 "parser.cpp" break; - case 56: // stmt_expr: expr_increment -#line 376 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" stmt_list "#/" +#line 366 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2374 "parser.cpp" break; - case 57: // stmt_expr: expr_decrement -#line 378 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 52: // stmt_dev: "/#" "#/" +#line 367 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2380 "parser.cpp" break; - case 58: // stmt_expr: %empty -#line 380 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 53: // stmt_block: "{" stmt_or_dev_list "}" +#line 371 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2386 "parser.cpp" break; - case 59: // stmt_call: expr_call ";" -#line 385 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 54: // stmt_block: "{" "}" +#line 372 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2392 "parser.cpp" break; - case 60: // stmt_call: expr_method ";" -#line 387 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 55: // stmt_expr: expr_assign +#line 377 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2398 "parser.cpp" break; - case 61: // stmt_assign: expr_assign ";" -#line 392 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_increment +#line 379 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2404 "parser.cpp" break; - case 62: // stmt_assign: expr_increment ";" -#line 394 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: expr_decrement +#line 381 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2410 "parser.cpp" break; - case 63: // stmt_assign: expr_decrement ";" -#line 396 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 58: // stmt_expr: %empty +#line 383 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2416 "parser.cpp" break; - case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 401 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 59: // stmt_call: expr_call ";" +#line 388 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2422 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 406 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 60: // stmt_call: expr_method ";" +#line 390 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2428 "parser.cpp" break; - case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 408 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 61: // stmt_assign: expr_assign ";" +#line 395 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2434 "parser.cpp" break; - case 67: // stmt_wait: "wait" expr ";" -#line 413 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 62: // stmt_assign: expr_increment ";" +#line 397 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2440 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 418 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 63: // stmt_assign: expr_decrement ";" +#line 399 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2446 "parser.cpp" break; - case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 420 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 404 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2452 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 425 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 409 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2458 "parser.cpp" break; - case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 427 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 411 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2464 "parser.cpp" break; - case 72: // stmt_waittillframeend: "waittillframeend" ";" -#line 432 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 67: // stmt_wait: "wait" expr ";" +#line 416 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2470 "parser.cpp" break; - case 73: // stmt_waitframe: "waitframe" ";" -#line 437 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 421 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2476 "parser.cpp" break; - case 74: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 439 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 423 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2482 "parser.cpp" break; - case 75: // stmt_if: "if" "(" expr ")" stmt -#line 444 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 428 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2488 "parser.cpp" break; - case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 449 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 430 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; - case 77: // stmt_while: "while" "(" expr ")" stmt -#line 454 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_waittillframeend: "waittillframeend" ";" +#line 435 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2500 "parser.cpp" break; - case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 459 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 73: // stmt_waitframe: "waitframe" ";" +#line 440 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2506 "parser.cpp" break; - case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 464 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 74: // stmt_waitframe: "waitframe" "(" ")" ";" +#line 442 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2512 "parser.cpp" break; - case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 469 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 75: // stmt_if: "if" "(" expr ")" stmt +#line 447 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2518 "parser.cpp" break; - case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 471 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 452 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2524 "parser.cpp" break; - case 82: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 476 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 77: // stmt_while: "while" "(" expr ")" stmt +#line 457 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2530 "parser.cpp" break; - case 83: // stmt_case: "case" expr_integer ":" -#line 481 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 462 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2536 "parser.cpp" break; - case 84: // stmt_case: "case" expr_string ":" -#line 483 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 467 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2542 "parser.cpp" break; - case 85: // stmt_default: "default" ":" -#line 488 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 472 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2548 "parser.cpp" break; - case 86: // stmt_break: "break" ";" -#line 493 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 474 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2554 "parser.cpp" break; - case 87: // stmt_continue: "continue" ";" -#line 498 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 479 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2560 "parser.cpp" break; - case 88: // stmt_return: "return" expr ";" -#line 503 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 83: // stmt_case: "case" expr_integer ":" +#line 484 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2566 "parser.cpp" break; - case 89: // stmt_return: "return" ";" -#line 505 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 84: // stmt_case: "case" expr_string ":" +#line 486 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2572 "parser.cpp" break; - case 90: // stmt_breakpoint: "breakpoint" ";" -#line 510 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 85: // stmt_default: "default" ":" +#line 491 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2578 "parser.cpp" break; - case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 515 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 86: // stmt_break: "break" ";" +#line 496 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2584 "parser.cpp" break; - case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 520 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 87: // stmt_continue: "continue" ";" +#line 501 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2590 "parser.cpp" break; - case 93: // expr: expr_ternary -#line 524 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_return: "return" expr ";" +#line 506 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2596 "parser.cpp" break; - case 94: // expr: expr_binary -#line 525 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 89: // stmt_return: "return" ";" +#line 508 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2602 "parser.cpp" break; - case 95: // expr: expr_primitive -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 90: // stmt_breakpoint: "breakpoint" ";" +#line 513 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2608 "parser.cpp" break; - case 96: // expr_or_empty: expr -#line 530 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 518 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2614 "parser.cpp" break; - case 97: // expr_or_empty: %empty -#line 531 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 523 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2620 "parser.cpp" break; - case 98: // expr_assign: expr_object "=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr: expr_ternary +#line 527 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2626 "parser.cpp" break; - case 99: // expr_assign: expr_object "|=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 94: // expr: expr_binary +#line 528 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2632 "parser.cpp" break; - case 100: // expr_assign: expr_object "&=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr: expr_primitive +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2638 "parser.cpp" break; - case 101: // expr_assign: expr_object "^=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_or_empty: expr +#line 533 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2644 "parser.cpp" break; - case 102: // expr_assign: expr_object "<<=" expr -#line 544 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_or_empty: %empty +#line 534 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2650 "parser.cpp" break; - case 103: // expr_assign: expr_object ">>=" expr -#line 546 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_tuple "=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2656 "parser.cpp" break; - case 104: // expr_assign: expr_object "+=" expr -#line 548 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2662 "parser.cpp" break; - case 105: // expr_assign: expr_object "-=" expr -#line 550 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "|=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2668 "parser.cpp" break; - case 106: // expr_assign: expr_object "*=" expr -#line 552 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 101: // expr_assign: expr_object "&=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2674 "parser.cpp" break; - case 107: // expr_assign: expr_object "/=" expr -#line 554 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 102: // expr_assign: expr_object "^=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2680 "parser.cpp" break; - case 108: // expr_assign: expr_object "%=" expr -#line 556 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 103: // expr_assign: expr_object "<<=" expr +#line 549 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2686 "parser.cpp" break; - case 109: // expr_increment: "++" expr_object -#line 561 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 104: // expr_assign: expr_object ">>=" expr +#line 551 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2692 "parser.cpp" break; - case 110: // expr_increment: expr_object "++" -#line 563 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 105: // expr_assign: expr_object "+=" expr +#line 553 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2698 "parser.cpp" break; - case 111: // expr_decrement: "--" expr_object -#line 568 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 106: // expr_assign: expr_object "-=" expr +#line 555 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2704 "parser.cpp" break; - case 112: // expr_decrement: expr_object "--" -#line 570 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 107: // expr_assign: expr_object "*=" expr +#line 557 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2710 "parser.cpp" break; - case 113: // expr_ternary: expr "?" expr ":" expr -#line 575 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_assign: expr_object "/=" expr +#line 559 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2716 "parser.cpp" break; - case 114: // expr_binary: expr "||" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_assign: expr_object "%=" expr +#line 561 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2722 "parser.cpp" break; - case 115: // expr_binary: expr "&&" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_increment: "++" expr_object +#line 566 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2728 "parser.cpp" break; - case 116: // expr_binary: expr "==" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_increment: expr_object "++" +#line 568 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2734 "parser.cpp" break; - case 117: // expr_binary: expr "!=" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_decrement: "--" expr_object +#line 573 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2740 "parser.cpp" break; - case 118: // expr_binary: expr "<=" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_decrement: expr_object "--" +#line 575 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2746 "parser.cpp" break; - case 119: // expr_binary: expr ">=" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_ternary: expr "?" expr ":" expr +#line 580 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2752 "parser.cpp" break; - case 120: // expr_binary: expr "<" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "||" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2758 "parser.cpp" break; - case 121: // expr_binary: expr ">" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "&&" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2764 "parser.cpp" break; - case 122: // expr_binary: expr "|" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr "==" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2770 "parser.cpp" break; - case 123: // expr_binary: expr "&" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "!=" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2776 "parser.cpp" break; - case 124: // expr_binary: expr "^" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr "<=" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2782 "parser.cpp" break; - case 125: // expr_binary: expr "<<" expr -#line 602 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr ">=" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2788 "parser.cpp" break; - case 126: // expr_binary: expr ">>" expr -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "<" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2794 "parser.cpp" break; - case 127: // expr_binary: expr "+" expr -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr ">" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2800 "parser.cpp" break; - case 128: // expr_binary: expr "-" expr -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "|" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2806 "parser.cpp" break; - case 129: // expr_binary: expr "*" expr -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 124: // expr_binary: expr "&" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2812 "parser.cpp" break; - case 130: // expr_binary: expr "/" expr -#line 612 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 125: // expr_binary: expr "^" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2818 "parser.cpp" break; - case 131: // expr_binary: expr "%" expr -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 126: // expr_binary: expr "<<" expr +#line 607 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2824 "parser.cpp" break; - case 132: // expr_primitive: expr_complement -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 127: // expr_binary: expr ">>" expr +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2830 "parser.cpp" break; - case 133: // expr_primitive: expr_negate -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 128: // expr_binary: expr "+" expr +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2836 "parser.cpp" break; - case 134: // expr_primitive: expr_not -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 129: // expr_binary: expr "-" expr +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2842 "parser.cpp" break; - case 135: // expr_primitive: expr_call -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 130: // expr_binary: expr "*" expr +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2848 "parser.cpp" break; - case 136: // expr_primitive: expr_method -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 131: // expr_binary: expr "/" expr +#line 617 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2854 "parser.cpp" break; - case 137: // expr_primitive: expr_add_array -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 132: // expr_binary: expr "%" expr +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2860 "parser.cpp" break; - case 138: // expr_primitive: expr_isdefined -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } + case 133: // expr_primitive: expr_complement +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2866 "parser.cpp" break; - case 139: // expr_primitive: expr_istrue -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } + case 134: // expr_primitive: expr_negate +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2872 "parser.cpp" break; - case 140: // expr_primitive: expr_reference -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 135: // expr_primitive: expr_not +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2878 "parser.cpp" break; - case 141: // expr_primitive: expr_array -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 136: // expr_primitive: expr_call +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2884 "parser.cpp" break; - case 142: // expr_primitive: expr_field -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 137: // expr_primitive: expr_method +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2890 "parser.cpp" break; - case 143: // expr_primitive: expr_size -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 138: // expr_primitive: expr_add_array +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2896 "parser.cpp" break; - case 144: // expr_primitive: expr_paren -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 139: // expr_primitive: expr_isdefined +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } #line 2902 "parser.cpp" break; - case 145: // expr_primitive: expr_thisthread -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 140: // expr_primitive: expr_istrue +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } #line 2908 "parser.cpp" break; - case 146: // expr_primitive: expr_empty_array -#line 632 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 141: // expr_primitive: expr_reference +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2914 "parser.cpp" break; - case 147: // expr_primitive: expr_undefined -#line 633 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 142: // expr_primitive: expr_array +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2920 "parser.cpp" break; - case 148: // expr_primitive: expr_game -#line 634 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 143: // expr_primitive: expr_field +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2926 "parser.cpp" break; - case 149: // expr_primitive: expr_self -#line 635 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 144: // expr_primitive: expr_size +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2932 "parser.cpp" break; - case 150: // expr_primitive: expr_anim -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 145: // expr_primitive: expr_paren +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2938 "parser.cpp" break; - case 151: // expr_primitive: expr_level -#line 637 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 146: // expr_primitive: expr_thisthread +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2944 "parser.cpp" break; - case 152: // expr_primitive: expr_animation -#line 638 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 147: // expr_primitive: expr_empty_array +#line 637 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2950 "parser.cpp" break; - case 153: // expr_primitive: expr_animtree -#line 639 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 148: // expr_primitive: expr_undefined +#line 638 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2956 "parser.cpp" break; - case 154: // expr_primitive: expr_identifier -#line 640 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 149: // expr_primitive: expr_game +#line 639 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2962 "parser.cpp" break; - case 155: // expr_primitive: expr_istring -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 150: // expr_primitive: expr_self +#line 640 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2968 "parser.cpp" break; - case 156: // expr_primitive: expr_string -#line 642 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 151: // expr_primitive: expr_anim +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2974 "parser.cpp" break; - case 157: // expr_primitive: expr_vector -#line 643 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 152: // expr_primitive: expr_level +#line 642 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2980 "parser.cpp" break; - case 158: // expr_primitive: expr_float -#line 644 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 153: // expr_primitive: expr_animation +#line 643 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2986 "parser.cpp" break; - case 159: // expr_primitive: expr_integer -#line 645 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 154: // expr_primitive: expr_animtree +#line 644 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2992 "parser.cpp" break; - case 160: // expr_primitive: expr_false -#line 646 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 155: // expr_primitive: expr_identifier +#line 645 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2998 "parser.cpp" break; - case 161: // expr_primitive: expr_true -#line 647 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 156: // expr_primitive: expr_istring +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 3004 "parser.cpp" break; - case 162: // expr_complement: "~" expr -#line 652 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 157: // expr_primitive: expr_string +#line 647 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 3010 "parser.cpp" break; - case 163: // expr_negate: "-" expr_identifier -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 158: // expr_primitive: expr_vector +#line 648 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 3016 "parser.cpp" break; - case 164: // expr_negate: "-" expr_paren -#line 659 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 159: // expr_primitive: expr_float +#line 649 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 3022 "parser.cpp" break; - case 165: // expr_negate: "-" expr_array -#line 661 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 160: // expr_primitive: expr_integer +#line 650 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 3028 "parser.cpp" break; - case 166: // expr_negate: "-" expr_field -#line 663 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 161: // expr_primitive: expr_false +#line 651 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 3034 "parser.cpp" break; - case 167: // expr_not: "!" expr -#line 668 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 162: // expr_primitive: expr_true +#line 652 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 3040 "parser.cpp" break; - case 168: // expr_call: expr_function -#line 672 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 163: // expr_complement: "~" expr +#line 657 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3046 "parser.cpp" break; - case 169: // expr_call: expr_pointer -#line 673 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 164: // expr_negate: "-" expr_identifier +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 3052 "parser.cpp" break; - case 170: // expr_method: expr_object expr_function -#line 676 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 165: // expr_negate: "-" expr_paren +#line 664 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 3058 "parser.cpp" break; - case 171: // expr_method: expr_object expr_pointer -#line 677 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 166: // expr_negate: "-" expr_array +#line 666 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 3064 "parser.cpp" break; - case 172: // expr_function: expr_identifier "(" expr_arguments ")" -#line 682 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 167: // expr_negate: "-" expr_field +#line 668 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 3070 "parser.cpp" break; - case 173: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 684 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 168: // expr_not: "!" expr +#line 673 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3076 "parser.cpp" break; - case 174: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 686 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 169: // expr_call: expr_function +#line 677 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3082 "parser.cpp" break; - case 175: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 688 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 170: // expr_call: expr_pointer +#line 678 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3088 "parser.cpp" break; - case 176: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 690 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 171: // expr_method: expr_object expr_function +#line 681 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3094 "parser.cpp" break; - case 177: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 692 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 172: // expr_method: expr_object expr_pointer +#line 682 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3100 "parser.cpp" break; - case 178: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 697 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 173: // expr_function: expr_identifier "(" expr_arguments ")" +#line 687 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3106 "parser.cpp" break; - case 179: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 699 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 174: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 689 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3112 "parser.cpp" break; - case 180: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 701 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 175: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 691 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3118 "parser.cpp" break; - case 181: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 703 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 176: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 693 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3124 "parser.cpp" break; - case 182: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 708 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 177: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 695 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3130 "parser.cpp" break; - case 183: // expr_parameters: expr_parameters "," expr_identifier -#line 713 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 178: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 697 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3136 "parser.cpp" break; - case 184: // expr_parameters: expr_identifier -#line 715 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 179: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 702 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3142 "parser.cpp" break; - case 185: // expr_parameters: %empty -#line 717 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 180: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 704 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3148 "parser.cpp" break; - case 186: // expr_arguments: expr_arguments_no_empty -#line 722 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 181: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 706 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3154 "parser.cpp" break; - case 187: // expr_arguments: %empty -#line 724 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 182: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 708 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3160 "parser.cpp" break; - case 188: // expr_arguments_no_empty: expr_arguments "," expr -#line 729 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 183: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 713 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3166 "parser.cpp" break; - case 189: // expr_arguments_no_empty: expr -#line 731 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 184: // expr_parameters: expr_parameters "," expr_identifier +#line 718 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3172 "parser.cpp" break; - case 190: // expr_isdefined: "isdefined" "(" expr ")" -#line 736 "parser.ypp" - { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_parameters: expr_identifier +#line 720 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3178 "parser.cpp" break; - case 191: // expr_istrue: "istrue" "(" expr ")" -#line 741 "parser.ypp" - { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 186: // expr_parameters: %empty +#line 722 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3184 "parser.cpp" break; - case 192: // expr_reference: "::" expr_identifier -#line 746 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 187: // expr_arguments: expr_arguments_no_empty +#line 727 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3190 "parser.cpp" break; - case 193: // expr_reference: expr_path "::" expr_identifier -#line 748 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 188: // expr_arguments: %empty +#line 729 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3196 "parser.cpp" break; - case 194: // expr_array: expr_object "[" expr "]" -#line 753 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 189: // expr_arguments_no_empty: expr_arguments "," expr +#line 734 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3202 "parser.cpp" break; - case 195: // expr_field: expr_object "." expr_identifier_nosize -#line 758 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 190: // expr_arguments_no_empty: expr +#line 736 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3208 "parser.cpp" break; - case 196: // expr_size: expr_object "." "size" -#line 763 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 191: // expr_isdefined: "isdefined" "(" expr ")" +#line 741 "parser.ypp" + { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3214 "parser.cpp" break; - case 197: // expr_paren: "(" expr ")" -#line 768 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 192: // expr_istrue: "istrue" "(" expr ")" +#line 746 "parser.ypp" + { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3220 "parser.cpp" break; - case 198: // expr_object: expr_call -#line 772 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 193: // expr_reference: "::" expr_identifier +#line 751 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3226 "parser.cpp" break; - case 199: // expr_object: expr_method -#line 773 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 194: // expr_reference: expr_path "::" expr_identifier +#line 753 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3232 "parser.cpp" break; - case 200: // expr_object: expr_array -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 195: // expr_tuple: "[" expr_tuple_arguments "]" +#line 758 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3238 "parser.cpp" break; - case 201: // expr_object: expr_field -#line 775 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 196: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 763 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3244 "parser.cpp" break; - case 202: // expr_object: expr_game -#line 776 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 197: // expr_tuple_arguments: expr_tuple_types +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3250 "parser.cpp" break; - case 203: // expr_object: expr_self -#line 777 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 198: // expr_tuple_types: expr_array +#line 769 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3256 "parser.cpp" break; - case 204: // expr_object: expr_anim -#line 778 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 199: // expr_tuple_types: expr_field +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3262 "parser.cpp" break; - case 205: // expr_object: expr_level -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 200: // expr_tuple_types: expr_identifier +#line 771 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3268 "parser.cpp" break; - case 206: // expr_object: expr_identifier -#line 780 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 201: // expr_array: expr_object "[" expr "]" +#line 776 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3274 "parser.cpp" break; - case 207: // expr_thisthread: "thisthread" -#line 785 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 202: // expr_field: expr_object "." expr_identifier_nosize +#line 781 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3280 "parser.cpp" break; - case 208: // expr_empty_array: "[" "]" -#line 790 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_size: expr_object "." "size" +#line 786 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3286 "parser.cpp" break; - case 209: // expr_undefined: "undefined" -#line 795 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 204: // expr_paren: "(" expr ")" +#line 791 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3292 "parser.cpp" break; - case 210: // expr_game: "game" -#line 800 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 205: // expr_object: expr_call +#line 795 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3298 "parser.cpp" break; - case 211: // expr_self: "self" -#line 805 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 206: // expr_object: expr_method +#line 796 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3304 "parser.cpp" break; - case 212: // expr_anim: "anim" -#line 810 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 207: // expr_object: expr_array +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3310 "parser.cpp" break; - case 213: // expr_level: "level" -#line 815 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 208: // expr_object: expr_field +#line 798 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3316 "parser.cpp" break; - case 214: // expr_animation: "%" "identifier" -#line 820 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 209: // expr_object: expr_game +#line 799 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3322 "parser.cpp" break; - case 215: // expr_animtree: "#animtree" -#line 825 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 210: // expr_object: expr_self +#line 800 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3328 "parser.cpp" break; - case 216: // expr_identifier_nosize: "identifier" -#line 830 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 211: // expr_object: expr_anim +#line 801 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3334 "parser.cpp" break; - case 217: // expr_identifier: "identifier" -#line 835 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 212: // expr_object: expr_level +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3340 "parser.cpp" break; - case 218: // expr_identifier: "size" -#line 837 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 213: // expr_object: expr_identifier +#line 803 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3346 "parser.cpp" break; - case 219: // expr_path: "identifier" -#line 842 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 214: // expr_thisthread: "thisthread" +#line 808 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3352 "parser.cpp" break; - case 220: // expr_path: "path" -#line 844 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 215: // expr_empty_array: "[" "]" +#line 813 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3358 "parser.cpp" break; - case 221: // expr_istring: "localized string" -#line 849 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 216: // expr_undefined: "undefined" +#line 818 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3364 "parser.cpp" break; - case 222: // expr_string: "string literal" -#line 854 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 217: // expr_game: "game" +#line 823 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3370 "parser.cpp" break; - case 223: // expr_vector: "(" expr "," expr "," expr ")" -#line 859 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 218: // expr_self: "self" +#line 828 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3376 "parser.cpp" break; - case 224: // expr_float: "-" "float" -#line 864 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 219: // expr_anim: "anim" +#line 833 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3382 "parser.cpp" break; - case 225: // expr_float: "float" -#line 866 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 220: // expr_level: "level" +#line 838 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3388 "parser.cpp" break; - case 226: // expr_integer: "-" "integer" -#line 871 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 221: // expr_animation: "%" "identifier" +#line 843 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3394 "parser.cpp" break; - case 227: // expr_integer: "integer" -#line 873 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 222: // expr_animtree: "#animtree" +#line 848 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3400 "parser.cpp" break; - case 228: // expr_false: "false" -#line 878 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 223: // expr_identifier_nosize: "identifier" +#line 853 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3406 "parser.cpp" break; - case 229: // expr_true: "true" -#line 883 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 224: // expr_identifier: "identifier" +#line 858 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3412 "parser.cpp" break; + case 225: // expr_identifier: "size" +#line 860 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3418 "parser.cpp" + break; -#line 3416 "parser.cpp" + case 226: // expr_path: "identifier" +#line 865 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3424 "parser.cpp" + break; + + case 227: // expr_path: "path" +#line 867 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3430 "parser.cpp" + break; + + case 228: // expr_istring: "localized string" +#line 872 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3436 "parser.cpp" + break; + + case 229: // expr_string: "string literal" +#line 877 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3442 "parser.cpp" + break; + + case 230: // expr_vector: "(" expr "," expr "," expr ")" +#line 882 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3448 "parser.cpp" + break; + + case 231: // expr_float: "-" "float" +#line 887 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3454 "parser.cpp" + break; + + case 232: // expr_float: "float" +#line 889 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3460 "parser.cpp" + break; + + case 233: // expr_integer: "-" "integer" +#line 894 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3466 "parser.cpp" + break; + + case 234: // expr_integer: "integer" +#line 896 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3472 "parser.cpp" + break; + + case 235: // expr_false: "false" +#line 901 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3478 "parser.cpp" + break; + + case 236: // expr_true: "true" +#line 906 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3484 "parser.cpp" + break; + + +#line 3488 "parser.cpp" default: break; @@ -3625,12 +3697,13 @@ namespace xsk { namespace gsc { namespace iw8 { "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", "expr_arguments_no_empty", "expr_isdefined", "expr_istrue", - "expr_reference", "expr_array", "expr_field", "expr_size", "expr_paren", - "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", - "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier_nosize", "expr_identifier", - "expr_path", "expr_istring", "expr_string", "expr_vector", "expr_float", - "expr_integer", "expr_false", "expr_true", YY_NULLPTR + "expr_reference", "expr_tuple", "expr_tuple_arguments", + "expr_tuple_types", "expr_array", "expr_field", "expr_size", + "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", + "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", + "expr_animation", "expr_animtree", "expr_identifier_nosize", + "expr_identifier", "expr_path", "expr_istring", "expr_string", + "expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3899,700 +3972,715 @@ namespace xsk { namespace gsc { namespace iw8 { } - const short parser::yypact_ninf_ = -295; + const short parser::yypact_ninf_ = -296; - const short parser::yytable_ninf_ = -220; + const short parser::yytable_ninf_ = -227; const short parser::yypact_[] = { - 1, -295, -295, -26, -26, -29, -295, -295, 37, 1, - -295, -295, -295, -295, -295, -295, -22, -295, -295, -25, - 11, -57, -295, -295, -295, -295, -23, 1138, -295, -295, - -295, 16, 2, -295, -295, -7, -2, -295, -17, -295, - -295, -295, -295, -295, -295, -295, 27, 28, 1138, 701, - -23, 1138, 1138, -20, -12, 42, -295, -295, -295, 2218, - -295, -295, -295, -295, -295, -295, 135, 512, -295, -295, - -295, -295, -295, -295, 919, 998, -295, -295, 1099, -295, - -295, -295, 1163, 1341, 1350, 1360, -295, -295, 106, 44, - -295, -295, -295, -295, -295, -295, -295, 74, 35, -23, - 81, 87, 86, 92, 98, 93, 100, 1138, 1138, 1402, - 701, -295, 2301, 96, 103, -295, -295, -295, 1138, 101, - -295, -295, -295, -295, 919, 998, -295, 1369, -295, -295, - -295, -295, 106, 104, -295, -295, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1138, 1138, 1203, -14, -295, -295, 111, - 1138, -23, -295, 833, -295, -295, 1138, 1138, -23, 1138, - 1138, -23, 1138, 1568, 1602, -295, 1138, 1948, 1138, -295, - 1636, 1138, 69, -23, 2183, 91, 91, 2332, 2342, 718, - 718, 561, 561, 561, 561, 2373, 2383, 624, 26, 26, - -295, -295, -295, 1988, -295, -295, -295, 4, -295, 118, - 966, 1138, 109, -47, 120, 1329, 123, 126, 127, 136, - -49, 128, 131, 133, 1073, 139, 138, 146, -295, 603, - 603, -295, -295, 887, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - 144, 147, 148, 149, 150, -295, -295, 1250, 111, 2028, - 6, 162, 2068, 8, 164, 2108, -295, -295, 2147, 160, - 2301, 1948, 118, 1138, -295, -295, 1138, -295, -295, 1045, - 2253, -295, 165, -295, 1138, 194, 1138, 538, -23, 1138, - 122, 168, 169, -295, -295, -295, -295, 2288, -295, 1138, - 1138, 1369, 1369, -295, -295, -295, -295, -295, -295, -295, - 174, 187, 188, 190, -295, -295, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1138, 1138, 1138, 1138, 186, -295, 1138, - 189, -295, 1138, 195, 1138, 193, 2301, 34, -295, -295, - -295, 191, 1670, 199, 1704, 192, -295, -295, -295, 29, - -11, 1738, -295, -295, -295, 45, 47, 1138, 1138, 1138, - 1138, 2301, 2301, 2301, 2301, 2301, 2301, 2301, 2301, 2301, - 2301, 2301, 203, 48, 205, 65, 206, 1772, 1138, -295, - -295, 1329, 1138, 1329, 1138, 1138, -23, 35, 197, 200, - 1806, 1446, 1490, 1534, 1138, -295, 1138, -295, 1138, -295, - 66, 237, 1840, -295, 2301, 201, 1874, 233, -295, -295, - -295, 204, 207, 1138, 208, 1138, 209, 1138, 75, 76, - 82, -295, 1329, 211, 538, 1329, 1138, -295, -295, 214, - -295, 221, -295, 223, -295, -295, -295, -295, -295, 224, - -295, 1908, 216, 217, 220, 1329, 1329, -295, -295, -295, - -295, -295 + 2, -296, -296, -24, -24, -29, -296, -296, 27, 2, + -296, -296, -296, -296, -296, -296, -35, -296, -296, -30, + -7, -49, -296, -296, -296, -296, -41, 1265, -296, -296, + -296, 45, -31, -296, -296, -27, -19, -296, 66, -296, + -296, -296, -296, -296, -296, -296, 72, 74, 1265, 1135, + -41, 1265, 1265, 817, 37, 73, -296, -296, -296, 2289, + -296, -296, -296, -296, -296, -296, 119, 430, -296, -296, + -296, -296, -296, -296, 604, 647, -296, -296, 750, -296, + -296, -296, 904, 981, 1060, 1161, -296, -296, -3, 84, + -296, -296, -296, -296, -296, -296, -296, 89, 102, -41, + 109, 115, 114, 120, 125, 122, 134, 1265, 1265, 1513, + 1135, -296, 2372, 135, 146, -296, -296, -296, 1265, 136, + -296, -296, -296, -296, 604, 647, -296, 1225, -296, -296, + -296, -296, -3, 144, -296, -296, 1265, 1265, 1265, 1265, + 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, + 1265, 1265, 1265, 1265, 1265, 1330, -26, -296, -296, 153, + 1265, -41, -296, 82, -296, -296, 1265, 1265, -41, 1265, + 1265, -41, 1265, 1679, 1713, -296, 1265, 1261, 1265, -296, + 1747, 1265, 112, -41, 2254, 91, 91, 2403, 2413, 758, + 758, 176, 176, 176, 176, 2444, 680, 543, 46, 46, + -296, -296, -296, 2059, -296, -296, -296, -14, -296, 159, + 1028, 1265, 152, -32, 166, 1456, 167, 172, 178, 179, + -39, 177, 171, 175, 1200, 191, 188, 189, -296, 150, + 382, 382, -296, -296, 949, -296, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + -296, 192, 193, 194, 196, 198, 185, -296, -296, 1377, + 153, 2099, 22, 212, 2139, 24, 213, 2179, -296, -296, + 2218, 209, 2372, 1261, 159, 1265, -296, -296, 1265, -296, + -296, 1107, 2324, -296, 220, -296, 1265, 250, 1265, 833, + -41, 1265, 174, 216, 218, -296, -296, -296, -296, 2359, + -296, 1265, 1265, 1330, 8, -296, 105, 113, 10, 1225, + 1225, -296, -296, -296, -296, -296, -296, -296, 1265, 229, + 232, 233, 234, -296, -296, 1265, 1265, 1265, 1265, 1265, + 1265, 1265, 1265, 1265, 1265, 1265, 230, -296, 1265, 231, + -296, 1265, 235, 1265, 238, 2372, 28, -296, -296, -296, + 239, 1781, 242, 1815, 241, -296, -296, -296, 1477, -12, + 1849, -296, -296, -296, 31, 32, -296, 382, 2372, 1265, + 1265, 1265, 1265, 2372, 2372, 2372, 2372, 2372, 2372, 2372, + 2372, 2372, 2372, 2372, 243, 34, 255, 35, 259, 1883, + 1265, -296, -296, 1456, 1265, 1456, 1265, 1265, -41, 102, + 251, 253, -296, 1917, 1557, 1601, 1645, 1265, -296, 1265, + -296, 1265, -296, 43, 289, 1951, -296, 2372, 257, 1985, + 292, -296, -296, -296, 264, 265, 1265, 269, 1265, 270, + 1265, 52, 81, 90, -296, 1456, 293, 833, 1456, 1265, + -296, -296, 268, -296, 301, -296, 303, -296, -296, -296, + -296, -296, 304, -296, 2019, 296, 297, 298, 1456, 1456, + -296, -296, -296, -296, -296 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 218, 217, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 220, 219, 0, - 0, 0, 1, 4, 5, 6, 185, 0, 10, 11, - 222, 0, 0, 184, 215, 0, 0, 207, 0, 229, - 228, 209, 210, 211, 212, 213, 0, 0, 0, 187, - 0, 0, 0, 0, 0, 217, 221, 225, 227, 0, - 93, 94, 95, 132, 133, 134, 135, 136, 168, 169, - 137, 138, 139, 140, 141, 142, 143, 144, 0, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, - 155, 156, 157, 158, 159, 160, 161, 0, 0, 0, + 3, 12, 13, 0, 0, 0, 225, 224, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 227, 226, 0, + 0, 0, 1, 4, 5, 6, 186, 0, 10, 11, + 229, 0, 0, 185, 222, 0, 0, 214, 0, 236, + 235, 216, 217, 218, 219, 220, 0, 0, 0, 188, + 0, 0, 0, 0, 0, 224, 228, 232, 234, 0, + 93, 94, 95, 133, 134, 135, 136, 137, 169, 170, + 138, 139, 140, 141, 142, 143, 144, 145, 0, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 0, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 187, 208, 189, 0, 186, 192, 167, 162, 0, 0, - 224, 226, 198, 199, 165, 166, 164, 0, 202, 203, - 204, 205, 163, 0, 214, 18, 0, 0, 0, 0, + 188, 215, 190, 0, 187, 193, 168, 163, 0, 0, + 231, 233, 205, 206, 166, 167, 165, 0, 209, 210, + 211, 212, 164, 0, 221, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 170, 171, 0, - 187, 0, 17, 0, 19, 183, 0, 187, 0, 0, - 187, 0, 0, 0, 0, 197, 0, 189, 0, 182, - 0, 0, 0, 0, 0, 125, 126, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 127, 128, - 129, 130, 131, 0, 196, 216, 195, 0, 186, 193, + 0, 0, 0, 0, 0, 0, 0, 171, 172, 0, + 188, 0, 17, 0, 19, 184, 0, 188, 0, 0, + 188, 0, 0, 0, 0, 204, 0, 190, 0, 183, + 0, 0, 0, 0, 0, 126, 127, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 128, 129, + 130, 131, 132, 0, 203, 223, 202, 0, 187, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, - 0, 45, 50, 0, 46, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 0, 0, 0, 198, 199, 200, 201, 0, 206, 0, - 0, 0, 0, 0, 0, 0, 190, 191, 0, 0, - 188, 0, 0, 0, 194, 172, 187, 52, 48, 0, - 0, 72, 0, 73, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 85, 86, 87, 89, 0, 90, 187, - 187, 109, 111, 53, 49, 61, 62, 63, 59, 60, - 0, 0, 0, 0, 110, 112, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 174, 187, - 0, 176, 187, 0, 0, 0, 113, 0, 51, 47, - 67, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 84, 83, 88, 0, 0, 0, 0, 0, - 0, 98, 104, 105, 106, 107, 108, 99, 100, 101, - 103, 102, 0, 0, 0, 0, 0, 0, 187, 173, - 74, 0, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 187, 175, 187, 177, 187, 223, - 0, 75, 0, 77, 96, 0, 0, 0, 82, 91, - 92, 0, 0, 187, 0, 187, 0, 187, 0, 0, - 0, 178, 0, 0, 58, 0, 0, 64, 66, 186, - 69, 186, 71, 186, 179, 180, 181, 76, 78, 0, - 80, 0, 0, 0, 0, 0, 0, 65, 68, 70, - 79, 81 + 0, 0, 45, 50, 0, 46, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 0, 0, 0, 205, 206, 0, 207, 208, 0, + 213, 0, 0, 0, 0, 0, 0, 0, 191, 192, + 0, 0, 189, 0, 0, 0, 201, 173, 188, 52, + 48, 0, 0, 72, 0, 73, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 85, 86, 87, 89, 0, + 90, 188, 188, 0, 0, 197, 207, 208, 213, 110, + 112, 53, 49, 61, 62, 63, 59, 60, 0, 0, + 0, 0, 0, 111, 113, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 175, 188, 0, + 177, 188, 0, 0, 0, 114, 0, 51, 47, 67, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 84, 83, 88, 0, 0, 195, 0, 98, 0, + 0, 0, 0, 99, 105, 106, 107, 108, 109, 100, + 101, 102, 104, 103, 0, 0, 0, 0, 0, 0, + 188, 174, 74, 0, 0, 0, 97, 0, 0, 0, + 0, 0, 196, 0, 0, 0, 0, 188, 176, 188, + 178, 188, 230, 0, 75, 0, 77, 96, 0, 0, + 0, 82, 91, 92, 0, 0, 188, 0, 188, 0, + 188, 0, 0, 0, 179, 0, 0, 58, 0, 0, + 64, 66, 187, 69, 187, 71, 187, 180, 181, 182, + 76, 78, 0, 80, 0, 0, 0, 0, 0, 0, + 65, 68, 70, 79, 81 }; const short parser::yypgoto_[] = { - -295, -295, -295, 276, 278, 279, -295, -295, -295, 67, - 59, -295, -295, -295, -97, -133, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - 198, -295, -294, -291, -289, -295, -295, -295, -295, -295, - -295, -31, -6, -73, -60, -295, -295, -16, -45, -295, - -295, -295, 80, 249, -295, 250, 274, -295, -295, -295, - 280, 385, 391, 398, -295, -295, -295, 0, 7, -295, - -19, -295, -295, 94, -295, -295 + -296, -296, -296, 354, 355, 356, -296, -296, -296, -144, + 133, -296, -296, -296, -97, -77, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + 200, -296, -295, -292, -291, -296, -296, -296, -296, -296, + -296, -6, 101, -73, -66, -296, -296, -137, -47, -296, + -296, -296, -296, -296, -4, 337, 362, -296, 321, 368, + -296, -296, -296, 393, 442, 467, 501, -296, -296, -296, + 0, 7, -296, -18, -296, -296, 160, -296, -296 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 231, - 232, 289, 233, 234, 235, 355, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - 112, 415, 260, 261, 262, 60, 61, 62, 63, 64, + 0, 8, 9, 10, 11, 12, 13, 14, 15, 232, + 233, 291, 234, 235, 236, 364, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 112, 428, 261, 262, 263, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 32, 113, 208, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 206, 88, 89, 90, - 91, 92, 93, 94, 95, 96 + 72, 73, 266, 314, 315, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 206, + 88, 89, 90, 91, 92, 93, 94, 95, 96 }; const short parser::yytable_[] = { - 16, 164, 31, 356, 114, 157, 357, 292, 358, 16, - 19, 20, 1, 2, 3, 4, 5, 293, 158, 395, - 35, 36, 122, 38, 6, 21, 33, 6, 42, 43, - 44, 45, 26, 204, 118, 101, 104, 22, 119, 28, - 6, 106, 102, 105, 30, 6, 300, 123, 6, 396, - 115, 100, 30, 132, 157, 58, 103, 98, 27, 285, - 133, 338, 99, 341, 178, 114, 178, 158, 178, 35, - 36, 97, 38, 17, 18, 29, 6, 7, 159, 17, - 55, 107, 108, 120, 121, 133, 205, 155, 134, 389, - 182, 163, 17, 55, 178, 324, 325, 17, 55, 165, - 398, 7, 399, 405, -219, 178, 161, 178, 178, 326, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 407, 431, 152, 153, 154, 178, 178, 159, 17, 55, - 444, 445, 263, 124, 133, 178, 178, 446, 162, 166, - 356, 167, 178, 357, 207, 358, -206, -206, 168, -206, - 169, 270, 170, -206, 273, 171, 178, 264, 172, 181, - 160, 209, 179, 268, -206, 160, 183, -206, 271, 205, - 133, 274, 286, 291, 294, -198, -198, 296, -198, 263, - 297, 298, -198, 282, 263, 150, 151, 152, 153, 154, - 299, 303, 309, -198, 157, 304, -198, 305, 122, 122, - 310, 301, 263, 308, 264, -206, -206, 158, 315, 264, - 268, 316, 317, 318, 319, 268, 339, 133, 342, 345, - 351, 353, 133, 123, 123, 59, 121, 264, 367, 268, - 268, 362, 363, 268, -198, -198, 133, 133, 157, 157, - 133, 368, 369, 265, 370, 382, 109, 388, 384, 116, - 117, 158, 158, 392, 386, 390, 394, 404, 263, 406, - 408, 419, 432, 436, 420, 434, 122, 159, 437, 452, - 347, 438, 440, 442, 133, 448, 453, 288, 454, 455, - 457, 458, 295, 264, 459, 23, 157, 24, 25, 268, - 265, 123, 314, 365, 366, 265, 133, 268, 360, 158, - 418, 449, 125, 126, 133, 173, 174, 0, 177, 265, - 265, 159, 159, 265, 302, 0, 180, 0, 133, 133, - 0, 0, 0, 383, 0, 0, 385, 127, 0, 0, - 0, 0, 0, 128, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 0, 0, 349, 0, 0, 159, - 263, 0, 263, 0, 269, 0, 133, 272, 0, 265, - 275, 0, 410, 0, 278, 0, 280, 265, 439, 281, - 441, 0, 443, 0, 0, 264, 0, 264, 428, 0, - 429, 268, 430, 268, 0, 0, 417, 0, 133, 0, - 133, 263, 0, 122, 263, 0, 0, 0, 0, 290, - 0, 0, 266, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 307, 0, 263, 263, 264, 0, 123, 264, - 0, 0, 268, 0, 268, 268, 0, 267, 129, 133, - 0, 133, 133, 128, 130, 0, 0, 0, 0, 264, - 264, 131, 0, 0, 0, 268, 268, 0, 411, 266, - 413, 0, 133, 133, 266, 0, 0, 0, 0, 0, - 0, 265, 0, 265, 0, 0, 0, 0, 266, 266, - 0, 346, 266, 0, 267, 0, 0, 0, 0, 267, - 128, 0, 352, 0, 354, 128, 0, 361, 0, 447, - 0, 0, 450, 311, 312, 0, 0, 267, 0, 128, - 128, 0, 265, 128, 265, 265, 0, 0, 0, 0, - 0, 0, 460, 461, 371, 372, 373, 374, 375, 376, - 377, 378, 379, 380, 381, 265, 265, 0, 266, 0, - 0, 0, 387, 0, 0, 0, 266, 0, 129, 0, - 0, 0, -199, -199, 130, -199, 0, 0, 0, -199, - 0, 131, 0, 267, 0, 400, 401, 402, 403, 128, - -199, 359, 0, -199, 0, 0, 0, 128, 35, 36, - 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, - 412, 0, 414, 416, 0, 129, 119, 0, 0, 0, - 129, 130, 0, 0, 229, 230, 130, 0, 131, 0, - 0, -199, -199, 131, 129, 129, 0, 0, 129, 0, - 130, 130, 0, 0, 130, 0, 0, 131, 131, 137, - 138, 131, 0, 0, 451, 0, 0, 17, 55, 0, - 266, 0, 266, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 150, 151, 152, 153, 154, - 0, 119, 0, 0, 0, 267, 0, 267, 0, 0, - 0, 128, 0, 128, 129, 0, 0, 0, 0, 0, - 130, 266, 129, 266, 266, 0, 0, 131, 130, 0, - 0, 0, 137, 138, 0, 131, 141, 142, 143, 144, - 145, 146, 17, 55, 266, 266, 267, 0, 359, 267, - 0, 0, 128, 0, 128, 128, 148, 34, 150, 151, - 152, 153, 154, 0, 0, 0, 0, 0, 0, 267, - 267, 0, 0, 0, 0, 128, 128, 0, 0, 0, - 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 110, - 111, 0, 0, 50, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 0, 129, 51, - 52, 0, 130, 0, 130, 0, 137, 138, 0, 131, - 0, 131, 143, 144, 145, 146, 53, 0, 0, 54, - 17, 55, 30, 56, 57, 58, 0, 0, 0, 0, - 0, 0, 150, 151, 152, 153, 154, 129, 0, 129, - 129, 0, 0, 130, 0, 130, 130, 0, 0, 0, - 131, 0, 131, 131, 0, 0, 0, 0, 0, 0, - 129, 129, 0, 0, 210, 0, 130, 130, 0, 0, - 0, 0, 211, 131, 131, 212, 213, 214, 0, 215, - 216, 217, 218, 0, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 0, 0, 0, 0, 163, - 228, 119, 0, 0, 0, 0, 0, 0, 210, 229, - 230, 0, 0, 0, 0, 0, 211, 0, 0, 212, - 213, 214, 0, 215, 216, 217, 218, 0, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 35, 36, 0, - 38, 0, 17, 55, 6, 42, 43, 44, 45, 0, - 0, 0, 0, 163, 313, 119, 0, 0, 0, 0, - 0, 0, 0, 229, 230, 0, 0, 0, 0, -200, - -200, 0, -200, 0, 0, 0, -200, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -200, 287, 0, - -200, 0, 0, 0, 0, 211, 17, 55, 212, 213, - 214, 0, 215, 216, 217, 218, 0, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, -200, -200, - 0, 0, 163, 0, 119, 0, 0, 0, 0, 0, - 0, 0, 229, 230, 0, 0, 0, 0, -201, -201, - 0, -201, 0, 0, 0, -201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -201, 348, 0, -201, - 0, 0, 0, 0, 211, 17, 55, 212, 213, 214, - 0, 215, 216, 217, 218, 0, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 35, 36, 0, 38, 34, - 0, 0, 6, 42, 43, 44, 45, -201, -201, 0, - 0, 163, 0, 119, 0, 0, 0, 0, 0, 0, - 0, 229, 230, 35, 36, 37, 38, 39, 40, 41, - 6, 42, 43, 44, 45, 46, 47, 48, 0, 0, - 0, 49, 0, 0, 0, 50, 0, 306, 0, 35, - 36, 0, 38, 0, 17, 55, 6, 0, 0, 0, - 0, 51, 52, 0, 34, 0, 0, 155, 0, 0, - 156, 0, 0, 0, 0, 0, 0, 0, 53, 0, - 0, 54, 17, 55, 30, 56, 57, 58, 35, 36, - 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, - 46, 47, 48, 0, 0, 0, 49, 0, 17, 55, - 50, 0, 0, -202, -202, 0, -202, 0, 0, 0, - -202, 0, 0, 0, 0, 0, 51, 52, 0, 34, - 0, -202, 0, 0, -202, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 0, 0, 54, 17, 55, 30, - 56, 57, 58, 35, 36, 37, 38, 39, 40, 41, - 6, 42, 43, 44, 45, 46, 47, 48, 0, 0, - 0, 110, -202, -202, 0, 50, 0, 320, 321, 0, - 322, 323, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 51, 52, 0, 0, 0, 0, 0, 0, 0, - 35, 36, 0, 38, 0, 0, 0, 6, 53, 0, - 0, 54, 17, 55, 30, 56, 57, 58, 155, 0, - 0, 182, 0, 0, 0, 0, 324, 325, 0, 0, + 16, 164, 114, 31, 365, 157, 6, 366, 367, 16, + 19, 20, 158, 1, 2, 3, 4, 5, 407, 26, + 6, 204, 294, 207, 98, 21, 33, 22, 6, 99, + 272, 100, 295, 275, 28, 101, 104, -213, -213, 103, + -213, 287, 102, 105, -213, 27, 178, 122, 408, 6, + 115, 160, 30, 132, 157, -213, 302, 29, -213, 7, + 133, 158, 30, 114, 160, 58, 290, 376, 377, -200, + -200, 297, 17, 55, 205, 17, 18, 347, 159, 350, + 17, 55, 178, 401, 178, 133, 410, 411, 178, 418, + 420, 178, 178, 210, 178, 178, -213, -213, 444, 165, + 97, 211, 7, 178, 212, 213, 214, 457, 215, 216, + 217, 218, 178, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 35, 36, 106, 38, 107, 159, 108, 6, + 42, 43, 44, 45, 133, -226, 458, 134, 163, 228, + 229, 178, 152, 153, 154, 459, 161, 358, 230, 231, + 178, 356, 365, 162, 123, 366, 367, 264, 163, -205, + -205, 209, -205, 270, -198, -198, -205, 166, 273, 167, + 133, 276, -199, -199, 374, 375, 168, -205, 169, 170, + -205, 17, 55, 284, 171, 150, 151, 152, 153, 154, + 35, 36, 172, 38, 181, 178, 157, 6, 42, 43, + 44, 45, 303, 158, 264, 179, 183, 160, 313, 264, + 270, 395, 205, 288, 397, 270, 293, 133, -205, -205, + 296, 298, 133, 122, 122, 122, 299, 59, 264, 318, + 270, 270, 300, 301, 270, 306, 133, 133, 133, 307, + 305, 133, 311, 312, 137, 138, 157, 157, 109, 17, + 55, 116, 117, 158, 158, 310, 323, 324, 325, 424, + 326, 426, 327, 423, 265, 328, 348, 351, 354, 159, + 150, 151, 152, 153, 154, 360, 133, 362, 121, 371, + 441, 372, 442, 379, 443, 264, 380, 381, 382, 394, + 396, 270, 400, 122, 398, 157, 404, 417, 133, 270, + 369, 460, 158, 402, 463, 406, 133, 173, 174, 419, + 177, 265, 431, 421, 445, 432, 265, 433, 180, 159, + 159, 447, 449, 465, 473, 474, 133, 133, 450, 451, + 123, 123, 123, 453, 455, 265, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 466, 461, 467, 468, + 470, 471, 472, 23, 24, 25, 271, 322, 159, 274, + 462, 122, 277, 412, 126, 133, 280, 318, 282, 0, + 304, 283, 0, 0, 133, 0, 0, 0, 0, 452, + 124, 454, 265, 456, 0, 0, 0, 264, 0, 264, + 123, 0, 0, 270, 0, 270, 0, 0, 430, 0, + 133, 292, 133, 0, 0, 125, 0, 0, 0, 0, + 0, 127, 35, 36, 309, 38, 0, 0, 0, 6, + 42, 43, 44, 45, 0, 0, 0, 0, 0, 264, + 119, 122, 264, 0, 0, 270, 128, 270, 270, 0, + 0, 0, 133, 0, 133, 133, 0, 0, 0, 0, + 0, 0, 264, 264, 0, 0, 0, 0, 270, 270, + -206, -206, 0, -206, 0, 133, 133, -206, 123, 0, + 0, 17, 55, 0, 0, 355, 0, 0, -206, 0, + 0, -206, 0, 0, 0, 129, 361, 0, 363, 0, + 267, 370, 0, 0, 265, 0, 265, 0, 0, 0, + 0, 0, 0, 283, 0, 0, 0, 0, 0, 0, + 130, 0, 0, 0, 0, 268, 0, 0, 378, -206, + -206, 269, 0, 0, 0, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 265, 267, 123, 265, + 0, 0, 267, 399, 131, 0, 128, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 316, 267, 267, 265, + 265, 267, 268, 0, 0, 0, 0, 268, 269, 413, + 414, 415, 416, 269, 0, 0, 0, 0, 0, 0, + 0, 317, 268, 268, 0, 0, 268, 127, 319, 320, + 0, 0, 269, 128, 425, 129, 427, 429, 128, 0, + 0, 137, 138, 0, 0, 141, 142, 143, 144, 145, + 146, 0, 128, 128, 128, 0, 0, 128, 267, 0, + 130, 0, 0, 0, 0, 148, 267, 150, 151, 152, + 153, 154, 0, 0, -207, -207, 0, -207, 0, 464, + 0, -207, 129, 268, 0, 0, 0, 129, 0, 269, + 0, 268, -207, 0, 131, -207, 0, 368, 0, 0, + 0, 129, 129, 129, 0, 0, 129, 130, 0, 0, + 0, 0, 130, 0, 128, 0, 0, -208, -208, 0, + -208, 0, 128, 0, -208, 0, 130, 130, 130, 0, + 0, 130, 0, -207, -207, -208, 0, 0, -208, 0, + 0, 131, 0, 0, 316, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 0, 0, 0, 0, 0, 0, 0, 211, 17, - 55, 212, 213, 214, 0, 215, 216, 217, 218, 0, + 131, 131, 131, 129, 0, 131, 0, 0, 0, 317, + 267, 129, 267, 0, 0, 127, -208, -208, 137, 138, + 0, 0, 141, 142, 143, 144, 145, 146, 130, 0, + 0, 0, 0, 0, 0, 268, 130, 268, 0, 0, + 128, 269, 0, 269, 150, 151, 152, 153, 154, 0, + 0, 0, 267, 0, 267, 267, 0, 0, 0, 0, + 35, 36, 131, 38, 0, 0, 128, 6, 128, 0, + 131, 0, 0, 0, 0, 267, 267, 268, 155, 268, + 268, 156, 0, 269, 0, 368, 269, 0, 0, 129, + 0, 0, 0, 0, 0, 0, 137, 138, 0, 0, + 268, 268, 143, 144, 145, 146, 269, 269, 128, 0, + 128, 128, 0, 0, 130, 129, 0, 129, 0, 17, + 55, 0, 150, 151, 152, 153, 154, 35, 36, 0, + 38, 128, 128, 0, 6, 42, 43, 44, 45, 0, + 130, 118, 130, 35, 36, 119, 38, 0, 131, 0, + 6, 42, 43, 44, 45, 0, 0, 129, 0, 129, + 129, 229, 0, 0, 0, 0, 0, 0, 0, 230, + 231, 0, 0, 0, 131, 0, 131, 0, 0, 0, + 129, 129, 130, 0, 130, 130, 17, 55, 0, 0, + 120, 121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 55, 0, 130, 130, 0, 0, 0, + 0, 0, 0, 0, -209, -209, 131, -209, 131, 131, + 0, -209, 0, 0, 0, 0, 0, 0, 0, 0, + 210, 0, -209, 0, 0, -209, 0, 0, 211, 131, + 131, 212, 213, 214, 0, 215, 216, 217, 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 227, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, -203, -203, 0, -203, 163, 0, 119, -203, 0, - -204, -204, 0, -204, 0, 229, 230, -204, 0, -203, - -205, -205, -203, -205, 0, 0, 0, -205, -204, 35, - 36, -204, 38, 0, 0, 0, 6, 0, -205, 0, - 0, -205, 0, 0, 0, 0, 0, 155, 17, 55, - 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -203, -203, 0, 0, 0, 0, 0, 0, 0, -204, - -204, 0, 0, 0, 0, 0, 0, 175, 0, -205, - -205, 0, 176, 0, 0, 0, 0, 136, 17, 55, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 422, 0, 0, 0, 0, 423, 0, 0, 0, - 0, 136, 0, 0, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 147, 148, 149, - 150, 151, 152, 153, 154, 424, 0, 0, 0, 0, - 425, 0, 0, 0, 0, 136, 0, 0, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 147, 148, 149, 150, 151, 152, 153, 154, 426, - 0, 0, 0, 0, 427, 0, 0, 0, 0, 136, - 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 276, 0, 147, 148, 149, 150, 151, - 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 277, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 136, 0, 0, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 175, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 136, 0, 0, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 391, 0, 147, 148, 149, - 150, 151, 152, 153, 154, 136, 0, 0, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, - 0, 147, 148, 149, 150, 151, 152, 153, 154, 136, - 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 397, 0, 147, 148, 149, 150, 151, - 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 409, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 136, 0, 0, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 421, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 136, 0, 0, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 433, 0, 147, 148, 149, - 150, 151, 152, 153, 154, 136, 0, 0, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 435, - 0, 147, 148, 149, 150, 151, 152, 153, 154, 136, - 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 456, 0, 147, 148, 149, 150, 151, - 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 279, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 284, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 337, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 340, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 343, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 344, 0, 0, + 45, 0, 0, -209, -209, 163, 321, 229, 0, 0, + 0, 0, 0, 0, 0, 230, 231, 0, 0, 0, + 0, -210, -210, 0, -210, 0, 0, 0, -210, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -210, + 289, 0, -210, 0, 0, 0, 0, 211, 17, 55, + 212, 213, 214, 0, 215, 216, 217, 218, 0, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 35, 36, + 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, + -210, -210, 0, 0, 163, 0, 229, 0, 0, 0, + 0, 0, 0, 0, 230, 231, 0, 0, 0, 0, + -211, -211, 0, -211, 0, 0, 0, -211, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -211, 357, + 0, -211, 0, 0, 0, 0, 211, 17, 55, 212, + 213, 214, 0, 215, 216, 217, 218, 0, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 35, 36, 0, + 38, 34, 0, 0, 6, 42, 43, 44, 45, -211, + -211, 0, 0, 163, 0, 229, 0, 0, 0, 0, + 0, 0, 0, 230, 231, 35, 36, 37, 38, 39, + 40, 41, 6, 42, 43, 44, 45, 46, 47, 48, + 0, 0, 0, 110, 111, 0, 0, 50, 0, 0, + 0, -212, -212, 0, -212, 0, 17, 55, -212, 0, + 0, 0, 0, 51, 52, 0, 34, 0, 0, -212, + 0, 0, -212, 0, 0, 0, 0, 0, 0, 0, + 53, 0, 0, 54, 17, 55, 30, 56, 57, 58, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 47, 48, 0, 0, 0, 49, 0, + -212, -212, 50, 0, 308, 35, 36, 0, 38, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 51, 52, + 0, 34, 0, 155, 0, 0, 182, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 0, 0, 54, 17, + 55, 30, 56, 57, 58, 35, 36, 37, 38, 39, + 40, 41, 6, 42, 43, 44, 45, 46, 47, 48, + 281, 0, 0, 49, 17, 55, 136, 50, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 51, 52, 0, 34, 0, 0, 0, + 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 53, 0, 0, 54, 17, 55, 30, 56, 57, 58, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 47, 48, 0, 0, 0, 110, 0, + 0, 0, 50, 0, 329, 330, 0, 331, 332, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 52, + 0, 0, 0, 0, 0, 0, 0, 35, 36, 0, + 38, 0, 0, 0, 6, 53, 0, 0, 54, 17, + 55, 30, 56, 57, 58, 155, 0, 0, 182, 0, + 0, 0, 0, 333, 334, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, + 0, 0, 0, 0, 0, 211, 17, 55, 212, 213, + 214, 0, 215, 216, 217, 218, 0, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 35, 36, 0, 38, + 0, 0, 0, 6, 42, 43, 44, 45, 0, 0, + 0, 0, 163, 0, 229, 0, 0, 35, 36, 0, + 38, 0, 230, 231, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 155, 0, 0, 182, 0, + 0, 0, 0, 333, 334, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 55, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 175, 0, + 0, 0, 0, 176, 0, 0, 17, 55, 136, 0, + 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 435, 0, 0, 0, 0, 436, 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 148, - 149, 150, 151, 152, 153, 154, 283, 0, 136, 0, + 149, 150, 151, 152, 153, 154, 437, 0, 0, 0, + 0, 438, 0, 0, 0, 0, 136, 0, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 439, 0, 0, 0, 0, 440, 0, 0, 0, 0, + 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 278, 0, 147, 148, 149, 150, + 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 279, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, - 153, 154, 135, 136, 0, 0, 137, 138, 139, 140, + 0, 0, 175, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 136, 0, 0, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 403, 0, 147, 148, + 149, 150, 151, 152, 153, 154, 136, 0, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 405, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 409, 0, 147, 148, 149, 150, + 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 136, 0, + 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 434, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 136, 0, 0, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 446, 0, 147, 148, + 149, 150, 151, 152, 153, 154, 136, 0, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 448, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 469, 0, 147, 148, 149, 150, + 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 286, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 346, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 349, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 352, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 353, 0, + 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 350, 136, 0, - 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, - 153, 154, 364, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 136, 0, 0, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 0, 0, 0, - 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, - 137, 138, 0, 140, 141, 142, 143, 144, 145, 146, - 137, 138, 0, 0, 141, 142, 143, 144, 145, 146, + 148, 149, 150, 151, 152, 153, 154, 285, 0, 136, + 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 147, 148, 149, 150, 151, + 152, 153, 154, 135, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 359, 136, + 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 147, 148, 149, 150, 151, + 152, 153, 154, 373, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 136, 0, 0, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 0, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 137, 138, 0, 0, 141, 142, 143, 144, 145, + 154, 137, 138, 0, 140, 141, 142, 143, 144, 145, 146, 137, 138, 0, 0, 141, 142, 143, 144, 145, - 146, 0, 0, 0, 0, 148, 149, 150, 151, 152, - 153, 154, 0, 0, 0, 0, 0, 150, 151, 152, - 153, 154 + 146, 0, 0, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 0, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 137, 138, 0, 0, 141, 142, 143, 144, + 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 148, 149, 150, 151, + 152, 153, 154 }; const short parser::yycheck_[] = { - 0, 98, 21, 297, 49, 78, 297, 54, 297, 9, - 3, 4, 11, 12, 13, 14, 15, 64, 78, 30, - 40, 41, 53, 43, 47, 54, 26, 47, 48, 49, - 50, 51, 54, 47, 54, 35, 36, 0, 58, 64, - 47, 58, 35, 36, 101, 47, 95, 53, 47, 60, - 50, 58, 101, 53, 127, 104, 58, 55, 80, 55, - 53, 55, 60, 55, 60, 110, 60, 127, 60, 40, - 41, 55, 43, 99, 100, 64, 47, 100, 78, 99, - 100, 54, 54, 103, 104, 78, 100, 58, 100, 55, - 61, 56, 99, 100, 60, 66, 67, 99, 100, 99, - 55, 100, 55, 55, 62, 60, 62, 60, 60, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 55, 55, 96, 97, 98, 60, 60, 127, 99, 100, - 55, 55, 163, 53, 127, 60, 60, 55, 64, 58, - 434, 54, 60, 434, 160, 434, 40, 41, 62, 43, - 58, 167, 54, 47, 170, 62, 60, 163, 58, 58, - 54, 161, 59, 163, 58, 54, 62, 61, 168, 100, - 163, 171, 54, 64, 54, 40, 41, 54, 43, 210, - 54, 54, 47, 183, 215, 94, 95, 96, 97, 98, - 54, 63, 54, 58, 267, 64, 61, 64, 229, 230, - 54, 220, 233, 64, 210, 99, 100, 267, 64, 215, - 210, 64, 64, 64, 64, 215, 54, 210, 54, 59, - 55, 27, 215, 229, 230, 27, 104, 233, 54, 229, - 230, 63, 63, 233, 99, 100, 229, 230, 311, 312, - 233, 54, 54, 163, 54, 59, 48, 54, 59, 51, - 52, 311, 312, 54, 59, 64, 64, 54, 289, 54, - 54, 64, 25, 30, 64, 64, 297, 267, 64, 55, - 286, 64, 64, 64, 267, 64, 55, 210, 55, 55, - 64, 64, 215, 289, 64, 9, 359, 9, 9, 289, - 210, 297, 233, 309, 310, 215, 289, 297, 298, 359, - 397, 434, 53, 53, 297, 107, 108, -1, 110, 229, - 230, 311, 312, 233, 220, -1, 118, -1, 311, 312, - -1, -1, -1, 339, -1, -1, 342, 53, -1, -1, - -1, -1, -1, 53, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, -1, -1, 289, -1, -1, 359, - 391, -1, 393, -1, 166, -1, 359, 169, -1, 289, - 172, -1, 388, -1, 176, -1, 178, 297, 423, 181, - 425, -1, 427, -1, -1, 391, -1, 393, 404, -1, - 406, 391, 408, 393, -1, -1, 396, -1, 391, -1, - 393, 432, -1, 434, 435, -1, -1, -1, -1, 211, - -1, -1, 163, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 224, -1, 455, 456, 432, -1, 434, 435, - -1, -1, 432, -1, 434, 435, -1, 163, 53, 432, - -1, 434, 435, 163, 53, -1, -1, -1, -1, 455, - 456, 53, -1, -1, -1, 455, 456, -1, 391, 210, - 393, -1, 455, 456, 215, -1, -1, -1, -1, -1, - -1, 391, -1, 393, -1, -1, -1, -1, 229, 230, - -1, 283, 233, -1, 210, -1, -1, -1, -1, 215, - 210, -1, 294, -1, 296, 215, -1, 299, -1, 432, - -1, -1, 435, 229, 230, -1, -1, 233, -1, 229, - 230, -1, 432, 233, 434, 435, -1, -1, -1, -1, - -1, -1, 455, 456, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 455, 456, -1, 289, -1, - -1, -1, 344, -1, -1, -1, 297, -1, 163, -1, - -1, -1, 40, 41, 163, 43, -1, -1, -1, 47, - -1, 163, -1, 289, -1, 367, 368, 369, 370, 289, - 58, 297, -1, 61, -1, -1, -1, 297, 40, 41, - -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, - 392, -1, 394, 395, -1, 210, 58, -1, -1, -1, - 215, 210, -1, -1, 66, 67, 215, -1, 210, -1, - -1, 99, 100, 215, 229, 230, -1, -1, 233, -1, - 229, 230, -1, -1, 233, -1, -1, 229, 230, 68, - 69, 233, -1, -1, 436, -1, -1, 99, 100, -1, - 391, -1, 393, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, 94, 95, 96, 97, 98, - -1, 58, -1, -1, -1, 391, -1, 393, -1, -1, - -1, 391, -1, 393, 289, -1, -1, -1, -1, -1, - 289, 432, 297, 434, 435, -1, -1, 289, 297, -1, - -1, -1, 68, 69, -1, 297, 72, 73, 74, 75, - 76, 77, 99, 100, 455, 456, 432, -1, 434, 435, - -1, -1, 432, -1, 434, 435, 92, 16, 94, 95, - 96, 97, 98, -1, -1, -1, -1, -1, -1, 455, - 456, -1, -1, -1, -1, 455, 456, -1, -1, -1, - -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, -1, -1, -1, 58, - 59, -1, -1, 62, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 391, -1, 393, 78, - 79, -1, 391, -1, 393, -1, 68, 69, -1, 391, - -1, 393, 74, 75, 76, 77, 95, -1, -1, 98, - 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, - -1, -1, 94, 95, 96, 97, 98, 432, -1, 434, - 435, -1, -1, 432, -1, 434, 435, -1, -1, -1, - 432, -1, 434, 435, -1, -1, -1, -1, -1, -1, - 455, 456, -1, -1, 11, -1, 455, 456, -1, -1, - -1, -1, 19, 455, 456, 22, 23, 24, -1, 26, - 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, -1, -1, -1, -1, 56, - 57, 58, -1, -1, -1, -1, -1, -1, 11, 66, - 67, -1, -1, -1, -1, -1, 19, -1, -1, 22, - 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, - 43, -1, 99, 100, 47, 48, 49, 50, 51, -1, - -1, -1, -1, 56, 57, 58, -1, -1, -1, -1, - -1, -1, -1, 66, 67, -1, -1, -1, -1, 40, - 41, -1, 43, -1, -1, -1, 47, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 58, 12, -1, - 61, -1, -1, -1, -1, 19, 99, 100, 22, 23, - 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, - -1, -1, -1, 47, 48, 49, 50, 51, 99, 100, - -1, -1, 56, -1, 58, -1, -1, -1, -1, -1, - -1, -1, 66, 67, -1, -1, -1, -1, 40, 41, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 58, 12, -1, 61, - -1, -1, -1, -1, 19, 99, 100, 22, 23, 24, - -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, -1, 43, 16, - -1, -1, 47, 48, 49, 50, 51, 99, 100, -1, - -1, 56, -1, 58, -1, -1, -1, -1, -1, -1, - -1, 66, 67, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, -1, -1, - -1, 58, -1, -1, -1, 62, -1, 64, -1, 40, - 41, -1, 43, -1, 99, 100, 47, -1, -1, -1, - -1, 78, 79, -1, 16, -1, -1, 58, -1, -1, - 61, -1, -1, -1, -1, -1, -1, -1, 95, -1, - -1, 98, 99, 100, 101, 102, 103, 104, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, -1, -1, -1, 58, -1, 99, 100, - 62, -1, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, 78, 79, -1, 16, - -1, 58, -1, -1, 61, -1, -1, -1, -1, -1, - -1, -1, -1, 95, -1, -1, 98, 99, 100, 101, - 102, 103, 104, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, -1, -1, - -1, 58, 99, 100, -1, 62, -1, 17, 18, -1, - 20, 21, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 78, 79, -1, -1, -1, -1, -1, -1, -1, - 40, 41, -1, 43, -1, -1, -1, 47, 95, -1, - -1, 98, 99, 100, 101, 102, 103, 104, 58, -1, - -1, 61, -1, -1, -1, -1, 66, 67, -1, -1, + 0, 98, 49, 21, 299, 78, 47, 299, 299, 9, + 3, 4, 78, 11, 12, 13, 14, 15, 30, 54, + 47, 47, 54, 160, 55, 54, 26, 0, 47, 60, + 167, 58, 64, 170, 64, 35, 36, 40, 41, 58, + 43, 55, 35, 36, 47, 80, 60, 53, 60, 47, + 50, 54, 101, 53, 127, 58, 95, 64, 61, 100, + 53, 127, 101, 110, 54, 104, 210, 59, 60, 59, + 60, 215, 99, 100, 100, 99, 100, 55, 78, 55, + 99, 100, 60, 55, 60, 78, 55, 55, 60, 55, + 55, 60, 60, 11, 60, 60, 99, 100, 55, 99, + 55, 19, 100, 60, 22, 23, 24, 55, 26, 27, + 28, 29, 60, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 58, 43, 54, 127, 54, 47, + 48, 49, 50, 51, 127, 62, 55, 100, 56, 57, + 58, 60, 96, 97, 98, 55, 62, 291, 66, 67, + 60, 288, 447, 64, 53, 447, 447, 163, 56, 40, + 41, 161, 43, 163, 59, 60, 47, 58, 168, 54, + 163, 171, 59, 60, 311, 312, 62, 58, 58, 54, + 61, 99, 100, 183, 62, 94, 95, 96, 97, 98, + 40, 41, 58, 43, 58, 60, 269, 47, 48, 49, + 50, 51, 220, 269, 210, 59, 62, 54, 58, 215, + 210, 348, 100, 54, 351, 215, 64, 210, 99, 100, + 54, 54, 215, 229, 230, 231, 54, 27, 234, 229, + 230, 231, 54, 54, 234, 64, 229, 230, 231, 64, + 63, 234, 54, 54, 68, 69, 319, 320, 48, 99, + 100, 51, 52, 319, 320, 64, 64, 64, 64, 403, + 64, 405, 64, 400, 163, 80, 54, 54, 59, 269, + 94, 95, 96, 97, 98, 55, 269, 27, 104, 63, + 417, 63, 419, 54, 421, 291, 54, 54, 54, 59, + 59, 291, 54, 299, 59, 368, 54, 54, 291, 299, + 300, 445, 368, 64, 448, 64, 299, 107, 108, 54, + 110, 210, 409, 54, 25, 64, 215, 64, 118, 319, + 320, 64, 30, 55, 468, 469, 319, 320, 64, 64, + 229, 230, 231, 64, 64, 234, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 55, 64, 55, 55, + 64, 64, 64, 9, 9, 9, 166, 234, 368, 169, + 447, 377, 172, 377, 53, 368, 176, 377, 178, -1, + 220, 181, -1, -1, 377, -1, -1, -1, -1, 436, + 53, 438, 291, 440, -1, -1, -1, 403, -1, 405, + 299, -1, -1, 403, -1, 405, -1, -1, 408, -1, + 403, 211, 405, -1, -1, 53, -1, -1, -1, -1, + -1, 53, 40, 41, 224, 43, -1, -1, -1, 47, + 48, 49, 50, 51, -1, -1, -1, -1, -1, 445, + 58, 447, 448, -1, -1, 445, 53, 447, 448, -1, + -1, -1, 445, -1, 447, 448, -1, -1, -1, -1, + -1, -1, 468, 469, -1, -1, -1, -1, 468, 469, + 40, 41, -1, 43, -1, 468, 469, 47, 377, -1, + -1, 99, 100, -1, -1, 285, -1, -1, 58, -1, + -1, 61, -1, -1, -1, 53, 296, -1, 298, -1, + 163, 301, -1, -1, 403, -1, 405, -1, -1, -1, + -1, -1, -1, 313, -1, -1, -1, -1, -1, -1, + 53, -1, -1, -1, -1, 163, -1, -1, 328, 99, + 100, 163, -1, -1, -1, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 445, 210, 447, 448, + -1, -1, 215, 353, 53, -1, 163, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 229, 230, 231, 468, + 469, 234, 210, -1, -1, -1, -1, 215, 210, 379, + 380, 381, 382, 215, -1, -1, -1, -1, -1, -1, + -1, 229, 230, 231, -1, -1, 234, 229, 230, 231, + -1, -1, 234, 210, 404, 163, 406, 407, 215, -1, + -1, 68, 69, -1, -1, 72, 73, 74, 75, 76, + 77, -1, 229, 230, 231, -1, -1, 234, 291, -1, + 163, -1, -1, -1, -1, 92, 299, 94, 95, 96, + 97, 98, -1, -1, 40, 41, -1, 43, -1, 449, + -1, 47, 210, 291, -1, -1, -1, 215, -1, 291, + -1, 299, 58, -1, 163, 61, -1, 299, -1, -1, + -1, 229, 230, 231, -1, -1, 234, 210, -1, -1, + -1, -1, 215, -1, 291, -1, -1, 40, 41, -1, + 43, -1, 299, -1, 47, -1, 229, 230, 231, -1, + -1, 234, -1, 99, 100, 58, -1, -1, 61, -1, + -1, 210, -1, -1, 377, -1, 215, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, -1, -1, -1, -1, -1, -1, 19, 99, - 100, 22, 23, 24, -1, 26, 27, 28, 29, -1, + 229, 230, 231, 291, -1, 234, -1, -1, -1, 377, + 403, 299, 405, -1, -1, 377, 99, 100, 68, 69, + -1, -1, 72, 73, 74, 75, 76, 77, 291, -1, + -1, -1, -1, -1, -1, 403, 299, 405, -1, -1, + 377, 403, -1, 405, 94, 95, 96, 97, 98, -1, + -1, -1, 445, -1, 447, 448, -1, -1, -1, -1, + 40, 41, 291, 43, -1, -1, 403, 47, 405, -1, + 299, -1, -1, -1, -1, 468, 469, 445, 58, 447, + 448, 61, -1, 445, -1, 447, 448, -1, -1, 377, + -1, -1, -1, -1, -1, -1, 68, 69, -1, -1, + 468, 469, 74, 75, 76, 77, 468, 469, 445, -1, + 447, 448, -1, -1, 377, 403, -1, 405, -1, 99, + 100, -1, 94, 95, 96, 97, 98, 40, 41, -1, + 43, 468, 469, -1, 47, 48, 49, 50, 51, -1, + 403, 54, 405, 40, 41, 58, 43, -1, 377, -1, + 47, 48, 49, 50, 51, -1, -1, 445, -1, 447, + 448, 58, -1, -1, -1, -1, -1, -1, -1, 66, + 67, -1, -1, -1, 403, -1, 405, -1, -1, -1, + 468, 469, 445, -1, 447, 448, 99, 100, -1, -1, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 99, 100, -1, 468, 469, -1, -1, -1, + -1, -1, -1, -1, 40, 41, 445, 43, 447, 448, + -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, + 11, -1, 58, -1, -1, 61, -1, -1, 19, 468, + 469, 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, 40, 41, -1, 43, 56, -1, 58, 47, -1, - 40, 41, -1, 43, -1, 66, 67, 47, -1, 58, - 40, 41, 61, 43, -1, -1, -1, 47, 58, 40, - 41, 61, 43, -1, -1, -1, 47, -1, 58, -1, - -1, 61, -1, -1, -1, -1, -1, 58, 99, 100, - 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 99, 100, -1, -1, -1, -1, -1, -1, -1, 99, - 100, -1, -1, -1, -1, -1, -1, 55, -1, 99, - 100, -1, 60, -1, -1, -1, -1, 65, 99, 100, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 55, -1, -1, -1, -1, 60, -1, -1, -1, - -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 91, 92, 93, - 94, 95, 96, 97, 98, 55, -1, -1, -1, -1, - 60, -1, -1, -1, -1, 65, -1, -1, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, 92, 93, 94, 95, 96, 97, 98, 55, - -1, -1, -1, -1, 60, -1, -1, -1, -1, 65, - -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 55, -1, 91, 92, 93, 94, 95, - 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 55, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 65, -1, -1, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 55, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 65, -1, -1, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 55, -1, 91, 92, 93, - 94, 95, 96, 97, 98, 65, -1, -1, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, - -1, 91, 92, 93, 94, 95, 96, 97, 98, 65, - -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 55, -1, 91, 92, 93, 94, 95, - 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 55, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 65, -1, -1, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 55, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 65, -1, -1, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 55, -1, 91, 92, 93, - 94, 95, 96, 97, 98, 65, -1, -1, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, - -1, 91, 92, 93, 94, 95, 96, 97, 98, 65, - -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 55, -1, 91, 92, 93, 94, 95, - 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 60, -1, -1, + 51, -1, -1, 99, 100, 56, 57, 58, -1, -1, + -1, -1, -1, -1, -1, 66, 67, -1, -1, -1, + -1, 40, 41, -1, 43, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, + 12, -1, 61, -1, -1, -1, -1, 19, 99, 100, + 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, + 99, 100, -1, -1, 56, -1, 58, -1, -1, -1, + -1, -1, -1, -1, 66, 67, -1, -1, -1, -1, + 40, 41, -1, 43, -1, -1, -1, 47, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 58, 12, + -1, 61, -1, -1, -1, -1, 19, 99, 100, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, 16, -1, -1, 47, 48, 49, 50, 51, 99, + 100, -1, -1, 56, -1, 58, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + -1, -1, -1, 58, 59, -1, -1, 62, -1, -1, + -1, 40, 41, -1, 43, -1, 99, 100, 47, -1, + -1, -1, -1, 78, 79, -1, 16, -1, -1, 58, + -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, -1, -1, -1, 58, -1, + 99, 100, 62, -1, 64, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, 78, 79, + -1, 16, -1, 58, -1, -1, 61, -1, -1, -1, + -1, -1, -1, -1, -1, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 59, -1, -1, 58, 99, 100, 65, 62, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, 78, 79, -1, 16, -1, -1, -1, + -1, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, -1, -1, -1, 58, -1, + -1, -1, 62, -1, 17, 18, -1, 20, 21, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, + -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, -1, -1, -1, 47, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, 58, -1, -1, 61, -1, + -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, -1, -1, + -1, -1, -1, -1, -1, 19, 99, 100, 22, 23, + 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, + -1, -1, -1, 47, 48, 49, 50, 51, -1, -1, + -1, -1, 56, -1, 58, -1, -1, 40, 41, -1, + 43, -1, 66, 67, 47, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 58, -1, -1, 61, -1, + -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 99, 100, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 55, -1, + -1, -1, -1, 60, -1, -1, 99, 100, 65, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 55, -1, -1, -1, -1, 60, -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, 92, - 93, 94, 95, 96, 97, 98, 63, -1, 65, -1, + 93, 94, 95, 96, 97, 98, 55, -1, -1, -1, + -1, 60, -1, -1, -1, -1, 65, -1, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 55, -1, -1, -1, -1, 60, -1, -1, -1, -1, + 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 55, -1, 91, 92, 93, 94, + 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, - 97, 98, 64, 65, -1, -1, 68, 69, 70, 71, + -1, -1, 55, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 65, -1, -1, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 55, -1, 91, 92, + 93, 94, 95, 96, 97, 98, 65, -1, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 55, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 55, -1, 91, 92, 93, 94, + 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 65, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 55, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 65, -1, -1, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 55, -1, 91, 92, + 93, 94, 95, 96, 97, 98, 65, -1, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 55, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 55, -1, 91, 92, 93, 94, + 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 60, -1, + -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 64, 65, -1, - -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, - 97, 98, 64, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 65, -1, -1, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 91, - 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, - -1, -1, 91, 92, 93, 94, 95, 96, 97, 98, - 68, 69, -1, 71, 72, 73, 74, 75, 76, 77, - 68, 69, -1, -1, 72, 73, 74, 75, 76, 77, + 92, 93, 94, 95, 96, 97, 98, 63, -1, 65, + -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 91, 92, 93, 94, 95, + 96, 97, 98, 64, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 64, 65, + -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 91, 92, 93, 94, 95, + 96, 97, 98, 64, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 65, -1, -1, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, - 98, -1, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 68, 69, -1, -1, 72, 73, 74, 75, 76, + 98, 68, 69, -1, 71, 72, 73, 74, 75, 76, 77, 68, 69, -1, -1, 72, 73, 74, 75, 76, - 77, -1, -1, -1, -1, 92, 93, 94, 95, 96, - 97, 98, -1, -1, -1, -1, -1, 94, 95, 96, - 97, 98 + 77, -1, -1, -1, 91, 92, 93, 94, 95, 96, + 97, 98, -1, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 68, 69, -1, -1, 72, 73, 74, 75, + 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 92, 93, 94, 95, + 96, 97, 98 }; const unsigned char parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 47, 100, 116, 117, - 118, 119, 120, 121, 122, 123, 192, 99, 100, 193, - 193, 54, 0, 118, 119, 120, 54, 80, 64, 64, - 101, 195, 171, 192, 16, 40, 41, 42, 43, 44, + 118, 119, 120, 121, 122, 123, 195, 99, 100, 196, + 196, 54, 0, 118, 119, 120, 54, 80, 64, 64, + 101, 198, 171, 195, 16, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 58, 62, 78, 79, 95, 98, 100, 102, 103, 104, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 55, 55, 60, - 58, 192, 193, 58, 192, 193, 58, 54, 54, 155, - 58, 59, 155, 172, 173, 192, 155, 155, 54, 58, - 103, 104, 166, 167, 177, 178, 180, 181, 185, 186, - 187, 188, 192, 193, 100, 64, 65, 68, 69, 70, + 170, 174, 175, 176, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 55, 55, 60, + 58, 195, 196, 58, 195, 196, 58, 54, 54, 155, + 58, 59, 155, 172, 173, 195, 155, 155, 54, 58, + 103, 104, 166, 167, 180, 181, 183, 184, 188, 189, + 190, 191, 195, 196, 100, 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 91, 92, 93, - 94, 95, 96, 97, 98, 58, 61, 168, 169, 192, - 54, 62, 64, 56, 129, 192, 58, 54, 62, 58, + 94, 95, 96, 97, 98, 58, 61, 168, 169, 195, + 54, 62, 64, 56, 129, 195, 58, 54, 62, 58, 54, 62, 58, 155, 155, 55, 60, 155, 60, 59, 155, 58, 61, 62, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 47, 100, 191, 172, 173, 192, + 155, 155, 155, 155, 47, 100, 194, 172, 173, 195, 11, 19, 22, 23, 24, 26, 27, 28, 29, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 57, 66, - 67, 124, 125, 127, 128, 129, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 157, 158, 159, 166, 167, 177, 178, 181, 192, 155, - 172, 192, 155, 172, 192, 155, 55, 55, 155, 59, - 155, 155, 192, 63, 59, 55, 54, 12, 124, 126, - 155, 64, 54, 64, 54, 124, 54, 54, 54, 54, - 95, 195, 198, 63, 64, 64, 64, 155, 64, 54, - 54, 181, 181, 57, 125, 64, 64, 64, 64, 64, - 17, 18, 20, 21, 66, 67, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 59, 55, 54, - 59, 55, 54, 59, 60, 59, 155, 172, 12, 124, - 64, 55, 155, 27, 155, 130, 157, 158, 159, 181, - 192, 155, 63, 63, 64, 172, 172, 54, 54, 54, - 54, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 59, 172, 59, 172, 59, 155, 54, 55, - 64, 55, 54, 55, 64, 30, 60, 55, 55, 55, - 155, 155, 155, 155, 54, 55, 54, 55, 54, 55, - 172, 124, 155, 124, 155, 156, 155, 192, 129, 64, - 64, 55, 55, 60, 55, 60, 55, 60, 172, 172, - 172, 55, 25, 55, 64, 55, 30, 64, 64, 173, - 64, 173, 64, 173, 55, 55, 55, 124, 64, 130, - 124, 155, 55, 55, 55, 55, 55, 64, 64, 64, - 124, 124 + 32, 33, 34, 35, 36, 37, 38, 39, 57, 58, + 66, 67, 124, 125, 127, 128, 129, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 157, 158, 159, 166, 167, 177, 180, 181, 184, + 195, 155, 172, 195, 155, 172, 195, 155, 55, 55, + 155, 59, 155, 155, 195, 63, 59, 55, 54, 12, + 124, 126, 155, 64, 54, 64, 54, 124, 54, 54, + 54, 54, 95, 198, 201, 63, 64, 64, 64, 155, + 64, 54, 54, 58, 178, 179, 180, 181, 195, 184, + 184, 57, 125, 64, 64, 64, 64, 64, 80, 17, + 18, 20, 21, 66, 67, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 59, 55, 54, 59, + 55, 54, 59, 60, 59, 155, 172, 12, 124, 64, + 55, 155, 27, 155, 130, 157, 158, 159, 184, 195, + 155, 63, 63, 64, 172, 172, 59, 60, 155, 54, + 54, 54, 54, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 59, 172, 59, 172, 59, 155, + 54, 55, 64, 55, 54, 55, 64, 30, 60, 55, + 55, 55, 179, 155, 155, 155, 155, 54, 55, 54, + 55, 54, 55, 172, 124, 155, 124, 155, 156, 155, + 195, 129, 64, 64, 55, 55, 60, 55, 60, 55, + 60, 172, 172, 172, 55, 25, 55, 64, 55, 30, + 64, 64, 173, 64, 173, 64, 173, 55, 55, 55, + 124, 64, 130, 124, 155, 55, 55, 55, 55, 55, + 64, 64, 64, 124, 124 }; const unsigned char @@ -4608,19 +4696,20 @@ namespace xsk { namespace gsc { namespace iw8 { 137, 137, 138, 139, 139, 140, 141, 142, 143, 144, 145, 145, 146, 147, 147, 148, 149, 150, 151, 151, 152, 153, 154, 155, 155, 155, 156, 156, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, - 158, 159, 159, 160, 161, 161, 161, 161, 161, 161, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 158, 158, 159, 159, 160, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 162, 162, 162, 162, 162, 162, 162, 162, + 161, 161, 161, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 163, 164, 164, 164, 164, 165, 166, 166, - 167, 167, 168, 168, 168, 168, 168, 168, 169, 169, - 169, 169, 170, 171, 171, 171, 172, 172, 173, 173, - 174, 175, 176, 176, 177, 178, 179, 180, 181, 181, - 181, 181, 181, 181, 181, 181, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 192, 193, - 193, 194, 195, 196, 197, 197, 198, 198, 199, 200 + 162, 162, 162, 163, 164, 164, 164, 164, 165, 166, + 166, 167, 167, 168, 168, 168, 168, 168, 168, 169, + 169, 169, 169, 170, 171, 171, 171, 172, 172, 173, + 173, 174, 175, 176, 176, 177, 178, 178, 179, 179, + 179, 180, 181, 182, 183, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 195, 196, 196, 197, 198, + 199, 200, 200, 201, 201, 202, 203 }; const signed char @@ -4636,19 +4725,20 @@ namespace xsk { namespace gsc { namespace iw8 { 8, 6, 2, 2, 4, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, - 2, 2, 4, 6, 5, 7, 5, 7, 8, 9, - 9, 9, 3, 3, 1, 0, 1, 0, 3, 1, - 4, 4, 2, 3, 4, 3, 3, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 7, 2, 1, 2, 1, 1, 1 + 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, + 1, 2, 2, 4, 6, 5, 7, 5, 7, 8, + 9, 9, 9, 3, 3, 1, 0, 1, 0, 3, + 1, 4, 4, 2, 3, 3, 3, 1, 1, 1, + 1, 4, 3, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 7, 2, 1, 2, 1, 1, 1 }; @@ -4658,29 +4748,30 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yyrline_[] = { - 0, 264, 264, 265, 269, 271, 273, 275, 277, 279, - 284, 288, 293, 294, 295, 296, 297, 301, 306, 311, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 337, 338, 339, 340, 344, 345, 349, 351, 356, - 358, 363, 364, 368, 369, 373, 375, 377, 380, 384, - 386, 391, 393, 395, 400, 405, 407, 412, 417, 419, - 424, 426, 431, 436, 438, 443, 448, 453, 458, 463, - 468, 470, 475, 480, 482, 487, 492, 497, 502, 504, - 509, 514, 519, 524, 525, 526, 530, 531, 535, 537, - 539, 541, 543, 545, 547, 549, 551, 553, 555, 560, - 562, 567, 569, 574, 579, 581, 583, 585, 587, 589, - 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, - 611, 613, 618, 619, 620, 621, 622, 623, 624, 625, - 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, - 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, - 646, 647, 651, 656, 658, 660, 662, 667, 672, 673, - 676, 677, 681, 683, 685, 687, 689, 691, 696, 698, - 700, 702, 707, 712, 714, 717, 721, 724, 728, 730, - 735, 740, 745, 747, 752, 757, 762, 767, 772, 773, - 774, 775, 776, 777, 778, 779, 780, 784, 789, 794, - 799, 804, 809, 814, 819, 824, 829, 834, 836, 841, - 843, 848, 853, 858, 863, 865, 870, 872, 877, 882 + 0, 267, 267, 268, 272, 274, 276, 278, 280, 282, + 287, 291, 296, 297, 298, 299, 300, 304, 309, 314, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 347, 348, 352, 354, 359, + 361, 366, 367, 371, 372, 376, 378, 380, 383, 387, + 389, 394, 396, 398, 403, 408, 410, 415, 420, 422, + 427, 429, 434, 439, 441, 446, 451, 456, 461, 466, + 471, 473, 478, 483, 485, 490, 495, 500, 505, 507, + 512, 517, 522, 527, 528, 529, 533, 534, 538, 540, + 542, 544, 546, 548, 550, 552, 554, 556, 558, 560, + 565, 567, 572, 574, 579, 584, 586, 588, 590, 592, + 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, + 614, 616, 618, 623, 624, 625, 626, 627, 628, 629, + 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, + 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, + 650, 651, 652, 656, 661, 663, 665, 667, 672, 677, + 678, 681, 682, 686, 688, 690, 692, 694, 696, 701, + 703, 705, 707, 712, 717, 719, 722, 726, 729, 733, + 735, 740, 745, 750, 752, 757, 762, 764, 769, 770, + 771, 775, 780, 785, 790, 795, 796, 797, 798, 799, + 800, 801, 802, 803, 807, 812, 817, 822, 827, 832, + 837, 842, 847, 852, 857, 859, 864, 866, 871, 876, + 881, 886, 888, 893, 895, 900, 905 }; void @@ -4713,9 +4804,9 @@ namespace xsk { namespace gsc { namespace iw8 { #line 13 "parser.ypp" } } } // xsk::gsc::iw8 -#line 4717 "parser.cpp" +#line 4808 "parser.cpp" -#line 886 "parser.ypp" +#line 909 "parser.ypp" void xsk::gsc::iw8::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/iw8/xsk/parser.hpp b/src/iw8/xsk/parser.hpp index 0365fd5f..a87f5b61 100644 --- a/src/iw8/xsk/parser.hpp +++ b/src/iw8/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace iw8 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -544,104 +546,107 @@ namespace xsk { namespace gsc { namespace iw8 { // expr_true char dummy37[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy38[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy38[sizeof (ast::expr_undefined::ptr)]; + char dummy39[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy39[sizeof (ast::expr_vector::ptr)]; + char dummy40[sizeof (ast::expr_vector::ptr)]; // include - char dummy40[sizeof (ast::include::ptr)]; + char dummy41[sizeof (ast::include::ptr)]; // program - char dummy41[sizeof (ast::program::ptr)]; + char dummy42[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy42[sizeof (ast::stmt)]; + char dummy43[sizeof (ast::stmt)]; // stmt_assign - char dummy43[sizeof (ast::stmt_assign::ptr)]; + char dummy44[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy44[sizeof (ast::stmt_break::ptr)]; + char dummy45[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy45[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy46[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy46[sizeof (ast::stmt_call::ptr)]; + char dummy47[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy47[sizeof (ast::stmt_case::ptr)]; + char dummy48[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy48[sizeof (ast::stmt_continue::ptr)]; + char dummy49[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy49[sizeof (ast::stmt_default::ptr)]; + char dummy50[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy50[sizeof (ast::stmt_dev::ptr)]; + char dummy51[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy51[sizeof (ast::stmt_dowhile::ptr)]; + char dummy52[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy52[sizeof (ast::stmt_endon::ptr)]; + char dummy53[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy53[sizeof (ast::stmt_expr::ptr)]; + char dummy54[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy54[sizeof (ast::stmt_for::ptr)]; + char dummy55[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy55[sizeof (ast::stmt_foreach::ptr)]; + char dummy56[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy56[sizeof (ast::stmt_if::ptr)]; + char dummy57[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy57[sizeof (ast::stmt_ifelse::ptr)]; + char dummy58[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy58[sizeof (ast::stmt_list::ptr)]; + char dummy59[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy59[sizeof (ast::stmt_notify::ptr)]; + char dummy60[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy60[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy61[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy61[sizeof (ast::stmt_prof_end::ptr)]; + char dummy62[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy62[sizeof (ast::stmt_return::ptr)]; + char dummy63[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy63[sizeof (ast::stmt_switch::ptr)]; + char dummy64[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy64[sizeof (ast::stmt_wait::ptr)]; + char dummy65[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe - char dummy65[sizeof (ast::stmt_waitframe::ptr)]; + char dummy66[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill - char dummy66[sizeof (ast::stmt_waittill::ptr)]; + char dummy67[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy67[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy68[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy68[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy69[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy69[sizeof (ast::stmt_while::ptr)]; + char dummy70[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -649,7 +654,7 @@ namespace xsk { namespace gsc { namespace iw8 { // "localized string" // "float" // "integer" - char dummy70[sizeof (std::string)]; + char dummy71[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -1009,30 +1014,33 @@ namespace xsk { namespace gsc { namespace iw8 { S_expr_isdefined = 174, // expr_isdefined S_expr_istrue = 175, // expr_istrue S_expr_reference = 176, // expr_reference - S_expr_array = 177, // expr_array - S_expr_field = 178, // expr_field - S_expr_size = 179, // expr_size - S_expr_paren = 180, // expr_paren - S_expr_object = 181, // expr_object - S_expr_thisthread = 182, // expr_thisthread - S_expr_empty_array = 183, // expr_empty_array - S_expr_undefined = 184, // expr_undefined - S_expr_game = 185, // expr_game - S_expr_self = 186, // expr_self - S_expr_anim = 187, // expr_anim - S_expr_level = 188, // expr_level - S_expr_animation = 189, // expr_animation - S_expr_animtree = 190, // expr_animtree - S_expr_identifier_nosize = 191, // expr_identifier_nosize - S_expr_identifier = 192, // expr_identifier - S_expr_path = 193, // expr_path - S_expr_istring = 194, // expr_istring - S_expr_string = 195, // expr_string - S_expr_vector = 196, // expr_vector - S_expr_float = 197, // expr_float - S_expr_integer = 198, // expr_integer - S_expr_false = 199, // expr_false - S_expr_true = 200 // expr_true + S_expr_tuple = 177, // expr_tuple + S_expr_tuple_arguments = 178, // expr_tuple_arguments + S_expr_tuple_types = 179, // expr_tuple_types + S_expr_array = 180, // expr_array + S_expr_field = 181, // expr_field + S_expr_size = 182, // expr_size + S_expr_paren = 183, // expr_paren + S_expr_object = 184, // expr_object + S_expr_thisthread = 185, // expr_thisthread + S_expr_empty_array = 186, // expr_empty_array + S_expr_undefined = 187, // expr_undefined + S_expr_game = 188, // expr_game + S_expr_self = 189, // expr_self + S_expr_anim = 190, // expr_anim + S_expr_level = 191, // expr_level + S_expr_animation = 192, // expr_animation + S_expr_animtree = 193, // expr_animtree + S_expr_identifier_nosize = 194, // expr_identifier_nosize + S_expr_identifier = 195, // expr_identifier + S_expr_path = 196, // expr_path + S_expr_istring = 197, // expr_istring + S_expr_string = 198, // expr_string + S_expr_vector = 199, // expr_vector + S_expr_float = 200, // expr_float + S_expr_integer = 201, // expr_integer + S_expr_false = 202, // expr_false + S_expr_true = 203 // expr_true }; }; @@ -1098,6 +1106,8 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1228,6 +1238,10 @@ namespace xsk { namespace gsc { namespace iw8 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1909,6 +1923,20 @@ namespace xsk { namespace gsc { namespace iw8 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2424,6 +2452,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2554,6 +2584,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4925,8 +4959,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2481, ///< Last index in yytable_. - yynnts_ = 86, ///< Number of nonterminal symbols. + yylast_ = 2542, ///< Last index in yytable_. + yynnts_ = 89, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4982,6 +5016,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -5112,6 +5148,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5312,6 +5352,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5442,6 +5484,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5649,7 +5695,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw8 -#line 5653 "parser.hpp" +#line 5699 "parser.hpp" diff --git a/src/iw8/xsk/resolver.cpp b/src/iw8/xsk/resolver.cpp index 250764de..eea35bcd 100644 --- a/src/iw8/xsk/resolver.cpp +++ b/src/iw8/xsk/resolver.cpp @@ -47,7 +47,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -59,7 +59,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -76,7 +76,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -105,7 +105,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/s1/xsk/assembler.cpp b/src/s1/xsk/assembler.cpp index adb2562f..b9717d83 100644 --- a/src/s1/xsk/assembler.cpp +++ b/src/s1/xsk/assembler.cpp @@ -385,7 +385,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -492,6 +492,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -555,7 +559,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -568,7 +572,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::s1 diff --git a/src/s1/xsk/compiler.cpp b/src/s1/xsk/compiler.cpp index e5543ccc..09f816df 100644 --- a/src/s1/xsk/compiler.cpp +++ b/src/s1/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -395,7 +400,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1038,11 +1043,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1548,7 +1560,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1593,6 +1605,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1632,7 +1667,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1718,7 +1753,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2247,7 +2282,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2314,11 +2349,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2341,11 +2376,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2373,7 +2408,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2382,7 +2417,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2390,8 +2425,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2423,13 +2458,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2589,23 +2624,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2632,7 +2684,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2646,7 +2698,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2659,7 +2710,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2837,8 +2888,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2853,7 +2903,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2886,7 +2936,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/s1/xsk/compiler.hpp b/src/s1/xsk/compiler.hpp index 63d47671..4f285267 100644 --- a/src/s1/xsk/compiler.hpp +++ b/src/s1/xsk/compiler.hpp @@ -96,6 +96,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -137,10 +138,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/s1/xsk/decompiler.cpp b/src/s1/xsk/decompiler.cpp index 9a75244b..221581c6 100644 --- a/src/s1/xsk/decompiler.cpp +++ b/src/s1/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,45 +1228,45 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waitFrame: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1278,69 +1275,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1349,98 +1345,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: - { + { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1448,256 +1446,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1717,7 +1702,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1744,7 +1729,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1771,7 +1756,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1779,9 +1763,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1792,60 +1777,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1975,7 +1938,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2009,7 +1972,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2026,7 +1989,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2155,7 +2118,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2215,7 +2178,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2247,7 +2210,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2378,17 +2341,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2421,7 +2384,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2432,17 +2395,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2486,7 +2449,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2638,7 +2601,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2742,8 +2705,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2987,7 +2950,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3016,7 +2979,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3056,7 +3019,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3178,9 +3141,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3429,11 +3389,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3451,7 +3406,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3469,7 +3424,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/s1/xsk/decompiler.hpp b/src/s1/xsk/decompiler.hpp index 9c1bc4ef..cbe3cee6 100644 --- a/src/s1/xsk/decompiler.hpp +++ b/src/s1/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/s1/xsk/disassembler.cpp b/src/s1/xsk/disassembler.cpp index 521fbcc4..55a36ca4 100644 --- a/src/s1/xsk/disassembler.cpp +++ b/src/s1/xsk/disassembler.cpp @@ -300,7 +300,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -494,7 +494,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -517,7 +517,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/s1/xsk/lexer.cpp b/src/s1/xsk/lexer.cpp index ce72b4ff..402e0b40 100644 --- a/src/s1/xsk/lexer.cpp +++ b/src/s1/xsk/lexer.cpp @@ -683,7 +683,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -717,7 +717,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -751,7 +751,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/s1/xsk/parser.cpp b/src/s1/xsk/parser.cpp index 0f6d5e24..cf0eb6ea 100644 --- a/src/s1/xsk/parser.cpp +++ b/src/s1/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace s1 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -550,6 +556,8 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -672,6 +680,10 @@ namespace xsk { namespace gsc { namespace s1 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -856,6 +868,8 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -978,6 +992,10 @@ namespace xsk { namespace gsc { namespace s1 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1161,6 +1179,8 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1283,6 +1303,10 @@ namespace xsk { namespace gsc { namespace s1 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1721,6 +1745,8 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1843,6 +1869,10 @@ namespace xsk { namespace gsc { namespace s1 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -2004,1351 +2034,1393 @@ namespace xsk { namespace gsc { namespace s1 { switch (yyn) { case 2: // root: program -#line 260 "parser.ypp" +#line 263 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2010 "parser.cpp" - break; - - case 3: // root: %empty -#line 261 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 2016 "parser.cpp" - break; - - case 4: // program: program inline -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2022 "parser.cpp" - break; - - case 5: // program: program include -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2028 "parser.cpp" - break; - - case 6: // program: program declaration -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2034 "parser.cpp" - break; - - case 7: // program: inline -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2040 "parser.cpp" break; - case 8: // program: include -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 264 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2046 "parser.cpp" break; - case 9: // program: declaration -#line 276 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2052 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 280 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2058 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 285 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2064 "parser.cpp" break; - case 12: // declaration: "/#" -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2070 "parser.cpp" break; - case 13: // declaration: "#/" -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2076 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 279 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2082 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 292 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 283 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2088 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 293 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 288 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2094 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 298 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2100 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 303 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2106 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 308 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2112 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 295 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2118 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 296 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2124 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 301 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2130 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 306 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2136 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 311 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2142 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2148 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2154 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2160 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2166 "parser.cpp" break; - case 29: // stmt: stmt_waitframe -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } + case 24: // stmt: stmt_notify +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2172 "parser.cpp" break; - case 30: // stmt: stmt_if -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 25: // stmt: stmt_wait +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2178 "parser.cpp" break; - case 31: // stmt: stmt_ifelse -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2184 "parser.cpp" break; - case 32: // stmt: stmt_while -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2190 "parser.cpp" break; - case 33: // stmt: stmt_dowhile -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2196 "parser.cpp" break; - case 34: // stmt: stmt_for -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 29: // stmt: stmt_waitframe +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2202 "parser.cpp" break; - case 35: // stmt: stmt_foreach -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 30: // stmt: stmt_if +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2208 "parser.cpp" break; - case 36: // stmt: stmt_switch -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 31: // stmt: stmt_ifelse +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2214 "parser.cpp" break; - case 37: // stmt: stmt_case -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 32: // stmt: stmt_while +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2220 "parser.cpp" break; - case 38: // stmt: stmt_default -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 33: // stmt: stmt_dowhile +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2226 "parser.cpp" break; - case 39: // stmt: stmt_break -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 34: // stmt: stmt_for +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2232 "parser.cpp" break; - case 40: // stmt: stmt_continue -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 35: // stmt: stmt_foreach +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2238 "parser.cpp" break; - case 41: // stmt: stmt_return -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 36: // stmt: stmt_switch +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2244 "parser.cpp" break; - case 42: // stmt: stmt_breakpoint -#line 334 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 37: // stmt: stmt_case +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2250 "parser.cpp" break; - case 43: // stmt: stmt_prof_begin -#line 335 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 38: // stmt: stmt_default +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2256 "parser.cpp" break; - case 44: // stmt: stmt_prof_end -#line 336 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 39: // stmt: stmt_break +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2262 "parser.cpp" break; - case 45: // stmt_or_dev: stmt -#line 340 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 40: // stmt: stmt_continue +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2268 "parser.cpp" break; - case 46: // stmt_or_dev: stmt_dev -#line 341 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 41: // stmt: stmt_return +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2274 "parser.cpp" break; - case 47: // stmt_list: stmt_list stmt -#line 346 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_breakpoint +#line 337 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2280 "parser.cpp" break; - case 48: // stmt_list: stmt -#line 348 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_begin +#line 338 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2286 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 353 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt: stmt_prof_end +#line 339 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2292 "parser.cpp" break; - case 50: // stmt_or_dev_list: stmt_or_dev -#line 355 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 45: // stmt_or_dev: stmt +#line 343 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2298 "parser.cpp" break; - case 51: // stmt_dev: "/#" stmt_list "#/" -#line 359 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 46: // stmt_or_dev: stmt_dev +#line 344 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2304 "parser.cpp" break; - case 52: // stmt_dev: "/#" "#/" -#line 360 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 47: // stmt_list: stmt_list stmt +#line 349 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2310 "parser.cpp" break; - case 53: // stmt_block: "{" stmt_or_dev_list "}" -#line 364 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 48: // stmt_list: stmt +#line 351 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2316 "parser.cpp" break; - case 54: // stmt_block: "{" "}" -#line 365 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 356 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2322 "parser.cpp" break; - case 55: // stmt_expr: expr_assign -#line 370 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_or_dev_list: stmt_or_dev +#line 358 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2328 "parser.cpp" break; - case 56: // stmt_expr: expr_increment -#line 372 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" stmt_list "#/" +#line 362 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2334 "parser.cpp" break; - case 57: // stmt_expr: expr_decrement -#line 374 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 52: // stmt_dev: "/#" "#/" +#line 363 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2340 "parser.cpp" break; - case 58: // stmt_expr: %empty -#line 376 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 53: // stmt_block: "{" stmt_or_dev_list "}" +#line 367 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2346 "parser.cpp" break; - case 59: // stmt_call: expr_call ";" -#line 381 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 54: // stmt_block: "{" "}" +#line 368 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2352 "parser.cpp" break; - case 60: // stmt_call: expr_method ";" -#line 383 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 55: // stmt_expr: expr_assign +#line 373 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2358 "parser.cpp" break; - case 61: // stmt_assign: expr_assign ";" -#line 388 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_increment +#line 375 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2364 "parser.cpp" break; - case 62: // stmt_assign: expr_increment ";" -#line 390 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: expr_decrement +#line 377 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2370 "parser.cpp" break; - case 63: // stmt_assign: expr_decrement ";" -#line 392 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 58: // stmt_expr: %empty +#line 379 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2376 "parser.cpp" break; - case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 397 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 59: // stmt_call: expr_call ";" +#line 384 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2382 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 402 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 60: // stmt_call: expr_method ";" +#line 386 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2388 "parser.cpp" break; - case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 404 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 61: // stmt_assign: expr_assign ";" +#line 391 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2394 "parser.cpp" break; - case 67: // stmt_wait: "wait" expr ";" -#line 409 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 62: // stmt_assign: expr_increment ";" +#line 393 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2400 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 414 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 63: // stmt_assign: expr_decrement ";" +#line 395 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2406 "parser.cpp" break; - case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 416 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 400 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2412 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 421 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 405 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2418 "parser.cpp" break; - case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 423 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 407 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2424 "parser.cpp" break; - case 72: // stmt_waittillframeend: "waittillframeend" ";" -#line 428 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 67: // stmt_wait: "wait" expr ";" +#line 412 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2430 "parser.cpp" break; - case 73: // stmt_waitframe: "waitframe" ";" -#line 433 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 417 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2436 "parser.cpp" break; - case 74: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 419 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2442 "parser.cpp" break; - case 75: // stmt_if: "if" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 424 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2448 "parser.cpp" break; - case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 426 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2454 "parser.cpp" break; - case 77: // stmt_while: "while" "(" expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_waittillframeend: "waittillframeend" ";" +#line 431 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2460 "parser.cpp" break; - case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 73: // stmt_waitframe: "waitframe" ";" +#line 436 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2466 "parser.cpp" break; - case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 460 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 74: // stmt_waitframe: "waitframe" "(" ")" ";" +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2472 "parser.cpp" break; - case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 465 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 75: // stmt_if: "if" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2478 "parser.cpp" break; - case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2484 "parser.cpp" break; - case 82: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 472 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 77: // stmt_while: "while" "(" expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2490 "parser.cpp" break; - case 83: // stmt_case: "case" expr_integer ":" -#line 477 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2496 "parser.cpp" break; - case 84: // stmt_case: "case" expr_string ":" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 463 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2502 "parser.cpp" break; - case 85: // stmt_default: "default" ":" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 468 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2508 "parser.cpp" break; - case 86: // stmt_break: "break" ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2514 "parser.cpp" break; - case 87: // stmt_continue: "continue" ";" -#line 494 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 475 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2520 "parser.cpp" break; - case 88: // stmt_return: "return" expr ";" -#line 499 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 83: // stmt_case: "case" expr_integer ":" +#line 480 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2526 "parser.cpp" break; - case 89: // stmt_return: "return" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 84: // stmt_case: "case" expr_string ":" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2532 "parser.cpp" break; - case 90: // stmt_breakpoint: "breakpoint" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 85: // stmt_default: "default" ":" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2538 "parser.cpp" break; - case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 511 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 86: // stmt_break: "break" ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2544 "parser.cpp" break; - case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 516 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 87: // stmt_continue: "continue" ";" +#line 497 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2550 "parser.cpp" break; - case 93: // expr: expr_ternary -#line 520 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_return: "return" expr ";" +#line 502 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2556 "parser.cpp" break; - case 94: // expr: expr_binary -#line 521 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 89: // stmt_return: "return" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2562 "parser.cpp" break; - case 95: // expr: expr_primitive -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 90: // stmt_breakpoint: "breakpoint" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2568 "parser.cpp" break; - case 96: // expr_or_empty: expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 514 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2574 "parser.cpp" break; - case 97: // expr_or_empty: %empty -#line 527 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 519 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2580 "parser.cpp" break; - case 98: // expr_assign: expr_object "=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr: expr_ternary +#line 523 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2586 "parser.cpp" break; - case 99: // expr_assign: expr_object "|=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 94: // expr: expr_binary +#line 524 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2592 "parser.cpp" break; - case 100: // expr_assign: expr_object "&=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr: expr_primitive +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2598 "parser.cpp" break; - case 101: // expr_assign: expr_object "^=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_or_empty: expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2604 "parser.cpp" break; - case 102: // expr_assign: expr_object "<<=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_or_empty: %empty +#line 530 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2610 "parser.cpp" break; - case 103: // expr_assign: expr_object ">>=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_tuple "=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2616 "parser.cpp" break; - case 104: // expr_assign: expr_object "+=" expr -#line 544 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2622 "parser.cpp" break; - case 105: // expr_assign: expr_object "-=" expr -#line 546 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "|=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2628 "parser.cpp" break; - case 106: // expr_assign: expr_object "*=" expr -#line 548 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 101: // expr_assign: expr_object "&=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2634 "parser.cpp" break; - case 107: // expr_assign: expr_object "/=" expr -#line 550 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 102: // expr_assign: expr_object "^=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2640 "parser.cpp" break; - case 108: // expr_assign: expr_object "%=" expr -#line 552 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 103: // expr_assign: expr_object "<<=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2646 "parser.cpp" break; - case 109: // expr_increment: "++" expr_object -#line 557 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 104: // expr_assign: expr_object ">>=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2652 "parser.cpp" break; - case 110: // expr_increment: expr_object "++" -#line 559 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 105: // expr_assign: expr_object "+=" expr +#line 549 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2658 "parser.cpp" break; - case 111: // expr_decrement: "--" expr_object -#line 564 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 106: // expr_assign: expr_object "-=" expr +#line 551 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2664 "parser.cpp" break; - case 112: // expr_decrement: expr_object "--" -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 107: // expr_assign: expr_object "*=" expr +#line 553 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2670 "parser.cpp" break; - case 113: // expr_ternary: expr "?" expr ":" expr -#line 571 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_assign: expr_object "/=" expr +#line 555 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2676 "parser.cpp" break; - case 114: // expr_binary: expr "||" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_assign: expr_object "%=" expr +#line 557 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2682 "parser.cpp" break; - case 115: // expr_binary: expr "&&" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_increment: "++" expr_object +#line 562 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2688 "parser.cpp" break; - case 116: // expr_binary: expr "==" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_increment: expr_object "++" +#line 564 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2694 "parser.cpp" break; - case 117: // expr_binary: expr "!=" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_decrement: "--" expr_object +#line 569 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2700 "parser.cpp" break; - case 118: // expr_binary: expr "<=" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_decrement: expr_object "--" +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2706 "parser.cpp" break; - case 119: // expr_binary: expr ">=" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_ternary: expr "?" expr ":" expr +#line 576 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2712 "parser.cpp" break; - case 120: // expr_binary: expr "<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "||" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2718 "parser.cpp" break; - case 121: // expr_binary: expr ">" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "&&" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2724 "parser.cpp" break; - case 122: // expr_binary: expr "|" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr "==" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2730 "parser.cpp" break; - case 123: // expr_binary: expr "&" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "!=" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2736 "parser.cpp" break; - case 124: // expr_binary: expr "^" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr "<=" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2742 "parser.cpp" break; - case 125: // expr_binary: expr "<<" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr ">=" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2748 "parser.cpp" break; - case 126: // expr_binary: expr ">>" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2754 "parser.cpp" break; - case 127: // expr_binary: expr "+" expr -#line 602 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr ">" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2760 "parser.cpp" break; - case 128: // expr_binary: expr "-" expr -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "|" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2766 "parser.cpp" break; - case 129: // expr_binary: expr "*" expr -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 124: // expr_binary: expr "&" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2772 "parser.cpp" break; - case 130: // expr_binary: expr "/" expr -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 125: // expr_binary: expr "^" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2778 "parser.cpp" break; - case 131: // expr_binary: expr "%" expr -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 126: // expr_binary: expr "<<" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2784 "parser.cpp" break; - case 132: // expr_primitive: expr_complement -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 127: // expr_binary: expr ">>" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2790 "parser.cpp" break; - case 133: // expr_primitive: expr_negate -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 128: // expr_binary: expr "+" expr +#line 607 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2796 "parser.cpp" break; - case 134: // expr_primitive: expr_not -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 129: // expr_binary: expr "-" expr +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2802 "parser.cpp" break; - case 135: // expr_primitive: expr_call -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 130: // expr_binary: expr "*" expr +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2808 "parser.cpp" break; - case 136: // expr_primitive: expr_method -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 131: // expr_binary: expr "/" expr +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2814 "parser.cpp" break; - case 137: // expr_primitive: expr_add_array -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 132: // expr_binary: expr "%" expr +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2820 "parser.cpp" break; - case 138: // expr_primitive: expr_reference -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 133: // expr_primitive: expr_complement +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2826 "parser.cpp" break; - case 139: // expr_primitive: expr_array -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 134: // expr_primitive: expr_negate +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2832 "parser.cpp" break; - case 140: // expr_primitive: expr_field -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 135: // expr_primitive: expr_not +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2838 "parser.cpp" break; - case 141: // expr_primitive: expr_size -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 136: // expr_primitive: expr_call +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2844 "parser.cpp" break; - case 142: // expr_primitive: expr_paren -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 137: // expr_primitive: expr_method +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2850 "parser.cpp" break; - case 143: // expr_primitive: expr_thisthread -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 138: // expr_primitive: expr_add_array +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2856 "parser.cpp" break; - case 144: // expr_primitive: expr_empty_array -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 139: // expr_primitive: expr_reference +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2862 "parser.cpp" break; - case 145: // expr_primitive: expr_undefined -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 140: // expr_primitive: expr_array +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2868 "parser.cpp" break; - case 146: // expr_primitive: expr_game -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 141: // expr_primitive: expr_field +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2874 "parser.cpp" break; - case 147: // expr_primitive: expr_self -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 142: // expr_primitive: expr_size +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2880 "parser.cpp" break; - case 148: // expr_primitive: expr_anim -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 143: // expr_primitive: expr_paren +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2886 "parser.cpp" break; - case 149: // expr_primitive: expr_level -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 144: // expr_primitive: expr_thisthread +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2892 "parser.cpp" break; - case 150: // expr_primitive: expr_animation -#line 632 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 145: // expr_primitive: expr_empty_array +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2898 "parser.cpp" break; - case 151: // expr_primitive: expr_animtree -#line 633 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 146: // expr_primitive: expr_undefined +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2904 "parser.cpp" break; - case 152: // expr_primitive: expr_identifier -#line 634 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 147: // expr_primitive: expr_game +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2910 "parser.cpp" break; - case 153: // expr_primitive: expr_istring -#line 635 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 148: // expr_primitive: expr_self +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2916 "parser.cpp" break; - case 154: // expr_primitive: expr_string -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 149: // expr_primitive: expr_anim +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2922 "parser.cpp" break; - case 155: // expr_primitive: expr_vector -#line 637 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 150: // expr_primitive: expr_level +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2928 "parser.cpp" break; - case 156: // expr_primitive: expr_float -#line 638 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 151: // expr_primitive: expr_animation +#line 637 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2934 "parser.cpp" break; - case 157: // expr_primitive: expr_integer -#line 639 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 152: // expr_primitive: expr_animtree +#line 638 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2940 "parser.cpp" break; - case 158: // expr_primitive: expr_false -#line 640 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 153: // expr_primitive: expr_identifier +#line 639 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2946 "parser.cpp" break; - case 159: // expr_primitive: expr_true -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 154: // expr_primitive: expr_istring +#line 640 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2952 "parser.cpp" break; - case 160: // expr_complement: "~" expr -#line 646 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 155: // expr_primitive: expr_string +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2958 "parser.cpp" break; - case 161: // expr_negate: "-" expr_identifier -#line 651 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 156: // expr_primitive: expr_vector +#line 642 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2964 "parser.cpp" break; - case 162: // expr_negate: "-" expr_paren -#line 653 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 157: // expr_primitive: expr_float +#line 643 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2970 "parser.cpp" break; - case 163: // expr_negate: "-" expr_array -#line 655 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 158: // expr_primitive: expr_integer +#line 644 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2976 "parser.cpp" break; - case 164: // expr_negate: "-" expr_field -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 159: // expr_primitive: expr_false +#line 645 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2982 "parser.cpp" break; - case 165: // expr_not: "!" expr -#line 662 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 160: // expr_primitive: expr_true +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2988 "parser.cpp" break; - case 166: // expr_call: expr_function -#line 666 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_complement: "~" expr +#line 651 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2994 "parser.cpp" break; - case 167: // expr_call: expr_pointer -#line 667 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 162: // expr_negate: "-" expr_identifier +#line 656 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 3000 "parser.cpp" break; - case 168: // expr_method: expr_object expr_function -#line 670 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 163: // expr_negate: "-" expr_paren +#line 658 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 3006 "parser.cpp" break; - case 169: // expr_method: expr_object expr_pointer -#line 671 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 164: // expr_negate: "-" expr_array +#line 660 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 3012 "parser.cpp" break; - case 170: // expr_function: expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 165: // expr_negate: "-" expr_field +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 3018 "parser.cpp" break; - case 171: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 678 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 166: // expr_not: "!" expr +#line 667 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3024 "parser.cpp" break; - case 172: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 680 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 167: // expr_call: expr_function +#line 671 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3030 "parser.cpp" break; - case 173: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 682 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 168: // expr_call: expr_pointer +#line 672 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3036 "parser.cpp" break; - case 174: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 684 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 169: // expr_method: expr_object expr_function +#line 675 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3042 "parser.cpp" break; - case 175: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 686 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_method: expr_object expr_pointer +#line 676 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3048 "parser.cpp" break; - case 176: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 691 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 171: // expr_function: expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3054 "parser.cpp" break; - case 177: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 693 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 172: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 683 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3060 "parser.cpp" break; - case 178: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 695 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 173: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 685 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3066 "parser.cpp" break; - case 179: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 697 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 174: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 687 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3072 "parser.cpp" break; - case 180: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 702 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 175: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 689 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3078 "parser.cpp" break; - case 181: // expr_parameters: expr_parameters "," expr_identifier -#line 707 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 176: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 691 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3084 "parser.cpp" break; - case 182: // expr_parameters: expr_identifier -#line 709 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 177: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 696 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3090 "parser.cpp" break; - case 183: // expr_parameters: %empty -#line 711 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 178: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 698 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3096 "parser.cpp" break; - case 184: // expr_arguments: expr_arguments_no_empty -#line 716 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 179: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 700 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3102 "parser.cpp" break; - case 185: // expr_arguments: %empty -#line 718 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 180: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 702 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3108 "parser.cpp" break; - case 186: // expr_arguments_no_empty: expr_arguments "," expr -#line 723 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 181: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 707 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3114 "parser.cpp" break; - case 187: // expr_arguments_no_empty: expr -#line 725 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 182: // expr_parameters: expr_parameters "," expr_identifier +#line 712 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3120 "parser.cpp" break; - case 188: // expr_reference: "::" expr_identifier -#line 730 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_parameters: expr_identifier +#line 714 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3126 "parser.cpp" break; - case 189: // expr_reference: expr_path "::" expr_identifier -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 184: // expr_parameters: %empty +#line 716 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3132 "parser.cpp" break; - case 190: // expr_array: expr_object "[" expr "]" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments: expr_arguments_no_empty +#line 721 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3138 "parser.cpp" break; - case 191: // expr_field: expr_object "." expr_identifier_nosize -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 186: // expr_arguments: %empty +#line 723 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3144 "parser.cpp" break; - case 192: // expr_size: expr_object "." "size" -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 187: // expr_arguments_no_empty: expr_arguments "," expr +#line 728 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3150 "parser.cpp" break; - case 193: // expr_paren: "(" expr ")" -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 188: // expr_arguments_no_empty: expr +#line 730 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3156 "parser.cpp" break; - case 194: // expr_object: expr_call -#line 756 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 189: // expr_reference: "::" expr_identifier +#line 735 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3162 "parser.cpp" break; - case 195: // expr_object: expr_method -#line 757 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 190: // expr_reference: expr_path "::" expr_identifier +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3168 "parser.cpp" break; - case 196: // expr_object: expr_array -#line 758 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 191: // expr_tuple: "[" expr_tuple_arguments "]" +#line 742 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3174 "parser.cpp" break; - case 197: // expr_object: expr_field -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 192: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 747 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3180 "parser.cpp" break; - case 198: // expr_object: expr_game -#line 760 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 193: // expr_tuple_arguments: expr_tuple_types +#line 749 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3186 "parser.cpp" break; - case 199: // expr_object: expr_self -#line 761 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 194: // expr_tuple_types: expr_array +#line 753 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3192 "parser.cpp" break; - case 200: // expr_object: expr_anim -#line 762 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 195: // expr_tuple_types: expr_field +#line 754 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3198 "parser.cpp" break; - case 201: // expr_object: expr_level -#line 763 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 196: // expr_tuple_types: expr_identifier +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3204 "parser.cpp" break; - case 202: // expr_object: expr_identifier -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 197: // expr_array: expr_object "[" expr "]" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3210 "parser.cpp" break; - case 203: // expr_thisthread: "thisthread" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_field: expr_object "." expr_identifier_nosize +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3216 "parser.cpp" break; - case 204: // expr_empty_array: "[" "]" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_size: expr_object "." "size" +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3222 "parser.cpp" break; - case 205: // expr_undefined: "undefined" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_paren: "(" expr ")" +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3228 "parser.cpp" break; - case 206: // expr_game: "game" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_call +#line 779 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3234 "parser.cpp" break; - case 207: // expr_self: "self" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 202: // expr_object: expr_method +#line 780 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3240 "parser.cpp" break; - case 208: // expr_anim: "anim" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_array +#line 781 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3246 "parser.cpp" break; - case 209: // expr_level: "level" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 204: // expr_object: expr_field +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3252 "parser.cpp" break; - case 210: // expr_animation: "%" "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_game +#line 783 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3258 "parser.cpp" break; - case 211: // expr_animtree: "#animtree" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 206: // expr_object: expr_self +#line 784 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3264 "parser.cpp" break; - case 212: // expr_identifier_nosize: "identifier" -#line 814 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_object: expr_anim +#line 785 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3270 "parser.cpp" break; - case 213: // expr_identifier: "identifier" -#line 819 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_object: expr_level +#line 786 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3276 "parser.cpp" break; - case 214: // expr_identifier: "size" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 209: // expr_object: expr_identifier +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3282 "parser.cpp" break; - case 215: // expr_path: "identifier" -#line 826 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_thisthread: "thisthread" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3288 "parser.cpp" break; - case 216: // expr_path: "path" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 211: // expr_empty_array: "[" "]" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3294 "parser.cpp" break; - case 217: // expr_istring: "localized string" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 212: // expr_undefined: "undefined" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3300 "parser.cpp" break; - case 218: // expr_string: "string literal" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_game: "game" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3306 "parser.cpp" break; - case 219: // expr_vector: "(" expr "," expr "," expr ")" -#line 843 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 214: // expr_self: "self" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3312 "parser.cpp" break; - case 220: // expr_float: "-" "float" -#line 848 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 215: // expr_anim: "anim" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3318 "parser.cpp" break; - case 221: // expr_float: "float" -#line 850 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 216: // expr_level: "level" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3324 "parser.cpp" break; - case 222: // expr_integer: "-" "integer" -#line 855 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 217: // expr_animation: "%" "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3330 "parser.cpp" break; - case 223: // expr_integer: "integer" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 218: // expr_animtree: "#animtree" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3336 "parser.cpp" break; - case 224: // expr_false: "false" -#line 862 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 219: // expr_identifier_nosize: "identifier" +#line 837 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3342 "parser.cpp" break; - case 225: // expr_true: "true" -#line 867 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 220: // expr_identifier: "identifier" +#line 842 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3348 "parser.cpp" break; + case 221: // expr_identifier: "size" +#line 844 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3354 "parser.cpp" + break; -#line 3352 "parser.cpp" + case 222: // expr_path: "identifier" +#line 849 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3360 "parser.cpp" + break; + + case 223: // expr_path: "path" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3366 "parser.cpp" + break; + + case 224: // expr_istring: "localized string" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3372 "parser.cpp" + break; + + case 225: // expr_string: "string literal" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3378 "parser.cpp" + break; + + case 226: // expr_vector: "(" expr "," expr "," expr ")" +#line 866 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3384 "parser.cpp" + break; + + case 227: // expr_float: "-" "float" +#line 871 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3390 "parser.cpp" + break; + + case 228: // expr_float: "float" +#line 873 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3396 "parser.cpp" + break; + + case 229: // expr_integer: "-" "integer" +#line 878 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3402 "parser.cpp" + break; + + case 230: // expr_integer: "integer" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3408 "parser.cpp" + break; + + case 231: // expr_false: "false" +#line 885 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3414 "parser.cpp" + break; + + case 232: // expr_true: "true" +#line 890 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3420 "parser.cpp" + break; + + +#line 3424 "parser.cpp" default: break; @@ -3559,7 +3631,8 @@ namespace xsk { namespace gsc { namespace s1 { "expr_binary", "expr_primitive", "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", - "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_arguments_no_empty", "expr_reference", "expr_tuple", + "expr_tuple_arguments", "expr_tuple_types", "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", @@ -3836,366 +3909,375 @@ namespace xsk { namespace gsc { namespace s1 { const short parser::yypact_ninf_ = -287; - const short parser::yytable_ninf_ = -216; + const short parser::yytable_ninf_ = -223; const short parser::yypact_[] = { - 9, -287, -287, -65, -65, -40, -287, -287, 41, 9, - -287, -287, -287, -287, -287, -287, -25, -287, -287, -12, - -8, -55, -287, -287, -287, -287, -34, 1152, -287, -287, - -287, 12, -19, -287, -287, -28, -18, -287, 4, -287, - -287, -287, -287, -287, -287, -287, 1152, 1026, -34, 1152, - 1152, 35, -27, 28, -287, -287, -287, 2117, -287, -287, - -287, -287, -287, -287, 543, 557, -287, -287, -287, -287, - 604, 666, -287, -287, 677, -287, -287, -287, 878, 955, - 1113, 1176, -287, -287, 215, 33, -287, -287, -287, -287, - -287, -287, -287, 32, 57, -34, 59, 52, 62, 67, - 75, 74, 85, 1408, 1026, -287, 2200, 92, 99, -287, - -287, -287, 1152, 102, -287, -287, -287, -287, 604, 666, - -287, 1375, -287, -287, -287, -287, 215, 100, -287, -287, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1215, - -31, -287, -287, 109, 1152, -34, -287, 769, -287, -287, - 1152, 1152, -34, 1152, 1152, -34, 1152, -287, 1152, 1886, - 1152, -287, 1574, 1152, 65, -34, 2082, 84, 84, 2231, - 2241, 2323, 2323, 249, 249, 249, 249, 2272, 2313, 2282, - 76, 76, -287, -287, -287, 1926, -287, -287, -287, -1, - -287, 116, 923, 1152, 111, -15, 129, 1339, 131, 132, - 134, 135, -53, 130, 128, 136, 1089, 137, 142, 145, - -287, 69, 69, -287, -287, 846, -287, -287, -287, -287, + 6, -287, -287, 5, 5, -24, -287, -287, 37, 6, + -287, -287, -287, -287, -287, -287, -8, -287, -287, -13, + -10, -54, -287, -287, -287, -287, -23, 1223, -287, -287, + -287, 11, -12, -287, -287, -42, 3, -287, 17, -287, + -287, -287, -287, -287, -287, -287, 1223, 821, -23, 1223, + 1223, -18, -36, 26, -287, -287, -287, 2187, -287, -287, + -287, -287, -287, -287, 413, 667, -287, -287, -287, -287, + 699, 729, -287, -287, 1012, -287, -287, -287, 1089, 1187, + 1247, 1317, -287, -287, 574, 39, -287, -287, -287, -287, + -287, -287, -287, 15, 96, -23, 49, 75, 81, 114, + 100, 124, 129, 1439, 821, -287, 2270, 134, 136, -287, + -287, -287, 1223, 142, -287, -287, -287, -287, 699, 729, + -287, 1406, -287, -287, -287, -287, 574, 140, -287, -287, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1286, + -20, -287, -287, 152, 1223, -23, -287, 928, -287, -287, + 1223, 1223, -23, 1223, 1223, -23, 1223, -287, 1223, 1917, + 1223, -287, 1605, 1223, 107, -23, 2152, 179, 179, 2301, + 2311, 2383, 2383, 30, 30, 30, 30, 2342, 728, 2352, + 73, 73, -287, -287, -287, 1957, -287, -287, -287, 35, + -287, 154, 1057, 1223, 146, -5, 161, 1370, 165, 166, + 167, 168, -17, 163, 169, 172, 1160, 183, 173, 175, + -287, 139, 548, 548, -287, -287, 980, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - -287, -287, 141, 143, 146, 148, 149, -287, -287, 1262, - 109, 1966, 8, 160, 2006, 15, 161, 2046, 1021, 163, - 2200, 1886, 116, 1152, -287, -287, 1152, -287, -287, 1000, - 2152, -287, 164, -287, 1152, 196, 1152, 49, -34, 1152, - 122, 165, 166, -287, -287, -287, -287, 2187, -287, 1152, - 1152, 1375, 1375, -287, -287, -287, -287, -287, -287, -287, - 178, 181, 182, 186, -287, -287, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 187, -287, 1152, - 193, -287, 1152, 195, 1152, 201, 2200, 19, -287, -287, - -287, 177, 1608, 205, 1642, 198, -287, -287, -287, 1365, - 1, 1676, -287, -287, -287, 48, 50, 1152, 1152, 1152, - 1152, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, - 2200, 2200, 209, 73, 211, 77, 218, 1710, 1152, -287, - -287, 1339, 1152, 1339, 1152, 1152, -34, 57, 203, 210, - 1744, 1452, 1496, 1540, 1152, -287, 1152, -287, 1152, -287, - 87, 250, 1778, -287, 2200, 214, 1812, 248, -287, -287, - -287, 220, 222, 1152, 223, 1152, 227, 1152, 90, 91, - 101, -287, 1339, 230, 49, 1339, 1152, -287, -287, 224, - -287, 244, -287, 246, -287, -287, -287, -287, -287, 251, - -287, 1846, 231, 238, 243, 1339, 1339, -287, -287, -287, - -287, -287 + -287, -287, -287, 184, 185, 188, 191, 192, 177, -287, + -287, 51, 152, 1997, 53, 205, 2037, 56, 206, 2077, + 2116, 203, 2270, 1917, 154, 1223, -287, -287, 1223, -287, + -287, 1134, 2222, -287, 209, -287, 1223, 236, 1223, 639, + -23, 1223, 164, 208, 215, -287, -287, -287, -287, 2257, + -287, 1223, 1223, 1286, 32, -287, 62, 86, 8, 1406, + 1406, -287, -287, -287, -287, -287, -287, -287, 1223, 225, + 227, 228, 230, -287, -287, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 210, -287, 1223, 226, + -287, 1223, 229, 1223, 232, 2270, 59, -287, -287, -287, + 223, 1639, 235, 1673, 233, -287, -287, -287, 1396, 9, + 1707, -287, -287, -287, 60, 87, -287, 548, 2270, 1223, + 1223, 1223, 1223, 2270, 2270, 2270, 2270, 2270, 2270, 2270, + 2270, 2270, 2270, 2270, 240, 89, 242, 101, 245, 1741, + 1223, -287, -287, 1370, 1223, 1370, 1223, 1223, -23, 96, + 237, 241, -287, 1775, 1483, 1527, 1571, 1223, -287, 1223, + -287, 1223, -287, 103, 273, 1809, -287, 2270, 243, 1843, + 272, -287, -287, -287, 246, 249, 1223, 250, 1223, 251, + 1223, 113, 123, 125, -287, 1370, 252, 639, 1370, 1223, + -287, -287, 254, -287, 262, -287, 286, -287, -287, -287, + -287, -287, 287, -287, 1877, 279, 280, 281, 1370, 1370, + -287, -287, -287, -287, -287 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 214, 213, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 216, 215, 0, - 0, 0, 1, 4, 5, 6, 183, 0, 10, 11, - 218, 0, 0, 182, 211, 0, 0, 203, 0, 225, - 224, 205, 206, 207, 208, 209, 0, 185, 0, 0, - 0, 0, 0, 213, 217, 221, 223, 0, 93, 94, - 95, 132, 133, 134, 135, 136, 166, 167, 137, 138, - 139, 140, 141, 142, 0, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 0, 153, 154, 155, 156, - 157, 158, 159, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 204, 187, 0, 184, 188, - 165, 160, 0, 0, 220, 222, 194, 195, 163, 164, - 162, 0, 198, 199, 200, 201, 161, 0, 210, 18, + 3, 12, 13, 0, 0, 0, 221, 220, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 223, 222, 0, + 0, 0, 1, 4, 5, 6, 184, 0, 10, 11, + 225, 0, 0, 183, 218, 0, 0, 210, 0, 232, + 231, 212, 213, 214, 215, 216, 0, 186, 0, 0, + 0, 0, 0, 220, 224, 228, 230, 0, 93, 94, + 95, 133, 134, 135, 136, 137, 167, 168, 138, 139, + 140, 141, 142, 143, 0, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 0, 154, 155, 156, 157, + 158, 159, 160, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 186, 211, 188, 0, 185, 189, + 166, 161, 0, 0, 227, 229, 201, 202, 164, 165, + 163, 0, 205, 206, 207, 208, 162, 0, 217, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 168, 169, 0, 185, 0, 17, 0, 19, 181, - 0, 185, 0, 0, 185, 0, 0, 193, 0, 187, - 0, 180, 0, 0, 0, 0, 0, 125, 126, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 127, 128, 129, 130, 131, 0, 192, 212, 191, 0, - 184, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 169, 170, 0, 186, 0, 17, 0, 19, 182, + 0, 186, 0, 0, 186, 0, 0, 200, 0, 188, + 0, 181, 0, 0, 0, 0, 0, 126, 127, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 128, 129, 130, 131, 132, 0, 199, 219, 198, 0, + 185, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 54, 0, 0, 45, 50, 0, 46, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 0, 0, 0, 194, 195, 196, 197, 0, - 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 186, 0, 0, 0, 190, 170, 185, 52, 48, 0, - 0, 72, 0, 73, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 85, 86, 87, 89, 0, 90, 185, - 185, 109, 111, 53, 49, 61, 62, 63, 59, 60, - 0, 0, 0, 0, 110, 112, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 172, 185, - 0, 174, 185, 0, 0, 0, 113, 0, 51, 47, - 67, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 84, 83, 88, 0, 0, 0, 0, 0, - 0, 98, 104, 105, 106, 107, 108, 99, 100, 101, - 103, 102, 0, 0, 0, 0, 0, 0, 185, 171, - 74, 0, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 173, 185, 175, 185, 219, - 0, 75, 0, 77, 96, 0, 0, 0, 82, 91, - 92, 0, 0, 185, 0, 185, 0, 185, 0, 0, - 0, 176, 0, 0, 58, 0, 0, 64, 66, 184, - 69, 184, 71, 184, 177, 178, 179, 76, 78, 0, - 80, 0, 0, 0, 0, 0, 0, 65, 68, 70, - 79, 81 + 54, 0, 0, 0, 45, 50, 0, 46, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 201, 202, 0, 203, + 204, 0, 209, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 187, 0, 0, 0, 197, 171, 186, 52, + 48, 0, 0, 72, 0, 73, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 85, 86, 87, 89, 0, + 90, 186, 186, 0, 0, 193, 203, 204, 209, 110, + 112, 53, 49, 61, 62, 63, 59, 60, 0, 0, + 0, 0, 0, 111, 113, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 173, 186, 0, + 175, 186, 0, 0, 0, 114, 0, 51, 47, 67, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 84, 83, 88, 0, 0, 191, 0, 98, 0, + 0, 0, 0, 99, 105, 106, 107, 108, 109, 100, + 101, 102, 104, 103, 0, 0, 0, 0, 0, 0, + 186, 172, 74, 0, 0, 0, 97, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 186, 174, 186, + 176, 186, 226, 0, 75, 0, 77, 96, 0, 0, + 0, 82, 91, 92, 0, 0, 186, 0, 186, 0, + 186, 0, 0, 0, 177, 0, 0, 58, 0, 0, + 64, 66, 185, 69, 185, 71, 185, 178, 179, 180, + 76, 78, 0, 80, 0, 0, 0, 0, 0, 0, + 65, 68, 70, 79, 81 }; const short parser::yypgoto_[] = { - -287, -287, -287, 271, 297, 298, -287, -287, -287, -177, - 86, -287, -287, -287, -91, -114, -287, -287, -287, -287, + -287, -287, -287, 295, 336, 338, -287, -287, -287, -194, + 122, -287, -287, -287, -93, -87, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - 191, -287, -286, -285, -282, -287, -287, -287, -287, -287, - -287, -33, -6, -66, -59, -287, -287, -147, -41, -287, - 213, 240, -287, 263, 247, -287, -287, -287, 316, 322, - 333, 404, -287, -287, -287, 0, 7, -287, -17, -287, - -287, 105, -287, -287 + 189, -287, -286, -277, -274, -287, -287, -287, -287, -287, + -287, -49, -11, -67, -58, -287, -287, 95, -43, -287, + -287, -287, -16, 197, 324, -287, 302, 355, -287, -287, + -287, 380, 417, 452, 490, -287, -287, -287, 0, 7, + -287, -15, -287, -287, 148, -287, -287 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, - 224, 279, 225, 226, 227, 345, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 106, 405, 252, 253, 254, 58, 59, 60, 61, 62, + 0, 8, 9, 10, 11, 12, 13, 14, 15, 224, + 225, 281, 226, 227, 228, 354, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 106, 418, 253, 254, 255, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 32, 107, 200, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 198, 84, 85, 86, 87, 88, - 89, 90, 91, 92 + 258, 304, 305, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 198, 84, 85, + 86, 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 346, 347, 158, 31, 348, 108, 199, 151, 16, - 19, 20, 21, 6, 262, 152, 196, 265, 116, 6, - 1, 2, 3, 4, 5, 278, 33, 26, 96, 6, - 285, 385, 17, 18, 94, 97, 100, 282, 99, 95, - 290, 22, 98, 101, 30, 117, 30, 283, 109, 56, - 28, 126, 275, 27, 29, 151, 6, 170, 127, 386, - 102, 328, 152, 108, 7, 93, 170, 197, 331, 17, - 53, 128, 379, 170, 153, 35, 36, 170, 38, 17, - 53, 127, 6, 42, 43, 44, 45, 112, -215, 35, - 36, 113, 38, 155, 156, 159, 6, 42, 43, 44, - 45, 388, 339, 389, 161, 113, 170, 7, 170, 35, - 36, 157, 38, 221, 222, 160, 6, 42, 43, 44, - 45, 153, 162, 163, 255, 113, 395, 164, 127, 337, - 397, 170, 17, 53, 165, 170, 114, 115, 346, 347, - 421, 166, 348, 434, 435, 170, 17, 53, 170, 170, - 170, 256, 355, 356, 436, 201, 171, 260, 173, 170, - 175, 154, 263, 197, 127, 266, 17, 53, 276, 255, - 146, 147, 148, 281, 255, 272, 144, 145, 146, 147, - 148, 284, 373, 286, 287, 375, 288, 289, 116, 116, - 294, 293, 255, 151, 299, 291, 256, 300, 295, 298, - 152, 256, 260, 305, 401, 306, 403, 260, 307, 127, - 308, 309, 329, 332, 127, 117, 117, 341, 57, 256, - 335, 260, 260, 343, 115, 260, 352, 353, 127, 127, - 357, 400, 127, 358, 359, 151, 151, 103, 360, 380, - 110, 111, 152, 152, 372, 437, 255, 418, 440, 419, - 374, 420, 376, 378, 116, -202, -202, 382, -202, 153, - 384, 394, -202, 396, 118, 409, 127, 154, 450, 451, - 398, -202, 410, 256, -202, 422, 424, 442, 426, 260, - 23, 117, 427, 151, 428, 430, 127, 260, 350, 432, - 152, 119, 438, 447, 127, 169, 408, 443, 121, 444, - 448, 153, 153, 172, 445, 449, 24, 25, 127, 127, - 439, 304, -202, -202, 120, 131, 132, 292, 0, 0, - 0, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 144, 145, 146, 147, 148, 0, 0, 255, 153, - 255, 261, 0, 0, 264, 0, 127, 267, 0, 268, - 0, 270, 0, 0, 271, 0, 0, 122, 0, 0, - 257, 0, 429, 123, 431, 256, 433, 256, 0, 0, - 0, 260, 0, 260, 124, 0, 407, 0, 127, 255, - 127, 116, 255, 0, 280, 0, 0, 258, 0, 0, - 0, 0, 0, 0, 259, 0, 0, 297, 0, 0, - 0, 0, 255, 255, 0, 257, 256, 0, 117, 256, - 257, 0, 260, 0, 260, 260, 0, 0, 0, 127, - 0, 127, 127, 0, 257, 257, 0, 0, 257, 256, - 256, 0, 258, 0, 0, 260, 260, 258, 0, 259, - 0, 0, 127, 127, 259, 125, 0, 0, 0, 0, - 0, 258, 258, 0, 336, 258, 0, 0, 301, 302, - 0, 0, 259, 122, 0, 342, 0, 344, 0, 123, - 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 124, 0, 257, 0, 0, 0, 0, 0, 0, 0, - 257, 0, 0, 0, 0, 0, 0, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 122, 258, - 0, 0, 0, 122, 123, 377, 259, 258, 0, 123, - 0, 0, 0, 0, 349, 124, 0, 122, 122, 0, - 124, 122, 0, 123, 123, 0, 0, 123, 390, 391, - 392, 393, 0, 0, 124, 124, 0, 0, 124, 0, - 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 402, 0, 404, 406, 0, 0, 0, - 0, 0, 0, -194, -194, 0, -194, 0, 0, 0, - -194, 0, 0, 0, 257, 122, 257, -195, -195, -194, - -195, 123, -194, 122, -195, 0, 125, 0, 0, 123, - 0, 125, 124, -195, 0, 0, -195, 441, 0, 0, - 124, 258, 0, 258, 0, 125, 125, 0, 259, 125, - 259, 0, 0, 0, 0, 257, 0, 257, 257, 0, - -194, -194, 0, 0, -196, -196, 0, -196, 0, 0, - 0, -196, 0, 0, -195, -195, 0, 0, 257, 257, - -196, 0, 258, -196, 258, 258, 0, 0, 0, 259, - 0, 349, 259, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 125, 0, 258, 258, 0, 0, 0, - 0, 125, 259, 259, 0, 0, 0, 122, 0, 122, - 0, -196, -196, 123, 0, 123, -197, -197, 0, -197, - 0, 0, 0, -197, 124, 0, 124, 35, 36, 0, - 38, 0, -197, 0, 6, -197, 0, 0, 0, 0, - 0, 0, 0, 149, 0, 0, 150, 0, 122, 0, - 122, 122, 0, 0, 123, 0, 123, 123, 0, 0, - 0, 0, 0, 0, 0, 124, 0, 124, 124, 0, - 0, 122, 122, -197, -197, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 17, 53, 0, 0, 124, 124, - 202, 0, 0, 0, 0, 125, 0, 125, 203, 0, - 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, + 16, 158, 116, 355, 108, 6, 31, 151, 280, 16, + 19, 20, 356, 287, 96, 357, 152, 1, 2, 3, + 4, 5, 35, 36, 6, 38, 33, 196, 21, 6, + 42, 43, 44, 45, 112, 97, 100, 22, 113, 397, + 117, 94, 98, 101, 26, 30, 95, 284, 109, 28, + 6, 126, 29, 6, 151, 17, 53, 285, 127, 99, + 154, 108, 128, 152, 93, -196, -196, 398, 319, 320, + 27, 321, 322, 102, 153, 7, 292, 156, 197, 17, + 53, 127, 30, 114, 115, 56, -222, 348, 277, 366, + 367, 35, 36, 170, 38, 159, 131, 132, 6, 155, + 17, 53, 17, 18, 7, 160, 337, 149, 256, 340, + 174, 170, 391, 400, 170, 323, 324, 170, 170, -194, + -194, 153, 144, 145, 146, 147, 148, 161, 127, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 401, 162, 408, -195, -195, 170, 257, 170, 17, 53, + 157, 355, 164, 256, 410, 201, 434, 262, 256, 170, + 356, 170, 265, 357, 127, 268, 447, 146, 147, 148, + 163, 170, 116, 116, 116, 274, 448, 256, 449, 35, + 36, 170, 38, 170, 165, 166, 6, 42, 43, 44, + 45, 257, 170, 171, 151, 303, 257, 293, 173, 414, + 175, 416, 262, 152, 154, 197, 278, 262, 283, 127, + 117, 117, 117, 286, 127, 257, 57, 288, 289, 290, + 291, 308, 262, 262, 295, 301, 262, 302, 127, 127, + 127, 296, 256, 127, 297, 103, 17, 53, 110, 111, + 116, 450, 151, 151, 453, 300, 313, 314, 118, 199, + 315, 152, 152, 316, 317, 318, 264, 338, 341, 267, + 344, 153, 350, 352, 463, 464, 115, 384, 127, 361, + 257, 144, 145, 146, 147, 148, 362, 369, 117, 370, + 371, 262, 372, 386, 390, 392, 388, 394, 127, 262, + 359, 151, 407, 169, 409, 396, 127, 411, 435, 422, + 152, 172, 439, 423, 23, 437, 421, 455, 440, 153, + 153, 441, 443, 445, 451, 456, 127, 127, 116, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 457, + 458, 460, 461, 462, 256, 24, 256, 25, 312, 263, + 452, 402, 266, 120, 259, 269, 117, 270, 153, 272, + 294, 0, 273, 0, 0, 127, 0, 308, 0, 0, + 0, 0, 0, 346, 127, 119, 0, 0, 0, 0, + 0, 0, 257, 442, 257, 444, 256, 446, 116, 256, + 0, 0, 282, 262, 0, 262, 364, 365, 420, 259, + 127, 0, 127, 0, 259, 299, 121, 0, 0, 256, + 256, 0, 0, 0, 0, 0, 0, 0, 306, 259, + 259, 0, 0, 259, 257, 0, 117, 257, 0, 0, + 0, 122, 0, 385, 0, 262, 387, 262, 262, 0, + 0, 0, 127, 0, 127, 127, 0, 257, 257, 0, + 0, 0, 0, -201, -201, 0, -201, 0, 262, 262, + -201, 0, 0, 0, 345, 127, 127, 0, 123, -201, + 0, 0, -201, 0, 0, 351, 0, 353, 259, 0, + 360, 260, 0, 0, 0, 413, 259, 0, 0, 0, + 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 431, 124, 432, 0, 433, 368, 0, 0, + -201, -201, 261, 0, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 0, 260, 0, 0, 0, + 0, 260, 389, 0, 0, 0, 0, 122, 0, 0, + 0, 125, 0, 0, 0, 307, 260, 260, 0, 0, + 260, 0, 0, 0, 0, 0, 0, 261, 403, 404, + 405, 406, 261, 0, 306, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 123, 0, 121, 309, 310, 0, + 0, 261, 122, 415, 0, 417, 419, 122, 35, 36, + 259, 38, 259, 0, 0, 6, 42, 43, 44, 45, + 0, 122, 122, 122, 113, 260, 122, 0, 0, 124, + 0, 0, 0, 260, -209, -209, 0, -209, 0, 123, + 0, -209, 0, 0, 123, 0, 154, 0, 454, 0, + -209, 0, 259, -209, 259, 259, 261, 0, 123, 123, + 123, 0, 0, 123, 358, 17, 53, 125, 0, 0, + 0, 0, 0, 0, 124, 259, 259, 0, 0, 124, + 0, 122, 0, 0, 0, 0, 0, 0, 0, 122, + 0, -209, -209, 124, 124, 124, 0, 0, 124, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 220, 113, 125, 0, 125, 125, - 0, 0, 0, 221, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, - 125, 0, 0, 0, 0, 0, 0, 202, 0, 0, - 0, 0, 0, 0, 0, 203, 17, 53, 204, 205, - 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, 0, 0, - 157, 303, 113, 0, 0, 0, 0, 0, 0, 0, - 221, 222, 0, 0, 0, 0, 0, 0, -198, -198, - 0, -198, 0, 0, 0, -198, 0, 0, 0, 0, - 0, 0, 0, 0, -198, 277, 0, -198, 0, 0, - 0, 0, 203, 17, 53, 204, 205, 206, 0, 207, - 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, -198, -198, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 0, 221, 222, 0, - 0, 0, 0, 0, 0, -199, -199, 0, -199, 0, - 0, 0, -199, 0, 0, 0, 0, 0, 0, 0, - 0, -199, 338, 0, -199, 0, 0, 0, 0, 203, - 17, 53, 204, 205, 206, 0, 207, 208, 209, 210, + 45, 307, 125, 0, 0, 221, 0, 125, 123, 0, + 0, 0, 0, 222, 223, 0, 123, -202, -202, 0, + -202, 125, 125, 125, -202, 0, 125, 260, 0, 260, + 0, 0, 121, -202, 0, 0, -202, 0, 0, 0, + 0, 0, 0, 124, 0, 0, 17, 53, 0, -203, + -203, 124, -203, 0, 0, 0, -203, 122, 261, 0, + 261, 0, 0, 0, 0, -203, 0, 0, -203, 260, + 0, 260, 260, 0, -202, -202, 0, 0, 0, -204, + -204, 125, -204, 122, 0, 122, -204, 0, 0, 125, + 0, 0, 260, 260, 123, -204, 0, 0, -204, 0, + 261, 0, 358, 261, 131, 132, -203, -203, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 123, 0, 123, 261, 261, 122, 0, 122, 122, 124, + 144, 145, 146, 147, 148, 0, -204, -204, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34, 122, 122, + 0, 0, 0, 0, 0, 124, 0, 124, 0, 0, + 0, 0, 123, 0, 123, 123, 0, 125, 0, 0, + 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 123, 123, 104, 105, 0, + 0, 48, 0, 125, 0, 125, 0, 124, 0, 124, + 124, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 124, 124, 0, 0, 51, 0, 0, 52, 17, 53, + 30, 54, 55, 56, 0, 125, 0, 125, 125, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 0, 0, 0, 0, 203, 125, 125, + 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 35, 36, + 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, + 0, 0, 157, 220, 221, 0, 0, 0, 0, 0, + 0, 202, 222, 223, 0, 0, 0, 0, 0, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 35, 36, 34, 38, 0, 0, 0, 6, 42, 43, - 44, 45, -199, -199, 157, 0, 113, 0, 0, 0, - 0, 0, 0, 0, 221, 222, 35, 36, 37, 38, - 39, 40, 41, 6, 42, 43, 44, 45, 46, 334, - 0, 0, 104, 105, 130, 0, 48, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 17, 53, 0, - 0, 0, 49, 50, 0, 34, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 51, - 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, - 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, - 45, 46, 0, 0, 0, 47, 0, 0, 0, 48, - 0, 296, 0, -200, -200, 0, -200, 0, 0, 0, - -200, 0, 0, 0, 0, 49, 50, 0, 34, -200, - 0, 0, -200, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, - 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, - 42, 43, 44, 45, 46, 0, 0, 0, 47, 0, - -200, -200, 48, 0, 0, 0, -201, -201, 0, -201, - 0, 0, 0, -201, 0, 0, 0, 0, 49, 50, - 0, 34, -201, 0, 0, -201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 51, 0, 0, 52, 17, - 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, - 40, 41, 6, 42, 43, 44, 45, 46, 0, 0, - 0, 104, 0, -201, -201, 48, 0, 0, 0, 310, - 311, 0, 312, 313, 0, 0, 0, 0, 0, 0, - 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 35, 36, 0, 38, 0, 0, 51, 6, - 0, 52, 17, 53, 30, 54, 55, 56, 149, 0, - 0, 174, 0, 0, 0, 0, 314, 315, 0, 0, + 35, 36, 0, 38, 0, 17, 53, 6, 42, 43, + 44, 45, 0, 0, 157, 311, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 0, 0, 0, 0, + 0, 0, 35, 36, 0, 38, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 279, + 0, 150, 0, 0, 0, 0, 203, 17, 53, 204, + 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 35, 36, 0, + 38, 0, 0, 0, 6, 42, 43, 44, 45, 17, + 53, 157, 0, 221, 0, 0, 0, 0, 0, 0, + 0, 222, 223, 0, 0, 0, 0, 0, 0, -205, + -205, 0, -205, 0, 0, 0, -205, 0, 0, 0, + 0, 0, 0, 0, 0, -205, 347, 0, -205, 0, + 0, 0, 0, 203, 17, 53, 204, 205, 206, 0, + 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 35, 36, 34, 38, 0, 0, + 0, 6, 42, 43, 44, 45, -205, -205, 157, 0, + 221, 0, 0, 0, 0, 0, 0, 0, 222, 223, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 0, 0, 0, 47, 0, 0, 0, + 48, 0, 298, 0, 0, 0, 0, -206, -206, 0, + -206, 17, 53, 0, -206, 0, 49, 50, 0, 34, + 0, 0, 0, -206, 0, 0, -206, 0, 0, 0, + 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, + 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, + 6, 42, 43, 44, 45, 46, 0, 0, 0, 47, + 0, 0, 0, 48, -206, -206, 0, -207, -207, 0, + -207, 0, 0, 0, -207, 0, 0, 0, 0, 49, + 50, 0, 34, -207, 0, 0, -207, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 0, 0, 52, + 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, + 39, 40, 41, 6, 42, 43, 44, 45, 46, 0, + 0, 0, 104, 0, -207, -207, 48, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -208, -208, 0, + -208, 0, 49, 50, -208, 0, 0, 0, 0, 0, + 0, 0, 0, -208, 0, 0, -208, 0, 0, 51, + 0, 0, 52, 17, 53, 30, 54, 55, 56, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, + 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 35, 36, 0, 38, -208, -208, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 35, 36, 0, 38, + 0, 0, 149, 6, 0, 174, 0, 0, 0, 0, + 323, 324, 149, 0, 0, 174, 0, 17, 53, 0, + 0, 0, 0, 0, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 0, 0, 0, 0, 0, + 0, 0, 167, 17, 53, 0, 0, 168, 0, 0, + 0, 0, 130, 17, 53, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 425, 0, 0, 0, + 0, 426, 0, 0, 0, 0, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 0, 0, 0, 0, 0, 0, 0, 203, 17, - 53, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, - 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 221, 222, 35, 36, 0, 38, 0, - 0, 0, 6, 0, 0, 35, 36, 0, 38, 0, - 0, 149, 6, 0, 174, 0, 0, 0, 0, 314, - 315, 149, 0, 0, 174, 0, 17, 53, 0, 0, - 0, 0, 0, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 0, 0, 0, 0, 0, 0, - 0, 167, 17, 53, 0, 0, 168, 0, 0, 0, - 0, 130, 17, 53, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 412, 0, 0, 0, 0, - 413, 0, 0, 0, 0, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 427, 0, 0, 0, 0, 428, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 429, 0, 0, 0, 0, 430, + 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 393, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 395, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 414, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 416, 0, 0, 0, 0, 417, 0, - 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 167, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 399, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 412, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 436, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 438, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 381, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 383, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 387, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 399, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 425, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 459, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 271, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 276, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 336, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 339, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 342, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 343, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 269, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 274, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 327, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 330, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 333, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 273, 0, 130, 0, 0, 131, 132, + 146, 147, 148, 275, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 340, 130, 0, 0, 131, 132, + 145, 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 354, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 363, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, @@ -4209,226 +4291,232 @@ namespace xsk { namespace gsc { namespace s1 { 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, 146, 147, 148, 131, - 132, 0, 0, 135, 136, 137, 138, 139, 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 144, 145, 146, 147, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 147, 148 }; const short parser::yycheck_[] = { - 0, 287, 287, 94, 21, 287, 47, 154, 74, 9, - 3, 4, 52, 47, 161, 74, 47, 164, 51, 47, - 11, 12, 13, 14, 15, 202, 26, 52, 56, 47, - 207, 30, 97, 98, 53, 35, 36, 52, 56, 58, - 93, 0, 35, 36, 99, 51, 99, 62, 48, 102, - 62, 51, 53, 78, 62, 121, 47, 58, 51, 58, - 56, 53, 121, 104, 98, 53, 58, 98, 53, 97, - 98, 98, 53, 58, 74, 40, 41, 58, 43, 97, - 98, 74, 47, 48, 49, 50, 51, 52, 60, 40, - 41, 56, 43, 60, 62, 95, 47, 48, 49, 50, - 51, 53, 279, 53, 52, 56, 58, 98, 58, 40, - 41, 54, 43, 64, 65, 56, 47, 48, 49, 50, - 51, 121, 60, 56, 157, 56, 53, 52, 121, 276, - 53, 58, 97, 98, 60, 58, 101, 102, 424, 424, - 53, 56, 424, 53, 53, 58, 97, 98, 58, 58, - 58, 157, 299, 300, 53, 155, 57, 157, 56, 58, - 60, 52, 162, 98, 157, 165, 97, 98, 52, 202, - 94, 95, 96, 62, 207, 175, 92, 93, 94, 95, - 96, 52, 329, 52, 52, 332, 52, 52, 221, 222, - 62, 61, 225, 259, 52, 212, 202, 52, 62, 62, - 259, 207, 202, 62, 381, 62, 383, 207, 62, 202, - 62, 62, 52, 52, 207, 221, 222, 53, 27, 225, - 57, 221, 222, 27, 102, 225, 61, 61, 221, 222, - 52, 378, 225, 52, 52, 301, 302, 46, 52, 62, - 49, 50, 301, 302, 57, 422, 279, 394, 425, 396, - 57, 398, 57, 52, 287, 40, 41, 52, 43, 259, - 62, 52, 47, 52, 51, 62, 259, 52, 445, 446, - 52, 56, 62, 279, 59, 25, 62, 53, 30, 279, - 9, 287, 62, 349, 62, 62, 279, 287, 288, 62, - 349, 51, 62, 62, 287, 104, 387, 53, 51, 53, - 62, 301, 302, 112, 53, 62, 9, 9, 301, 302, - 424, 225, 97, 98, 51, 66, 67, 212, -1, -1, - -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 92, 93, 94, 95, 96, -1, -1, 381, 349, - 383, 160, -1, -1, 163, -1, 349, 166, -1, 168, - -1, 170, -1, -1, 173, -1, -1, 51, -1, -1, - 157, -1, 413, 51, 415, 381, 417, 383, -1, -1, - -1, 381, -1, 383, 51, -1, 386, -1, 381, 422, - 383, 424, 425, -1, 203, -1, -1, 157, -1, -1, - -1, -1, -1, -1, 157, -1, -1, 216, -1, -1, - -1, -1, 445, 446, -1, 202, 422, -1, 424, 425, - 207, -1, 422, -1, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, 221, 222, -1, -1, 225, 445, - 446, -1, 202, -1, -1, 445, 446, 207, -1, 202, - -1, -1, 445, 446, 207, 51, -1, -1, -1, -1, - -1, 221, 222, -1, 273, 225, -1, -1, 221, 222, - -1, -1, 225, 157, -1, 284, -1, 286, -1, 157, - 289, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 157, -1, 279, -1, -1, -1, -1, -1, -1, -1, - 287, -1, -1, -1, -1, -1, -1, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 202, 279, - -1, -1, -1, 207, 202, 334, 279, 287, -1, 207, - -1, -1, -1, -1, 287, 202, -1, 221, 222, -1, - 207, 225, -1, 221, 222, -1, -1, 225, 357, 358, - 359, 360, -1, -1, 221, 222, -1, -1, 225, -1, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 382, -1, 384, 385, -1, -1, -1, - -1, -1, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, 381, 279, 383, 40, 41, 56, - 43, 279, 59, 287, 47, -1, 202, -1, -1, 287, - -1, 207, 279, 56, -1, -1, 59, 426, -1, -1, - 287, 381, -1, 383, -1, 221, 222, -1, 381, 225, - 383, -1, -1, -1, -1, 422, -1, 424, 425, -1, - 97, 98, -1, -1, 40, 41, -1, 43, -1, -1, - -1, 47, -1, -1, 97, 98, -1, -1, 445, 446, - 56, -1, 422, 59, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 279, -1, 445, 446, -1, -1, -1, - -1, 287, 445, 446, -1, -1, -1, 381, -1, 383, - -1, 97, 98, 381, -1, 383, 40, 41, -1, 43, - -1, -1, -1, 47, 381, -1, 383, 40, 41, -1, - 43, -1, 56, -1, 47, 59, -1, -1, -1, -1, - -1, -1, -1, 56, -1, -1, 59, -1, 422, -1, - 424, 425, -1, -1, 422, -1, 424, 425, -1, -1, - -1, -1, -1, -1, -1, 422, -1, 424, 425, -1, - -1, 445, 446, 97, 98, -1, -1, 445, 446, -1, - -1, -1, -1, -1, 97, 98, -1, -1, 445, 446, - 11, -1, -1, -1, -1, 381, -1, 383, 19, -1, - -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 94, 51, 289, 47, 47, 21, 74, 202, 9, + 3, 4, 289, 207, 56, 289, 74, 11, 12, 13, + 14, 15, 40, 41, 47, 43, 26, 47, 52, 47, + 48, 49, 50, 51, 52, 35, 36, 0, 56, 30, + 51, 53, 35, 36, 52, 99, 58, 52, 48, 62, + 47, 51, 62, 47, 121, 97, 98, 62, 51, 56, + 52, 104, 98, 121, 53, 57, 58, 58, 17, 18, + 78, 20, 21, 56, 74, 98, 93, 62, 98, 97, + 98, 74, 99, 101, 102, 102, 60, 281, 53, 57, + 58, 40, 41, 58, 43, 95, 66, 67, 47, 60, + 97, 98, 97, 98, 98, 56, 53, 56, 157, 53, + 59, 58, 53, 53, 58, 64, 65, 58, 58, 57, + 58, 121, 92, 93, 94, 95, 96, 52, 121, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 53, 60, 53, 57, 58, 58, 157, 58, 97, 98, + 54, 437, 52, 202, 53, 155, 53, 157, 207, 58, + 437, 58, 162, 437, 157, 165, 53, 94, 95, 96, + 56, 58, 221, 222, 223, 175, 53, 226, 53, 40, + 41, 58, 43, 58, 60, 56, 47, 48, 49, 50, + 51, 202, 58, 57, 261, 56, 207, 212, 56, 393, + 60, 395, 202, 261, 52, 98, 52, 207, 62, 202, + 221, 222, 223, 52, 207, 226, 27, 52, 52, 52, + 52, 221, 222, 223, 61, 52, 226, 52, 221, 222, + 223, 62, 281, 226, 62, 46, 97, 98, 49, 50, + 289, 435, 309, 310, 438, 62, 62, 62, 51, 154, + 62, 309, 310, 62, 62, 78, 161, 52, 52, 164, + 57, 261, 53, 27, 458, 459, 102, 57, 261, 61, + 281, 92, 93, 94, 95, 96, 61, 52, 289, 52, + 52, 281, 52, 57, 52, 62, 57, 52, 281, 289, + 290, 358, 52, 104, 52, 62, 289, 52, 25, 62, + 358, 112, 30, 62, 9, 62, 399, 53, 62, 309, + 310, 62, 62, 62, 62, 53, 309, 310, 367, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 53, + 53, 62, 62, 62, 393, 9, 395, 9, 226, 160, + 437, 367, 163, 51, 157, 166, 367, 168, 358, 170, + 212, -1, 173, -1, -1, 358, -1, 367, -1, -1, + -1, -1, -1, 278, 367, 51, -1, -1, -1, -1, + -1, -1, 393, 426, 395, 428, 435, 430, 437, 438, + -1, -1, 203, 393, -1, 395, 301, 302, 398, 202, + 393, -1, 395, -1, 207, 216, 51, -1, -1, 458, + 459, -1, -1, -1, -1, -1, -1, -1, 221, 222, + 223, -1, -1, 226, 435, -1, 437, 438, -1, -1, + -1, 51, -1, 338, -1, 435, 341, 437, 438, -1, + -1, -1, 435, -1, 437, 438, -1, 458, 459, -1, + -1, -1, -1, 40, 41, -1, 43, -1, 458, 459, + 47, -1, -1, -1, 275, 458, 459, -1, 51, 56, + -1, -1, 59, -1, -1, 286, -1, 288, 281, -1, + 291, 157, -1, -1, -1, 390, 289, -1, -1, -1, + -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 407, 51, 409, -1, 411, 318, -1, -1, + 97, 98, 157, -1, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, -1, 202, -1, -1, -1, + -1, 207, 343, -1, -1, -1, -1, 157, -1, -1, + -1, 51, -1, -1, -1, 221, 222, 223, -1, -1, + 226, -1, -1, -1, -1, -1, -1, 202, 369, 370, + 371, 372, 207, -1, 367, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 157, -1, 221, 222, 223, -1, + -1, 226, 202, 394, -1, 396, 397, 207, 40, 41, + 393, 43, 395, -1, -1, 47, 48, 49, 50, 51, + -1, 221, 222, 223, 56, 281, 226, -1, -1, 157, + -1, -1, -1, 289, 40, 41, -1, 43, -1, 202, + -1, 47, -1, -1, 207, -1, 52, -1, 439, -1, + 56, -1, 435, 59, 437, 438, 281, -1, 221, 222, + 223, -1, -1, 226, 289, 97, 98, 157, -1, -1, + -1, -1, -1, -1, 202, 458, 459, -1, -1, 207, + -1, 281, -1, -1, -1, -1, -1, -1, -1, 289, + -1, 97, 98, 221, 222, 223, -1, -1, 226, 40, 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, 55, 56, 422, -1, 424, 425, - -1, -1, -1, 64, 65, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 445, - 446, -1, -1, -1, -1, -1, -1, 11, -1, -1, - -1, -1, -1, -1, -1, 19, 97, 98, 22, 23, - 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, - -1, -1, -1, 47, 48, 49, 50, 51, -1, -1, - 54, 55, 56, -1, -1, -1, -1, -1, -1, -1, - 64, 65, -1, -1, -1, -1, -1, -1, 40, 41, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, - -1, -1, -1, -1, 56, 12, -1, 59, -1, -1, - -1, -1, 19, 97, 98, 22, 23, 24, -1, 26, - 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, 97, 98, 54, -1, 56, - -1, -1, -1, -1, -1, -1, -1, 64, 65, -1, - -1, -1, -1, -1, -1, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - -1, 56, 12, -1, 59, -1, -1, -1, -1, 19, - 97, 98, 22, 23, 24, -1, 26, 27, 28, 29, + 51, 367, 202, -1, -1, 56, -1, 207, 281, -1, + -1, -1, -1, 64, 65, -1, 289, 40, 41, -1, + 43, 221, 222, 223, 47, -1, 226, 393, -1, 395, + -1, -1, 367, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 281, -1, -1, 97, 98, -1, 40, + 41, 289, 43, -1, -1, -1, 47, 367, 393, -1, + 395, -1, -1, -1, -1, 56, -1, -1, 59, 435, + -1, 437, 438, -1, 97, 98, -1, -1, -1, 40, + 41, 281, 43, 393, -1, 395, 47, -1, -1, 289, + -1, -1, 458, 459, 367, 56, -1, -1, 59, -1, + 435, -1, 437, 438, 66, 67, 97, 98, 70, 71, + 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, + 393, -1, 395, 458, 459, 435, -1, 437, 438, 367, + 92, 93, 94, 95, 96, -1, 97, 98, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, 458, 459, + -1, -1, -1, -1, -1, 393, -1, 395, -1, -1, + -1, -1, 435, -1, 437, 438, -1, 367, -1, -1, + -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, -1, 458, 459, 56, 57, -1, + -1, 60, -1, 393, -1, 395, -1, 435, -1, 437, + 438, -1, -1, -1, -1, -1, -1, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 458, 459, -1, -1, 93, -1, -1, 96, 97, 98, + 99, 100, 101, 102, -1, 435, -1, 437, 438, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, + -1, -1, -1, -1, -1, -1, -1, 19, 458, 459, + 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, + -1, -1, 54, 55, 56, -1, -1, -1, -1, -1, + -1, 11, 64, 65, -1, -1, -1, -1, -1, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 16, 43, -1, -1, -1, 47, 48, 49, - 50, 51, 97, 98, 54, -1, 56, -1, -1, -1, - -1, -1, -1, -1, 64, 65, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 58, - -1, -1, 56, 57, 63, -1, 60, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 97, 98, -1, - -1, -1, 76, 77, -1, 16, -1, -1, -1, -1, - 89, 90, 91, 92, 93, 94, 95, 96, -1, 93, - -1, -1, 96, 97, 98, 99, 100, 101, 102, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, -1, -1, -1, 56, -1, -1, -1, 60, - -1, 62, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, 76, 77, -1, 16, 56, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, 96, 97, 98, 99, 100, - 101, 102, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, -1, -1, -1, 56, -1, - 97, 98, 60, -1, -1, -1, 40, 41, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, 76, 77, - -1, 16, 56, -1, -1, 59, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, 96, 97, - 98, 99, 100, 101, 102, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, - -1, 56, -1, 97, 98, 60, -1, -1, -1, 17, - 18, -1, 20, 21, -1, -1, -1, -1, -1, -1, - -1, 76, 77, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 40, 41, -1, 43, -1, -1, 93, 47, - -1, 96, 97, 98, 99, 100, 101, 102, 56, -1, - -1, 59, -1, -1, -1, -1, 64, 65, -1, -1, + 40, 41, -1, 43, -1, 97, 98, 47, 48, 49, + 50, 51, -1, -1, 54, 55, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, -1, -1, -1, -1, + -1, -1, 40, 41, -1, 43, -1, -1, -1, 47, + -1, -1, -1, -1, -1, -1, -1, -1, 56, 12, + -1, 59, -1, -1, -1, -1, 19, 97, 98, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, -1, -1, 47, 48, 49, 50, 51, 97, + 98, 54, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 64, 65, -1, -1, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, -1, -1, 56, 12, -1, 59, -1, + -1, -1, -1, 19, 97, 98, 22, 23, 24, -1, + 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 16, 43, -1, -1, + -1, 47, 48, 49, 50, 51, 97, 98, 54, -1, + 56, -1, -1, -1, -1, -1, -1, -1, 64, 65, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, 40, 41, -1, + 43, 97, 98, -1, 47, -1, 76, 77, -1, 16, + -1, -1, -1, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 93, -1, -1, 96, 97, 98, 99, + 100, 101, 102, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, -1, -1, -1, 56, + -1, -1, -1, 60, 97, 98, -1, 40, 41, -1, + 43, -1, -1, -1, 47, -1, -1, -1, -1, 76, + 77, -1, 16, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, + 97, 98, 99, 100, 101, 102, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + -1, -1, 56, -1, 97, 98, 60, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, -1, 76, 77, 47, -1, -1, -1, -1, -1, + -1, -1, -1, 56, -1, -1, 59, -1, -1, 93, + -1, -1, 96, 97, 98, 99, 100, 101, 102, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, + -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, -1, 43, 97, 98, -1, 47, 48, 49, + 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, 40, 41, -1, 43, + -1, -1, -1, 47, -1, -1, 40, 41, -1, 43, + -1, -1, 56, 47, -1, 59, -1, -1, -1, -1, + 64, 65, 56, -1, -1, 59, -1, 97, 98, -1, + -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, + -1, -1, 53, 97, 98, -1, -1, 58, -1, -1, + -1, -1, 63, 97, 98, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 53, -1, -1, -1, + -1, 58, -1, -1, -1, -1, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, -1, -1, -1, -1, 19, 97, - 98, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, - -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, 40, 41, -1, 43, -1, - -1, 56, 47, -1, 59, -1, -1, -1, -1, 64, - 65, 56, -1, -1, 59, -1, 97, 98, -1, -1, - -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, -1, -1, -1, -1, -1, -1, - -1, 53, 97, 98, -1, -1, 58, -1, -1, -1, - -1, 63, 97, 98, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 53, -1, -1, -1, -1, - 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 53, -1, -1, -1, -1, 58, + -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 53, -1, -1, -1, -1, 58, -1, - -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 53, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, @@ -4456,9 +4544,8 @@ namespace xsk { namespace gsc { namespace s1 { -1, -1, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, -1, -1, -1, 90, -1, 92, 93, 94, 95, 96, 66, - 67, -1, -1, 70, 71, 72, 73, 74, 75, 66, 67, -1, -1, -1, -1, 72, 73, 74, 75, -1, - -1, -1, -1, -1, -1, 92, 93, 94, 95, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, 95, 96 }; @@ -4466,51 +4553,52 @@ namespace xsk { namespace gsc { namespace s1 { parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 47, 98, 114, 115, - 116, 117, 118, 119, 120, 121, 188, 97, 98, 189, - 189, 52, 0, 116, 117, 118, 52, 78, 62, 62, - 99, 191, 169, 188, 16, 40, 41, 42, 43, 44, + 116, 117, 118, 119, 120, 121, 191, 97, 98, 192, + 192, 52, 0, 116, 117, 118, 52, 78, 62, 62, + 99, 194, 169, 191, 16, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, 93, 96, 98, 100, 101, 102, 153, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 53, 53, 58, 56, 188, 189, 56, - 188, 189, 56, 153, 56, 57, 153, 170, 171, 188, - 153, 153, 52, 56, 101, 102, 164, 165, 173, 174, - 176, 177, 181, 182, 183, 184, 188, 189, 98, 62, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 53, 53, 58, 56, 191, 192, 56, + 191, 192, 56, 153, 56, 57, 153, 170, 171, 191, + 153, 153, 52, 56, 101, 102, 164, 165, 176, 177, + 179, 180, 184, 185, 186, 187, 191, 192, 98, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, 93, 94, 95, 96, 56, - 59, 166, 167, 188, 52, 60, 62, 54, 127, 188, + 59, 166, 167, 191, 52, 60, 62, 54, 127, 191, 56, 52, 60, 56, 52, 60, 56, 53, 58, 153, 58, 57, 153, 56, 59, 60, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 47, 98, 187, 170, - 171, 188, 11, 19, 22, 23, 24, 26, 27, 28, + 153, 153, 153, 153, 153, 153, 47, 98, 190, 170, + 171, 191, 11, 19, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 55, 64, 65, 122, 123, 125, 126, 127, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 155, 156, 157, 164, 165, 173, 174, 177, - 188, 153, 170, 188, 153, 170, 188, 153, 153, 57, - 153, 153, 188, 61, 57, 53, 52, 12, 122, 124, - 153, 62, 52, 62, 52, 122, 52, 52, 52, 52, - 93, 191, 194, 61, 62, 62, 62, 153, 62, 52, - 52, 177, 177, 55, 123, 62, 62, 62, 62, 62, - 17, 18, 20, 21, 64, 65, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 57, 53, 52, - 57, 53, 52, 57, 58, 57, 153, 170, 12, 122, - 62, 53, 153, 27, 153, 128, 155, 156, 157, 177, - 188, 153, 61, 61, 62, 170, 170, 52, 52, 52, - 52, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 57, 170, 57, 170, 57, 153, 52, 53, - 62, 53, 52, 53, 62, 30, 58, 53, 53, 53, - 153, 153, 153, 153, 52, 53, 52, 53, 52, 53, - 170, 122, 153, 122, 153, 154, 153, 188, 127, 62, - 62, 53, 53, 58, 53, 58, 53, 58, 170, 170, - 170, 53, 25, 53, 62, 53, 30, 62, 62, 171, - 62, 171, 62, 171, 53, 53, 53, 122, 62, 128, - 122, 153, 53, 53, 53, 53, 53, 62, 62, 62, - 122, 122 + 55, 56, 64, 65, 122, 123, 125, 126, 127, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 155, 156, 157, 164, 165, 173, 176, + 177, 180, 191, 153, 170, 191, 153, 170, 191, 153, + 153, 57, 153, 153, 191, 61, 57, 53, 52, 12, + 122, 124, 153, 62, 52, 62, 52, 122, 52, 52, + 52, 52, 93, 194, 197, 61, 62, 62, 62, 153, + 62, 52, 52, 56, 174, 175, 176, 177, 191, 180, + 180, 55, 123, 62, 62, 62, 62, 62, 78, 17, + 18, 20, 21, 64, 65, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 57, 53, 52, 57, + 53, 52, 57, 58, 57, 153, 170, 12, 122, 62, + 53, 153, 27, 153, 128, 155, 156, 157, 180, 191, + 153, 61, 61, 62, 170, 170, 57, 58, 153, 52, + 52, 52, 52, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 57, 170, 57, 170, 57, 153, + 52, 53, 62, 53, 52, 53, 62, 30, 58, 53, + 53, 53, 175, 153, 153, 153, 153, 52, 53, 52, + 53, 52, 53, 170, 122, 153, 122, 153, 154, 153, + 191, 127, 62, 62, 53, 53, 58, 53, 58, 53, + 58, 170, 170, 170, 53, 25, 53, 62, 53, 30, + 62, 62, 171, 62, 171, 62, 171, 53, 53, 53, + 122, 62, 128, 122, 153, 53, 53, 53, 53, 53, + 62, 62, 62, 122, 122 }; const unsigned char @@ -4526,19 +4614,20 @@ namespace xsk { namespace gsc { namespace s1 { 135, 135, 136, 137, 137, 138, 139, 140, 141, 142, 143, 143, 144, 145, 145, 146, 147, 148, 149, 149, 150, 151, 152, 153, 153, 153, 154, 154, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, - 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 156, 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, + 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 161, 162, 162, 162, 162, 163, 164, 164, 165, 165, - 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, - 168, 169, 169, 169, 170, 170, 171, 171, 172, 172, - 173, 174, 175, 176, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 188, 189, 189, 190, 191, 192, - 193, 193, 194, 194, 195, 196 + 160, 161, 162, 162, 162, 162, 163, 164, 164, 165, + 165, 166, 166, 166, 166, 166, 166, 167, 167, 167, + 167, 168, 169, 169, 169, 170, 170, 171, 171, 172, + 172, 173, 174, 174, 175, 175, 175, 176, 177, 178, + 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 191, 192, 192, 193, 194, 195, 196, 196, 197, + 197, 198, 199 }; const signed char @@ -4554,19 +4643,20 @@ namespace xsk { namespace gsc { namespace s1 { 8, 6, 2, 2, 4, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, - 4, 6, 5, 7, 5, 7, 8, 9, 9, 9, - 3, 3, 1, 0, 1, 0, 3, 1, 2, 3, - 4, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 7, - 2, 1, 2, 1, 1, 1 + 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, + 2, 4, 6, 5, 7, 5, 7, 8, 9, 9, + 9, 3, 3, 1, 0, 1, 0, 3, 1, 2, + 3, 3, 3, 1, 1, 1, 1, 4, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, + 1, 1, 1 }; @@ -4576,29 +4666,30 @@ namespace xsk { namespace gsc { namespace s1 { const short parser::yyrline_[] = { - 0, 260, 260, 261, 265, 267, 269, 271, 273, 275, - 280, 284, 289, 290, 291, 292, 293, 297, 302, 307, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 340, 341, 345, 347, 352, - 354, 359, 360, 364, 365, 369, 371, 373, 376, 380, - 382, 387, 389, 391, 396, 401, 403, 408, 413, 415, - 420, 422, 427, 432, 434, 439, 444, 449, 454, 459, - 464, 466, 471, 476, 478, 483, 488, 493, 498, 500, - 505, 510, 515, 520, 521, 522, 526, 527, 531, 533, - 535, 537, 539, 541, 543, 545, 547, 549, 551, 556, - 558, 563, 565, 570, 575, 577, 579, 581, 583, 585, - 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, - 607, 609, 614, 615, 616, 617, 618, 619, 620, 621, - 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, - 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, - 645, 650, 652, 654, 656, 661, 666, 667, 670, 671, - 675, 677, 679, 681, 683, 685, 690, 692, 694, 696, - 701, 706, 708, 711, 715, 718, 722, 724, 729, 731, - 736, 741, 746, 751, 756, 757, 758, 759, 760, 761, - 762, 763, 764, 768, 773, 778, 783, 788, 793, 798, - 803, 808, 813, 818, 820, 825, 827, 832, 837, 842, - 847, 849, 854, 856, 861, 866 + 0, 263, 263, 264, 268, 270, 272, 274, 276, 278, + 283, 287, 292, 293, 294, 295, 296, 300, 305, 310, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 343, 344, 348, 350, 355, + 357, 362, 363, 367, 368, 372, 374, 376, 379, 383, + 385, 390, 392, 394, 399, 404, 406, 411, 416, 418, + 423, 425, 430, 435, 437, 442, 447, 452, 457, 462, + 467, 469, 474, 479, 481, 486, 491, 496, 501, 503, + 508, 513, 518, 523, 524, 525, 529, 530, 534, 536, + 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, + 561, 563, 568, 570, 575, 580, 582, 584, 586, 588, + 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, + 610, 612, 614, 619, 620, 621, 622, 623, 624, 625, + 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, + 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, + 646, 650, 655, 657, 659, 661, 666, 671, 672, 675, + 676, 680, 682, 684, 686, 688, 690, 695, 697, 699, + 701, 706, 711, 713, 716, 720, 723, 727, 729, 734, + 736, 741, 746, 748, 753, 754, 755, 759, 764, 769, + 774, 779, 780, 781, 782, 783, 784, 785, 786, 787, + 791, 796, 801, 806, 811, 816, 821, 826, 831, 836, + 841, 843, 848, 850, 855, 860, 865, 870, 872, 877, + 879, 884, 889 }; void @@ -4631,9 +4722,9 @@ namespace xsk { namespace gsc { namespace s1 { #line 13 "parser.ypp" } } } // xsk::gsc::s1 -#line 4635 "parser.cpp" +#line 4726 "parser.cpp" -#line 870 "parser.ypp" +#line 893 "parser.ypp" void xsk::gsc::s1::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/s1/xsk/parser.hpp b/src/s1/xsk/parser.hpp index 324b64ed..a3cf6057 100644 --- a/src/s1/xsk/parser.hpp +++ b/src/s1/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace s1 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,104 +540,107 @@ namespace xsk { namespace gsc { namespace s1 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe - char dummy63[sizeof (ast::stmt_waitframe::ptr)]; + char dummy64[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill - char dummy64[sizeof (ast::stmt_waittill::ptr)]; + char dummy65[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy66[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy67[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy67[sizeof (ast::stmt_while::ptr)]; + char dummy68[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -643,7 +648,7 @@ namespace xsk { namespace gsc { namespace s1 { // "localized string" // "float" // "integer" - char dummy68[sizeof (std::string)]; + char dummy69[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -997,30 +1002,33 @@ namespace xsk { namespace gsc { namespace s1 { S_expr_arguments = 170, // expr_arguments S_expr_arguments_no_empty = 171, // expr_arguments_no_empty S_expr_reference = 172, // expr_reference - S_expr_array = 173, // expr_array - S_expr_field = 174, // expr_field - S_expr_size = 175, // expr_size - S_expr_paren = 176, // expr_paren - S_expr_object = 177, // expr_object - S_expr_thisthread = 178, // expr_thisthread - S_expr_empty_array = 179, // expr_empty_array - S_expr_undefined = 180, // expr_undefined - S_expr_game = 181, // expr_game - S_expr_self = 182, // expr_self - S_expr_anim = 183, // expr_anim - S_expr_level = 184, // expr_level - S_expr_animation = 185, // expr_animation - S_expr_animtree = 186, // expr_animtree - S_expr_identifier_nosize = 187, // expr_identifier_nosize - S_expr_identifier = 188, // expr_identifier - S_expr_path = 189, // expr_path - S_expr_istring = 190, // expr_istring - S_expr_string = 191, // expr_string - S_expr_vector = 192, // expr_vector - S_expr_float = 193, // expr_float - S_expr_integer = 194, // expr_integer - S_expr_false = 195, // expr_false - S_expr_true = 196 // expr_true + S_expr_tuple = 173, // expr_tuple + S_expr_tuple_arguments = 174, // expr_tuple_arguments + S_expr_tuple_types = 175, // expr_tuple_types + S_expr_array = 176, // expr_array + S_expr_field = 177, // expr_field + S_expr_size = 178, // expr_size + S_expr_paren = 179, // expr_paren + S_expr_object = 180, // expr_object + S_expr_thisthread = 181, // expr_thisthread + S_expr_empty_array = 182, // expr_empty_array + S_expr_undefined = 183, // expr_undefined + S_expr_game = 184, // expr_game + S_expr_self = 185, // expr_self + S_expr_anim = 186, // expr_anim + S_expr_level = 187, // expr_level + S_expr_animation = 188, // expr_animation + S_expr_animtree = 189, // expr_animtree + S_expr_identifier_nosize = 190, // expr_identifier_nosize + S_expr_identifier = 191, // expr_identifier + S_expr_path = 192, // expr_path + S_expr_istring = 193, // expr_istring + S_expr_string = 194, // expr_string + S_expr_vector = 195, // expr_vector + S_expr_float = 196, // expr_float + S_expr_integer = 197, // expr_integer + S_expr_false = 198, // expr_false + S_expr_true = 199 // expr_true }; }; @@ -1086,6 +1094,8 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1208,6 +1218,10 @@ namespace xsk { namespace gsc { namespace s1 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1861,6 +1875,20 @@ namespace xsk { namespace gsc { namespace s1 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2376,6 +2404,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2498,6 +2528,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4839,8 +4873,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2419, ///< Last index in yytable_. - yynnts_ = 84, ///< Number of nonterminal symbols. + yylast_ = 2479, ///< Last index in yytable_. + yynnts_ = 87, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4896,6 +4930,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -5018,6 +5054,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5218,6 +5258,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5340,6 +5382,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5547,7 +5593,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s1 -#line 5551 "parser.hpp" +#line 5597 "parser.hpp" diff --git a/src/s1/xsk/resolver.cpp b/src/s1/xsk/resolver.cpp index ae631e01..804411d2 100644 --- a/src/s1/xsk/resolver.cpp +++ b/src/s1/xsk/resolver.cpp @@ -47,7 +47,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -59,7 +59,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -76,7 +76,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -105,7 +105,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/s1/xsk/s1.cpp b/src/s1/xsk/s1.cpp index 5c91be59..205f3633 100644 --- a/src/s1/xsk/s1.cpp +++ b/src/s1/xsk/s1.cpp @@ -175,7 +175,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/s2/xsk/assembler.cpp b/src/s2/xsk/assembler.cpp index 428a0ee9..edcaf0cc 100644 --- a/src/s2/xsk/assembler.cpp +++ b/src/s2/xsk/assembler.cpp @@ -386,7 +386,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_end_switch(inst); break; default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -493,6 +493,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -556,7 +560,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -569,7 +573,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::s2 diff --git a/src/s2/xsk/compiler.cpp b/src/s2/xsk/compiler.cpp index d8a95357..5c84699c 100644 --- a/src/s2/xsk/compiler.cpp +++ b/src/s2/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -395,7 +400,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1038,11 +1043,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1548,7 +1560,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const { for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } @@ -1593,6 +1605,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1632,7 +1667,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1718,7 +1753,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2247,7 +2282,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2314,11 +2349,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2341,11 +2376,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2373,7 +2408,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2382,7 +2417,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2390,8 +2425,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2423,13 +2458,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2589,23 +2624,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2632,7 +2684,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2646,7 +2698,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2659,7 +2710,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2837,8 +2888,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2853,7 +2903,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2886,7 +2936,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/s2/xsk/compiler.hpp b/src/s2/xsk/compiler.hpp index d2e16e31..b618fbcb 100644 --- a/src/s2/xsk/compiler.hpp +++ b/src/s2/xsk/compiler.hpp @@ -96,6 +96,7 @@ private: void emit_expr_arguments(const ast::expr_arguments::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -137,10 +138,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/s2/xsk/decompiler.cpp b/src/s2/xsk/decompiler.cpp index 351b5b38..426cf841 100644 --- a/src/s2/xsk/decompiler.cpp +++ b/src/s2/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,45 +1228,45 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waitFrame: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1278,69 +1275,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1349,98 +1345,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1448,263 +1446,250 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_BoolNotAfterAnd: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1724,7 +1709,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1751,7 +1736,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1778,7 +1763,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1786,9 +1770,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1799,60 +1784,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -1982,7 +1945,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2016,7 +1979,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2033,7 +1996,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2162,7 +2125,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2222,7 +2185,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2254,7 +2217,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2385,17 +2348,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2428,7 +2391,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2439,17 +2402,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2493,7 +2456,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2645,7 +2608,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2749,8 +2712,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -2994,7 +2957,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3023,7 +2986,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3063,7 +3026,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3185,9 +3148,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3436,11 +3396,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3458,7 +3413,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3476,7 +3431,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/s2/xsk/decompiler.hpp b/src/s2/xsk/decompiler.hpp index 6d950973..2d5ef107 100644 --- a/src/s2/xsk/decompiler.hpp +++ b/src/s2/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/s2/xsk/disassembler.cpp b/src/s2/xsk/disassembler.cpp index 6821545b..f338be00 100644 --- a/src/s2/xsk/disassembler.cpp +++ b/src/s2/xsk/disassembler.cpp @@ -301,7 +301,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_end_switch(inst); break; default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -495,7 +495,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -518,7 +518,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/s2/xsk/lexer.cpp b/src/s2/xsk/lexer.cpp index 5154ce93..00ea9894 100644 --- a/src/s2/xsk/lexer.cpp +++ b/src/s2/xsk/lexer.cpp @@ -683,7 +683,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -717,7 +717,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -751,7 +751,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/s2/xsk/parser.cpp b/src/s2/xsk/parser.cpp index 8c047970..fcca5124 100644 --- a/src/s2/xsk/parser.cpp +++ b/src/s2/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -366,6 +368,10 @@ namespace xsk { namespace gsc { namespace s2 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -550,6 +556,8 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -672,6 +680,10 @@ namespace xsk { namespace gsc { namespace s2 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -856,6 +868,8 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -978,6 +992,10 @@ namespace xsk { namespace gsc { namespace s2 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1161,6 +1179,8 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1283,6 +1303,10 @@ namespace xsk { namespace gsc { namespace s2 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1721,6 +1745,8 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1843,6 +1869,10 @@ namespace xsk { namespace gsc { namespace s2 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -2004,1351 +2034,1393 @@ namespace xsk { namespace gsc { namespace s2 { switch (yyn) { case 2: // root: program -#line 260 "parser.ypp" +#line 263 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2010 "parser.cpp" - break; - - case 3: // root: %empty -#line 261 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 2016 "parser.cpp" - break; - - case 4: // program: program inline -#line 266 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2022 "parser.cpp" - break; - - case 5: // program: program include -#line 268 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2028 "parser.cpp" - break; - - case 6: // program: program declaration -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2034 "parser.cpp" - break; - - case 7: // program: inline -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2040 "parser.cpp" break; - case 8: // program: include -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 264 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2046 "parser.cpp" break; - case 9: // program: declaration -#line 276 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 269 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2052 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 280 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 271 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2058 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 285 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2064 "parser.cpp" break; - case 12: // declaration: "/#" -#line 289 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2070 "parser.cpp" break; - case 13: // declaration: "#/" -#line 290 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2076 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 291 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 279 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2082 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 292 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 283 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2088 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 293 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 288 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2094 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 298 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 292 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2100 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 303 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 293 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2106 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 308 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 294 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2112 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 312 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 295 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2118 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 313 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 296 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2124 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 314 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 301 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2130 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 315 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 306 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2136 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 311 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2142 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 315 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2148 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 316 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2154 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 317 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2160 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 318 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2166 "parser.cpp" break; - case 29: // stmt: stmt_waitframe -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } + case 24: // stmt: stmt_notify +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2172 "parser.cpp" break; - case 30: // stmt: stmt_if -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 25: // stmt: stmt_wait +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2178 "parser.cpp" break; - case 31: // stmt: stmt_ifelse -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2184 "parser.cpp" break; - case 32: // stmt: stmt_while -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2190 "parser.cpp" break; - case 33: // stmt: stmt_dowhile -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2196 "parser.cpp" break; - case 34: // stmt: stmt_for -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 29: // stmt: stmt_waitframe +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2202 "parser.cpp" break; - case 35: // stmt: stmt_foreach -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 30: // stmt: stmt_if +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2208 "parser.cpp" break; - case 36: // stmt: stmt_switch -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 31: // stmt: stmt_ifelse +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2214 "parser.cpp" break; - case 37: // stmt: stmt_case -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 32: // stmt: stmt_while +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2220 "parser.cpp" break; - case 38: // stmt: stmt_default -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 33: // stmt: stmt_dowhile +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2226 "parser.cpp" break; - case 39: // stmt: stmt_break -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 34: // stmt: stmt_for +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2232 "parser.cpp" break; - case 40: // stmt: stmt_continue -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 35: // stmt: stmt_foreach +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2238 "parser.cpp" break; - case 41: // stmt: stmt_return -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 36: // stmt: stmt_switch +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2244 "parser.cpp" break; - case 42: // stmt: stmt_breakpoint -#line 334 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 37: // stmt: stmt_case +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2250 "parser.cpp" break; - case 43: // stmt: stmt_prof_begin -#line 335 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 38: // stmt: stmt_default +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2256 "parser.cpp" break; - case 44: // stmt: stmt_prof_end -#line 336 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 39: // stmt: stmt_break +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2262 "parser.cpp" break; - case 45: // stmt_or_dev: stmt -#line 340 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 40: // stmt: stmt_continue +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2268 "parser.cpp" break; - case 46: // stmt_or_dev: stmt_dev -#line 341 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 41: // stmt: stmt_return +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2274 "parser.cpp" break; - case 47: // stmt_list: stmt_list stmt -#line 346 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_breakpoint +#line 337 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2280 "parser.cpp" break; - case 48: // stmt_list: stmt -#line 348 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_begin +#line 338 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2286 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 353 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt: stmt_prof_end +#line 339 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2292 "parser.cpp" break; - case 50: // stmt_or_dev_list: stmt_or_dev -#line 355 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 45: // stmt_or_dev: stmt +#line 343 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2298 "parser.cpp" break; - case 51: // stmt_dev: "/#" stmt_list "#/" -#line 359 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 46: // stmt_or_dev: stmt_dev +#line 344 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2304 "parser.cpp" break; - case 52: // stmt_dev: "/#" "#/" -#line 360 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 47: // stmt_list: stmt_list stmt +#line 349 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2310 "parser.cpp" break; - case 53: // stmt_block: "{" stmt_or_dev_list "}" -#line 364 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 48: // stmt_list: stmt +#line 351 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2316 "parser.cpp" break; - case 54: // stmt_block: "{" "}" -#line 365 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 356 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2322 "parser.cpp" break; - case 55: // stmt_expr: expr_assign -#line 370 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_or_dev_list: stmt_or_dev +#line 358 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2328 "parser.cpp" break; - case 56: // stmt_expr: expr_increment -#line 372 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" stmt_list "#/" +#line 362 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2334 "parser.cpp" break; - case 57: // stmt_expr: expr_decrement -#line 374 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 52: // stmt_dev: "/#" "#/" +#line 363 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2340 "parser.cpp" break; - case 58: // stmt_expr: %empty -#line 376 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 53: // stmt_block: "{" stmt_or_dev_list "}" +#line 367 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2346 "parser.cpp" break; - case 59: // stmt_call: expr_call ";" -#line 381 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 54: // stmt_block: "{" "}" +#line 368 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2352 "parser.cpp" break; - case 60: // stmt_call: expr_method ";" -#line 383 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 55: // stmt_expr: expr_assign +#line 373 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2358 "parser.cpp" break; - case 61: // stmt_assign: expr_assign ";" -#line 388 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_increment +#line 375 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2364 "parser.cpp" break; - case 62: // stmt_assign: expr_increment ";" -#line 390 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: expr_decrement +#line 377 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2370 "parser.cpp" break; - case 63: // stmt_assign: expr_decrement ";" -#line 392 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 58: // stmt_expr: %empty +#line 379 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2376 "parser.cpp" break; - case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 397 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 59: // stmt_call: expr_call ";" +#line 384 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2382 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 402 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 60: // stmt_call: expr_method ";" +#line 386 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2388 "parser.cpp" break; - case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 404 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 61: // stmt_assign: expr_assign ";" +#line 391 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2394 "parser.cpp" break; - case 67: // stmt_wait: "wait" expr ";" -#line 409 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 62: // stmt_assign: expr_increment ";" +#line 393 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2400 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 414 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 63: // stmt_assign: expr_decrement ";" +#line 395 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2406 "parser.cpp" break; - case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 416 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 400 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2412 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 421 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 405 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2418 "parser.cpp" break; - case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 423 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 407 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2424 "parser.cpp" break; - case 72: // stmt_waittillframeend: "waittillframeend" ";" -#line 428 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 67: // stmt_wait: "wait" expr ";" +#line 412 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2430 "parser.cpp" break; - case 73: // stmt_waitframe: "waitframe" ";" -#line 433 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 417 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2436 "parser.cpp" break; - case 74: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 435 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 419 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2442 "parser.cpp" break; - case 75: // stmt_if: "if" "(" expr ")" stmt -#line 440 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 424 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2448 "parser.cpp" break; - case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 445 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 426 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2454 "parser.cpp" break; - case 77: // stmt_while: "while" "(" expr ")" stmt -#line 450 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_waittillframeend: "waittillframeend" ";" +#line 431 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2460 "parser.cpp" break; - case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 455 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 73: // stmt_waitframe: "waitframe" ";" +#line 436 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2466 "parser.cpp" break; - case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 460 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 74: // stmt_waitframe: "waitframe" "(" ")" ";" +#line 438 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2472 "parser.cpp" break; - case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 465 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 75: // stmt_if: "if" "(" expr ")" stmt +#line 443 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2478 "parser.cpp" break; - case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 467 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 448 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2484 "parser.cpp" break; - case 82: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 472 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 77: // stmt_while: "while" "(" expr ")" stmt +#line 453 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2490 "parser.cpp" break; - case 83: // stmt_case: "case" expr_integer ":" -#line 477 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 458 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2496 "parser.cpp" break; - case 84: // stmt_case: "case" expr_string ":" -#line 479 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 463 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2502 "parser.cpp" break; - case 85: // stmt_default: "default" ":" -#line 484 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 468 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2508 "parser.cpp" break; - case 86: // stmt_break: "break" ";" -#line 489 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 470 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2514 "parser.cpp" break; - case 87: // stmt_continue: "continue" ";" -#line 494 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 475 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2520 "parser.cpp" break; - case 88: // stmt_return: "return" expr ";" -#line 499 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 83: // stmt_case: "case" expr_integer ":" +#line 480 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2526 "parser.cpp" break; - case 89: // stmt_return: "return" ";" -#line 501 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 84: // stmt_case: "case" expr_string ":" +#line 482 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2532 "parser.cpp" break; - case 90: // stmt_breakpoint: "breakpoint" ";" -#line 506 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 85: // stmt_default: "default" ":" +#line 487 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2538 "parser.cpp" break; - case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 511 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 86: // stmt_break: "break" ";" +#line 492 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2544 "parser.cpp" break; - case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 516 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 87: // stmt_continue: "continue" ";" +#line 497 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2550 "parser.cpp" break; - case 93: // expr: expr_ternary -#line 520 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_return: "return" expr ";" +#line 502 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2556 "parser.cpp" break; - case 94: // expr: expr_binary -#line 521 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 89: // stmt_return: "return" ";" +#line 504 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2562 "parser.cpp" break; - case 95: // expr: expr_primitive -#line 522 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 90: // stmt_breakpoint: "breakpoint" ";" +#line 509 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2568 "parser.cpp" break; - case 96: // expr_or_empty: expr -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 514 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2574 "parser.cpp" break; - case 97: // expr_or_empty: %empty -#line 527 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 519 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2580 "parser.cpp" break; - case 98: // expr_assign: expr_object "=" expr -#line 532 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr: expr_ternary +#line 523 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2586 "parser.cpp" break; - case 99: // expr_assign: expr_object "|=" expr -#line 534 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 94: // expr: expr_binary +#line 524 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2592 "parser.cpp" break; - case 100: // expr_assign: expr_object "&=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr: expr_primitive +#line 525 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2598 "parser.cpp" break; - case 101: // expr_assign: expr_object "^=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_or_empty: expr +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2604 "parser.cpp" break; - case 102: // expr_assign: expr_object "<<=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_or_empty: %empty +#line 530 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2610 "parser.cpp" break; - case 103: // expr_assign: expr_object ">>=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_tuple "=" expr +#line 535 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2616 "parser.cpp" break; - case 104: // expr_assign: expr_object "+=" expr -#line 544 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "=" expr +#line 537 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2622 "parser.cpp" break; - case 105: // expr_assign: expr_object "-=" expr -#line 546 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "|=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2628 "parser.cpp" break; - case 106: // expr_assign: expr_object "*=" expr -#line 548 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 101: // expr_assign: expr_object "&=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2634 "parser.cpp" break; - case 107: // expr_assign: expr_object "/=" expr -#line 550 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 102: // expr_assign: expr_object "^=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2640 "parser.cpp" break; - case 108: // expr_assign: expr_object "%=" expr -#line 552 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 103: // expr_assign: expr_object "<<=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2646 "parser.cpp" break; - case 109: // expr_increment: "++" expr_object -#line 557 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 104: // expr_assign: expr_object ">>=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2652 "parser.cpp" break; - case 110: // expr_increment: expr_object "++" -#line 559 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 105: // expr_assign: expr_object "+=" expr +#line 549 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2658 "parser.cpp" break; - case 111: // expr_decrement: "--" expr_object -#line 564 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 106: // expr_assign: expr_object "-=" expr +#line 551 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2664 "parser.cpp" break; - case 112: // expr_decrement: expr_object "--" -#line 566 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 107: // expr_assign: expr_object "*=" expr +#line 553 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2670 "parser.cpp" break; - case 113: // expr_ternary: expr "?" expr ":" expr -#line 571 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_assign: expr_object "/=" expr +#line 555 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2676 "parser.cpp" break; - case 114: // expr_binary: expr "||" expr -#line 576 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_assign: expr_object "%=" expr +#line 557 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2682 "parser.cpp" break; - case 115: // expr_binary: expr "&&" expr -#line 578 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_increment: "++" expr_object +#line 562 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2688 "parser.cpp" break; - case 116: // expr_binary: expr "==" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_increment: expr_object "++" +#line 564 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2694 "parser.cpp" break; - case 117: // expr_binary: expr "!=" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_decrement: "--" expr_object +#line 569 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2700 "parser.cpp" break; - case 118: // expr_binary: expr "<=" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_decrement: expr_object "--" +#line 571 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2706 "parser.cpp" break; - case 119: // expr_binary: expr ">=" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_ternary: expr "?" expr ":" expr +#line 576 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2712 "parser.cpp" break; - case 120: // expr_binary: expr "<" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "||" expr +#line 581 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2718 "parser.cpp" break; - case 121: // expr_binary: expr ">" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "&&" expr +#line 583 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2724 "parser.cpp" break; - case 122: // expr_binary: expr "|" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr "==" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2730 "parser.cpp" break; - case 123: // expr_binary: expr "&" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "!=" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2736 "parser.cpp" break; - case 124: // expr_binary: expr "^" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr "<=" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2742 "parser.cpp" break; - case 125: // expr_binary: expr "<<" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr ">=" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2748 "parser.cpp" break; - case 126: // expr_binary: expr ">>" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "<" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2754 "parser.cpp" break; - case 127: // expr_binary: expr "+" expr -#line 602 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr ">" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2760 "parser.cpp" break; - case 128: // expr_binary: expr "-" expr -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "|" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2766 "parser.cpp" break; - case 129: // expr_binary: expr "*" expr -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 124: // expr_binary: expr "&" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2772 "parser.cpp" break; - case 130: // expr_binary: expr "/" expr -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 125: // expr_binary: expr "^" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2778 "parser.cpp" break; - case 131: // expr_binary: expr "%" expr -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 126: // expr_binary: expr "<<" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2784 "parser.cpp" break; - case 132: // expr_primitive: expr_complement -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 127: // expr_binary: expr ">>" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2790 "parser.cpp" break; - case 133: // expr_primitive: expr_negate -#line 615 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 128: // expr_binary: expr "+" expr +#line 607 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2796 "parser.cpp" break; - case 134: // expr_primitive: expr_not -#line 616 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 129: // expr_binary: expr "-" expr +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2802 "parser.cpp" break; - case 135: // expr_primitive: expr_call -#line 617 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 130: // expr_binary: expr "*" expr +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2808 "parser.cpp" break; - case 136: // expr_primitive: expr_method -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 131: // expr_binary: expr "/" expr +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2814 "parser.cpp" break; - case 137: // expr_primitive: expr_add_array -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 132: // expr_binary: expr "%" expr +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2820 "parser.cpp" break; - case 138: // expr_primitive: expr_reference -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 133: // expr_primitive: expr_complement +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2826 "parser.cpp" break; - case 139: // expr_primitive: expr_array -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 134: // expr_primitive: expr_negate +#line 620 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2832 "parser.cpp" break; - case 140: // expr_primitive: expr_field -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 135: // expr_primitive: expr_not +#line 621 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2838 "parser.cpp" break; - case 141: // expr_primitive: expr_size -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 136: // expr_primitive: expr_call +#line 622 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2844 "parser.cpp" break; - case 142: // expr_primitive: expr_paren -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 137: // expr_primitive: expr_method +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2850 "parser.cpp" break; - case 143: // expr_primitive: expr_thisthread -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 138: // expr_primitive: expr_add_array +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2856 "parser.cpp" break; - case 144: // expr_primitive: expr_empty_array -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 139: // expr_primitive: expr_reference +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2862 "parser.cpp" break; - case 145: // expr_primitive: expr_undefined -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 140: // expr_primitive: expr_array +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2868 "parser.cpp" break; - case 146: // expr_primitive: expr_game -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 141: // expr_primitive: expr_field +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2874 "parser.cpp" break; - case 147: // expr_primitive: expr_self -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 142: // expr_primitive: expr_size +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2880 "parser.cpp" break; - case 148: // expr_primitive: expr_anim -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 143: // expr_primitive: expr_paren +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2886 "parser.cpp" break; - case 149: // expr_primitive: expr_level -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 144: // expr_primitive: expr_thisthread +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2892 "parser.cpp" break; - case 150: // expr_primitive: expr_animation -#line 632 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 145: // expr_primitive: expr_empty_array +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2898 "parser.cpp" break; - case 151: // expr_primitive: expr_animtree -#line 633 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 146: // expr_primitive: expr_undefined +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2904 "parser.cpp" break; - case 152: // expr_primitive: expr_identifier -#line 634 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 147: // expr_primitive: expr_game +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2910 "parser.cpp" break; - case 153: // expr_primitive: expr_istring -#line 635 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 148: // expr_primitive: expr_self +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2916 "parser.cpp" break; - case 154: // expr_primitive: expr_string -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 149: // expr_primitive: expr_anim +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2922 "parser.cpp" break; - case 155: // expr_primitive: expr_vector -#line 637 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 150: // expr_primitive: expr_level +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2928 "parser.cpp" break; - case 156: // expr_primitive: expr_float -#line 638 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 151: // expr_primitive: expr_animation +#line 637 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2934 "parser.cpp" break; - case 157: // expr_primitive: expr_integer -#line 639 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 152: // expr_primitive: expr_animtree +#line 638 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2940 "parser.cpp" break; - case 158: // expr_primitive: expr_false -#line 640 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 153: // expr_primitive: expr_identifier +#line 639 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2946 "parser.cpp" break; - case 159: // expr_primitive: expr_true -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 154: // expr_primitive: expr_istring +#line 640 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2952 "parser.cpp" break; - case 160: // expr_complement: "~" expr -#line 646 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 155: // expr_primitive: expr_string +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2958 "parser.cpp" break; - case 161: // expr_negate: "-" expr_identifier -#line 651 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 156: // expr_primitive: expr_vector +#line 642 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2964 "parser.cpp" break; - case 162: // expr_negate: "-" expr_paren -#line 653 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 157: // expr_primitive: expr_float +#line 643 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2970 "parser.cpp" break; - case 163: // expr_negate: "-" expr_array -#line 655 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 158: // expr_primitive: expr_integer +#line 644 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2976 "parser.cpp" break; - case 164: // expr_negate: "-" expr_field -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 159: // expr_primitive: expr_false +#line 645 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2982 "parser.cpp" break; - case 165: // expr_not: "!" expr -#line 662 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 160: // expr_primitive: expr_true +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2988 "parser.cpp" break; - case 166: // expr_call: expr_function -#line 666 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 161: // expr_complement: "~" expr +#line 651 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2994 "parser.cpp" break; - case 167: // expr_call: expr_pointer -#line 667 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 162: // expr_negate: "-" expr_identifier +#line 656 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 3000 "parser.cpp" break; - case 168: // expr_method: expr_object expr_function -#line 670 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 163: // expr_negate: "-" expr_paren +#line 658 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 3006 "parser.cpp" break; - case 169: // expr_method: expr_object expr_pointer -#line 671 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 164: // expr_negate: "-" expr_array +#line 660 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 3012 "parser.cpp" break; - case 170: // expr_function: expr_identifier "(" expr_arguments ")" -#line 676 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 165: // expr_negate: "-" expr_field +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 3018 "parser.cpp" break; - case 171: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 678 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 166: // expr_not: "!" expr +#line 667 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3024 "parser.cpp" break; - case 172: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 680 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 167: // expr_call: expr_function +#line 671 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3030 "parser.cpp" break; - case 173: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 682 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 168: // expr_call: expr_pointer +#line 672 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3036 "parser.cpp" break; - case 174: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 684 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 169: // expr_method: expr_object expr_function +#line 675 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3042 "parser.cpp" break; - case 175: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 686 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 170: // expr_method: expr_object expr_pointer +#line 676 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3048 "parser.cpp" break; - case 176: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 691 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 171: // expr_function: expr_identifier "(" expr_arguments ")" +#line 681 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3054 "parser.cpp" break; - case 177: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 693 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 172: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 683 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3060 "parser.cpp" break; - case 178: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 695 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 173: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 685 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3066 "parser.cpp" break; - case 179: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 697 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 174: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 687 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3072 "parser.cpp" break; - case 180: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 702 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 175: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 689 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3078 "parser.cpp" break; - case 181: // expr_parameters: expr_parameters "," expr_identifier -#line 707 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 176: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 691 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3084 "parser.cpp" break; - case 182: // expr_parameters: expr_identifier -#line 709 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 177: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 696 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3090 "parser.cpp" break; - case 183: // expr_parameters: %empty -#line 711 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 178: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 698 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3096 "parser.cpp" break; - case 184: // expr_arguments: expr_arguments_no_empty -#line 716 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 179: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 700 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3102 "parser.cpp" break; - case 185: // expr_arguments: %empty -#line 718 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 180: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 702 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3108 "parser.cpp" break; - case 186: // expr_arguments_no_empty: expr_arguments "," expr -#line 723 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 181: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 707 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3114 "parser.cpp" break; - case 187: // expr_arguments_no_empty: expr -#line 725 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 182: // expr_parameters: expr_parameters "," expr_identifier +#line 712 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3120 "parser.cpp" break; - case 188: // expr_reference: "::" expr_identifier -#line 730 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 183: // expr_parameters: expr_identifier +#line 714 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3126 "parser.cpp" break; - case 189: // expr_reference: expr_path "::" expr_identifier -#line 732 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 184: // expr_parameters: %empty +#line 716 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3132 "parser.cpp" break; - case 190: // expr_array: expr_object "[" expr "]" -#line 737 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_arguments: expr_arguments_no_empty +#line 721 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3138 "parser.cpp" break; - case 191: // expr_field: expr_object "." expr_identifier_nosize -#line 742 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 186: // expr_arguments: %empty +#line 723 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3144 "parser.cpp" break; - case 192: // expr_size: expr_object "." "size" -#line 747 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 187: // expr_arguments_no_empty: expr_arguments "," expr +#line 728 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3150 "parser.cpp" break; - case 193: // expr_paren: "(" expr ")" -#line 752 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 188: // expr_arguments_no_empty: expr +#line 730 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3156 "parser.cpp" break; - case 194: // expr_object: expr_call -#line 756 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 189: // expr_reference: "::" expr_identifier +#line 735 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3162 "parser.cpp" break; - case 195: // expr_object: expr_method -#line 757 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 190: // expr_reference: expr_path "::" expr_identifier +#line 737 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3168 "parser.cpp" break; - case 196: // expr_object: expr_array -#line 758 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 191: // expr_tuple: "[" expr_tuple_arguments "]" +#line 742 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3174 "parser.cpp" break; - case 197: // expr_object: expr_field -#line 759 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 192: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 747 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3180 "parser.cpp" break; - case 198: // expr_object: expr_game -#line 760 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 193: // expr_tuple_arguments: expr_tuple_types +#line 749 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3186 "parser.cpp" break; - case 199: // expr_object: expr_self -#line 761 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 194: // expr_tuple_types: expr_array +#line 753 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3192 "parser.cpp" break; - case 200: // expr_object: expr_anim -#line 762 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 195: // expr_tuple_types: expr_field +#line 754 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3198 "parser.cpp" break; - case 201: // expr_object: expr_level -#line 763 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 196: // expr_tuple_types: expr_identifier +#line 755 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3204 "parser.cpp" break; - case 202: // expr_object: expr_identifier -#line 764 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 197: // expr_array: expr_object "[" expr "]" +#line 760 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3210 "parser.cpp" break; - case 203: // expr_thisthread: "thisthread" -#line 769 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 198: // expr_field: expr_object "." expr_identifier_nosize +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3216 "parser.cpp" break; - case 204: // expr_empty_array: "[" "]" -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 199: // expr_size: expr_object "." "size" +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3222 "parser.cpp" break; - case 205: // expr_undefined: "undefined" -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 200: // expr_paren: "(" expr ")" +#line 775 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3228 "parser.cpp" break; - case 206: // expr_game: "game" -#line 784 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 201: // expr_object: expr_call +#line 779 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3234 "parser.cpp" break; - case 207: // expr_self: "self" -#line 789 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 202: // expr_object: expr_method +#line 780 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3240 "parser.cpp" break; - case 208: // expr_anim: "anim" -#line 794 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_object: expr_array +#line 781 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3246 "parser.cpp" break; - case 209: // expr_level: "level" -#line 799 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 204: // expr_object: expr_field +#line 782 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3252 "parser.cpp" break; - case 210: // expr_animation: "%" "identifier" -#line 804 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 205: // expr_object: expr_game +#line 783 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3258 "parser.cpp" break; - case 211: // expr_animtree: "#animtree" -#line 809 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 206: // expr_object: expr_self +#line 784 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3264 "parser.cpp" break; - case 212: // expr_identifier_nosize: "identifier" -#line 814 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 207: // expr_object: expr_anim +#line 785 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3270 "parser.cpp" break; - case 213: // expr_identifier: "identifier" -#line 819 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 208: // expr_object: expr_level +#line 786 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3276 "parser.cpp" break; - case 214: // expr_identifier: "size" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 209: // expr_object: expr_identifier +#line 787 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3282 "parser.cpp" break; - case 215: // expr_path: "identifier" -#line 826 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 210: // expr_thisthread: "thisthread" +#line 792 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3288 "parser.cpp" break; - case 216: // expr_path: "path" -#line 828 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 211: // expr_empty_array: "[" "]" +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3294 "parser.cpp" break; - case 217: // expr_istring: "localized string" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 212: // expr_undefined: "undefined" +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3300 "parser.cpp" break; - case 218: // expr_string: "string literal" -#line 838 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 213: // expr_game: "game" +#line 807 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3306 "parser.cpp" break; - case 219: // expr_vector: "(" expr "," expr "," expr ")" -#line 843 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 214: // expr_self: "self" +#line 812 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3312 "parser.cpp" break; - case 220: // expr_float: "-" "float" -#line 848 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 215: // expr_anim: "anim" +#line 817 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3318 "parser.cpp" break; - case 221: // expr_float: "float" -#line 850 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 216: // expr_level: "level" +#line 822 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3324 "parser.cpp" break; - case 222: // expr_integer: "-" "integer" -#line 855 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 217: // expr_animation: "%" "identifier" +#line 827 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3330 "parser.cpp" break; - case 223: // expr_integer: "integer" -#line 857 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 218: // expr_animtree: "#animtree" +#line 832 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3336 "parser.cpp" break; - case 224: // expr_false: "false" -#line 862 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 219: // expr_identifier_nosize: "identifier" +#line 837 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3342 "parser.cpp" break; - case 225: // expr_true: "true" -#line 867 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 220: // expr_identifier: "identifier" +#line 842 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3348 "parser.cpp" break; + case 221: // expr_identifier: "size" +#line 844 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3354 "parser.cpp" + break; -#line 3352 "parser.cpp" + case 222: // expr_path: "identifier" +#line 849 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3360 "parser.cpp" + break; + + case 223: // expr_path: "path" +#line 851 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3366 "parser.cpp" + break; + + case 224: // expr_istring: "localized string" +#line 856 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3372 "parser.cpp" + break; + + case 225: // expr_string: "string literal" +#line 861 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3378 "parser.cpp" + break; + + case 226: // expr_vector: "(" expr "," expr "," expr ")" +#line 866 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3384 "parser.cpp" + break; + + case 227: // expr_float: "-" "float" +#line 871 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3390 "parser.cpp" + break; + + case 228: // expr_float: "float" +#line 873 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3396 "parser.cpp" + break; + + case 229: // expr_integer: "-" "integer" +#line 878 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3402 "parser.cpp" + break; + + case 230: // expr_integer: "integer" +#line 880 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3408 "parser.cpp" + break; + + case 231: // expr_false: "false" +#line 885 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3414 "parser.cpp" + break; + + case 232: // expr_true: "true" +#line 890 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3420 "parser.cpp" + break; + + +#line 3424 "parser.cpp" default: break; @@ -3559,7 +3631,8 @@ namespace xsk { namespace gsc { namespace s2 { "expr_binary", "expr_primitive", "expr_complement", "expr_negate", "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", - "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_arguments_no_empty", "expr_reference", "expr_tuple", + "expr_tuple_arguments", "expr_tuple_types", "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", @@ -3836,366 +3909,375 @@ namespace xsk { namespace gsc { namespace s2 { const short parser::yypact_ninf_ = -287; - const short parser::yytable_ninf_ = -216; + const short parser::yytable_ninf_ = -223; const short parser::yypact_[] = { - 9, -287, -287, -65, -65, -40, -287, -287, 41, 9, - -287, -287, -287, -287, -287, -287, -25, -287, -287, -12, - -8, -55, -287, -287, -287, -287, -34, 1152, -287, -287, - -287, 12, -19, -287, -287, -28, -18, -287, 4, -287, - -287, -287, -287, -287, -287, -287, 1152, 1026, -34, 1152, - 1152, 35, -27, 28, -287, -287, -287, 2117, -287, -287, - -287, -287, -287, -287, 543, 557, -287, -287, -287, -287, - 604, 666, -287, -287, 677, -287, -287, -287, 878, 955, - 1113, 1176, -287, -287, 215, 33, -287, -287, -287, -287, - -287, -287, -287, 32, 57, -34, 59, 52, 62, 67, - 75, 74, 85, 1408, 1026, -287, 2200, 92, 99, -287, - -287, -287, 1152, 102, -287, -287, -287, -287, 604, 666, - -287, 1375, -287, -287, -287, -287, 215, 100, -287, -287, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1215, - -31, -287, -287, 109, 1152, -34, -287, 769, -287, -287, - 1152, 1152, -34, 1152, 1152, -34, 1152, -287, 1152, 1886, - 1152, -287, 1574, 1152, 65, -34, 2082, 84, 84, 2231, - 2241, 2323, 2323, 249, 249, 249, 249, 2272, 2313, 2282, - 76, 76, -287, -287, -287, 1926, -287, -287, -287, -1, - -287, 116, 923, 1152, 111, -15, 129, 1339, 131, 132, - 134, 135, -53, 130, 128, 136, 1089, 137, 142, 145, - -287, 69, 69, -287, -287, 846, -287, -287, -287, -287, + 6, -287, -287, 5, 5, -24, -287, -287, 37, 6, + -287, -287, -287, -287, -287, -287, -8, -287, -287, -13, + -10, -54, -287, -287, -287, -287, -23, 1223, -287, -287, + -287, 11, -12, -287, -287, -42, 3, -287, 17, -287, + -287, -287, -287, -287, -287, -287, 1223, 821, -23, 1223, + 1223, -18, -36, 26, -287, -287, -287, 2187, -287, -287, + -287, -287, -287, -287, 413, 667, -287, -287, -287, -287, + 699, 729, -287, -287, 1012, -287, -287, -287, 1089, 1187, + 1247, 1317, -287, -287, 574, 39, -287, -287, -287, -287, + -287, -287, -287, 15, 96, -23, 49, 75, 81, 114, + 100, 124, 129, 1439, 821, -287, 2270, 134, 136, -287, + -287, -287, 1223, 142, -287, -287, -287, -287, 699, 729, + -287, 1406, -287, -287, -287, -287, 574, 140, -287, -287, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1286, + -20, -287, -287, 152, 1223, -23, -287, 928, -287, -287, + 1223, 1223, -23, 1223, 1223, -23, 1223, -287, 1223, 1917, + 1223, -287, 1605, 1223, 107, -23, 2152, 179, 179, 2301, + 2311, 2383, 2383, 30, 30, 30, 30, 2342, 728, 2352, + 73, 73, -287, -287, -287, 1957, -287, -287, -287, 35, + -287, 154, 1057, 1223, 146, -5, 161, 1370, 165, 166, + 167, 168, -17, 163, 169, 172, 1160, 183, 173, 175, + -287, 139, 548, 548, -287, -287, 980, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - -287, -287, 141, 143, 146, 148, 149, -287, -287, 1262, - 109, 1966, 8, 160, 2006, 15, 161, 2046, 1021, 163, - 2200, 1886, 116, 1152, -287, -287, 1152, -287, -287, 1000, - 2152, -287, 164, -287, 1152, 196, 1152, 49, -34, 1152, - 122, 165, 166, -287, -287, -287, -287, 2187, -287, 1152, - 1152, 1375, 1375, -287, -287, -287, -287, -287, -287, -287, - 178, 181, 182, 186, -287, -287, 1152, 1152, 1152, 1152, - 1152, 1152, 1152, 1152, 1152, 1152, 1152, 187, -287, 1152, - 193, -287, 1152, 195, 1152, 201, 2200, 19, -287, -287, - -287, 177, 1608, 205, 1642, 198, -287, -287, -287, 1365, - 1, 1676, -287, -287, -287, 48, 50, 1152, 1152, 1152, - 1152, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, - 2200, 2200, 209, 73, 211, 77, 218, 1710, 1152, -287, - -287, 1339, 1152, 1339, 1152, 1152, -34, 57, 203, 210, - 1744, 1452, 1496, 1540, 1152, -287, 1152, -287, 1152, -287, - 87, 250, 1778, -287, 2200, 214, 1812, 248, -287, -287, - -287, 220, 222, 1152, 223, 1152, 227, 1152, 90, 91, - 101, -287, 1339, 230, 49, 1339, 1152, -287, -287, 224, - -287, 244, -287, 246, -287, -287, -287, -287, -287, 251, - -287, 1846, 231, 238, 243, 1339, 1339, -287, -287, -287, - -287, -287 + -287, -287, -287, 184, 185, 188, 191, 192, 177, -287, + -287, 51, 152, 1997, 53, 205, 2037, 56, 206, 2077, + 2116, 203, 2270, 1917, 154, 1223, -287, -287, 1223, -287, + -287, 1134, 2222, -287, 209, -287, 1223, 236, 1223, 639, + -23, 1223, 164, 208, 215, -287, -287, -287, -287, 2257, + -287, 1223, 1223, 1286, 32, -287, 62, 86, 8, 1406, + 1406, -287, -287, -287, -287, -287, -287, -287, 1223, 225, + 227, 228, 230, -287, -287, 1223, 1223, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 210, -287, 1223, 226, + -287, 1223, 229, 1223, 232, 2270, 59, -287, -287, -287, + 223, 1639, 235, 1673, 233, -287, -287, -287, 1396, 9, + 1707, -287, -287, -287, 60, 87, -287, 548, 2270, 1223, + 1223, 1223, 1223, 2270, 2270, 2270, 2270, 2270, 2270, 2270, + 2270, 2270, 2270, 2270, 240, 89, 242, 101, 245, 1741, + 1223, -287, -287, 1370, 1223, 1370, 1223, 1223, -23, 96, + 237, 241, -287, 1775, 1483, 1527, 1571, 1223, -287, 1223, + -287, 1223, -287, 103, 273, 1809, -287, 2270, 243, 1843, + 272, -287, -287, -287, 246, 249, 1223, 250, 1223, 251, + 1223, 113, 123, 125, -287, 1370, 252, 639, 1370, 1223, + -287, -287, 254, -287, 262, -287, 286, -287, -287, -287, + -287, -287, 287, -287, 1877, 279, 280, 281, 1370, 1370, + -287, -287, -287, -287, -287 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 214, 213, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 216, 215, 0, - 0, 0, 1, 4, 5, 6, 183, 0, 10, 11, - 218, 0, 0, 182, 211, 0, 0, 203, 0, 225, - 224, 205, 206, 207, 208, 209, 0, 185, 0, 0, - 0, 0, 0, 213, 217, 221, 223, 0, 93, 94, - 95, 132, 133, 134, 135, 136, 166, 167, 137, 138, - 139, 140, 141, 142, 0, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 0, 153, 154, 155, 156, - 157, 158, 159, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 204, 187, 0, 184, 188, - 165, 160, 0, 0, 220, 222, 194, 195, 163, 164, - 162, 0, 198, 199, 200, 201, 161, 0, 210, 18, + 3, 12, 13, 0, 0, 0, 221, 220, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 223, 222, 0, + 0, 0, 1, 4, 5, 6, 184, 0, 10, 11, + 225, 0, 0, 183, 218, 0, 0, 210, 0, 232, + 231, 212, 213, 214, 215, 216, 0, 186, 0, 0, + 0, 0, 0, 220, 224, 228, 230, 0, 93, 94, + 95, 133, 134, 135, 136, 137, 167, 168, 138, 139, + 140, 141, 142, 143, 0, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 0, 154, 155, 156, 157, + 158, 159, 160, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 186, 211, 188, 0, 185, 189, + 166, 161, 0, 0, 227, 229, 201, 202, 164, 165, + 163, 0, 205, 206, 207, 208, 162, 0, 217, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 168, 169, 0, 185, 0, 17, 0, 19, 181, - 0, 185, 0, 0, 185, 0, 0, 193, 0, 187, - 0, 180, 0, 0, 0, 0, 0, 125, 126, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 127, 128, 129, 130, 131, 0, 192, 212, 191, 0, - 184, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 169, 170, 0, 186, 0, 17, 0, 19, 182, + 0, 186, 0, 0, 186, 0, 0, 200, 0, 188, + 0, 181, 0, 0, 0, 0, 0, 126, 127, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 128, 129, 130, 131, 132, 0, 199, 219, 198, 0, + 185, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 54, 0, 0, 45, 50, 0, 46, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 0, 0, 0, 194, 195, 196, 197, 0, - 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 186, 0, 0, 0, 190, 170, 185, 52, 48, 0, - 0, 72, 0, 73, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 85, 86, 87, 89, 0, 90, 185, - 185, 109, 111, 53, 49, 61, 62, 63, 59, 60, - 0, 0, 0, 0, 110, 112, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 172, 185, - 0, 174, 185, 0, 0, 0, 113, 0, 51, 47, - 67, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 84, 83, 88, 0, 0, 0, 0, 0, - 0, 98, 104, 105, 106, 107, 108, 99, 100, 101, - 103, 102, 0, 0, 0, 0, 0, 0, 185, 171, - 74, 0, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 173, 185, 175, 185, 219, - 0, 75, 0, 77, 96, 0, 0, 0, 82, 91, - 92, 0, 0, 185, 0, 185, 0, 185, 0, 0, - 0, 176, 0, 0, 58, 0, 0, 64, 66, 184, - 69, 184, 71, 184, 177, 178, 179, 76, 78, 0, - 80, 0, 0, 0, 0, 0, 0, 65, 68, 70, - 79, 81 + 54, 0, 0, 0, 45, 50, 0, 46, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 201, 202, 0, 203, + 204, 0, 209, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 187, 0, 0, 0, 197, 171, 186, 52, + 48, 0, 0, 72, 0, 73, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 85, 86, 87, 89, 0, + 90, 186, 186, 0, 0, 193, 203, 204, 209, 110, + 112, 53, 49, 61, 62, 63, 59, 60, 0, 0, + 0, 0, 0, 111, 113, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 173, 186, 0, + 175, 186, 0, 0, 0, 114, 0, 51, 47, 67, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 84, 83, 88, 0, 0, 191, 0, 98, 0, + 0, 0, 0, 99, 105, 106, 107, 108, 109, 100, + 101, 102, 104, 103, 0, 0, 0, 0, 0, 0, + 186, 172, 74, 0, 0, 0, 97, 0, 0, 0, + 0, 0, 192, 0, 0, 0, 0, 186, 174, 186, + 176, 186, 226, 0, 75, 0, 77, 96, 0, 0, + 0, 82, 91, 92, 0, 0, 186, 0, 186, 0, + 186, 0, 0, 0, 177, 0, 0, 58, 0, 0, + 64, 66, 185, 69, 185, 71, 185, 178, 179, 180, + 76, 78, 0, 80, 0, 0, 0, 0, 0, 0, + 65, 68, 70, 79, 81 }; const short parser::yypgoto_[] = { - -287, -287, -287, 271, 297, 298, -287, -287, -287, -177, - 86, -287, -287, -287, -91, -114, -287, -287, -287, -287, + -287, -287, -287, 295, 336, 338, -287, -287, -287, -194, + 122, -287, -287, -287, -93, -87, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, -287, - 191, -287, -286, -285, -282, -287, -287, -287, -287, -287, - -287, -33, -6, -66, -59, -287, -287, -147, -41, -287, - 213, 240, -287, 263, 247, -287, -287, -287, 316, 322, - 333, 404, -287, -287, -287, 0, 7, -287, -17, -287, - -287, 105, -287, -287 + 189, -287, -286, -277, -274, -287, -287, -287, -287, -287, + -287, -49, -11, -67, -58, -287, -287, 95, -43, -287, + -287, -287, -16, 197, 324, -287, 302, 355, -287, -287, + -287, 380, 417, 452, 490, -287, -287, -287, 0, 7, + -287, -15, -287, -287, 148, -287, -287 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 223, - 224, 279, 225, 226, 227, 345, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 106, 405, 252, 253, 254, 58, 59, 60, 61, 62, + 0, 8, 9, 10, 11, 12, 13, 14, 15, 224, + 225, 281, 226, 227, 228, 354, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 106, 418, 253, 254, 255, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 32, 107, 200, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 198, 84, 85, 86, 87, 88, - 89, 90, 91, 92 + 258, 304, 305, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 198, 84, 85, + 86, 87, 88, 89, 90, 91, 92 }; const short parser::yytable_[] = { - 16, 346, 347, 158, 31, 348, 108, 199, 151, 16, - 19, 20, 21, 6, 262, 152, 196, 265, 116, 6, - 1, 2, 3, 4, 5, 278, 33, 26, 96, 6, - 285, 385, 17, 18, 94, 97, 100, 282, 99, 95, - 290, 22, 98, 101, 30, 117, 30, 283, 109, 56, - 28, 126, 275, 27, 29, 151, 6, 170, 127, 386, - 102, 328, 152, 108, 7, 93, 170, 197, 331, 17, - 53, 128, 379, 170, 153, 35, 36, 170, 38, 17, - 53, 127, 6, 42, 43, 44, 45, 112, -215, 35, - 36, 113, 38, 155, 156, 159, 6, 42, 43, 44, - 45, 388, 339, 389, 161, 113, 170, 7, 170, 35, - 36, 157, 38, 221, 222, 160, 6, 42, 43, 44, - 45, 153, 162, 163, 255, 113, 395, 164, 127, 337, - 397, 170, 17, 53, 165, 170, 114, 115, 346, 347, - 421, 166, 348, 434, 435, 170, 17, 53, 170, 170, - 170, 256, 355, 356, 436, 201, 171, 260, 173, 170, - 175, 154, 263, 197, 127, 266, 17, 53, 276, 255, - 146, 147, 148, 281, 255, 272, 144, 145, 146, 147, - 148, 284, 373, 286, 287, 375, 288, 289, 116, 116, - 294, 293, 255, 151, 299, 291, 256, 300, 295, 298, - 152, 256, 260, 305, 401, 306, 403, 260, 307, 127, - 308, 309, 329, 332, 127, 117, 117, 341, 57, 256, - 335, 260, 260, 343, 115, 260, 352, 353, 127, 127, - 357, 400, 127, 358, 359, 151, 151, 103, 360, 380, - 110, 111, 152, 152, 372, 437, 255, 418, 440, 419, - 374, 420, 376, 378, 116, -202, -202, 382, -202, 153, - 384, 394, -202, 396, 118, 409, 127, 154, 450, 451, - 398, -202, 410, 256, -202, 422, 424, 442, 426, 260, - 23, 117, 427, 151, 428, 430, 127, 260, 350, 432, - 152, 119, 438, 447, 127, 169, 408, 443, 121, 444, - 448, 153, 153, 172, 445, 449, 24, 25, 127, 127, - 439, 304, -202, -202, 120, 131, 132, 292, 0, 0, - 0, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 144, 145, 146, 147, 148, 0, 0, 255, 153, - 255, 261, 0, 0, 264, 0, 127, 267, 0, 268, - 0, 270, 0, 0, 271, 0, 0, 122, 0, 0, - 257, 0, 429, 123, 431, 256, 433, 256, 0, 0, - 0, 260, 0, 260, 124, 0, 407, 0, 127, 255, - 127, 116, 255, 0, 280, 0, 0, 258, 0, 0, - 0, 0, 0, 0, 259, 0, 0, 297, 0, 0, - 0, 0, 255, 255, 0, 257, 256, 0, 117, 256, - 257, 0, 260, 0, 260, 260, 0, 0, 0, 127, - 0, 127, 127, 0, 257, 257, 0, 0, 257, 256, - 256, 0, 258, 0, 0, 260, 260, 258, 0, 259, - 0, 0, 127, 127, 259, 125, 0, 0, 0, 0, - 0, 258, 258, 0, 336, 258, 0, 0, 301, 302, - 0, 0, 259, 122, 0, 342, 0, 344, 0, 123, - 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 124, 0, 257, 0, 0, 0, 0, 0, 0, 0, - 257, 0, 0, 0, 0, 0, 0, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 122, 258, - 0, 0, 0, 122, 123, 377, 259, 258, 0, 123, - 0, 0, 0, 0, 349, 124, 0, 122, 122, 0, - 124, 122, 0, 123, 123, 0, 0, 123, 390, 391, - 392, 393, 0, 0, 124, 124, 0, 0, 124, 0, - 0, 125, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 402, 0, 404, 406, 0, 0, 0, - 0, 0, 0, -194, -194, 0, -194, 0, 0, 0, - -194, 0, 0, 0, 257, 122, 257, -195, -195, -194, - -195, 123, -194, 122, -195, 0, 125, 0, 0, 123, - 0, 125, 124, -195, 0, 0, -195, 441, 0, 0, - 124, 258, 0, 258, 0, 125, 125, 0, 259, 125, - 259, 0, 0, 0, 0, 257, 0, 257, 257, 0, - -194, -194, 0, 0, -196, -196, 0, -196, 0, 0, - 0, -196, 0, 0, -195, -195, 0, 0, 257, 257, - -196, 0, 258, -196, 258, 258, 0, 0, 0, 259, - 0, 349, 259, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 125, 0, 258, 258, 0, 0, 0, - 0, 125, 259, 259, 0, 0, 0, 122, 0, 122, - 0, -196, -196, 123, 0, 123, -197, -197, 0, -197, - 0, 0, 0, -197, 124, 0, 124, 35, 36, 0, - 38, 0, -197, 0, 6, -197, 0, 0, 0, 0, - 0, 0, 0, 149, 0, 0, 150, 0, 122, 0, - 122, 122, 0, 0, 123, 0, 123, 123, 0, 0, - 0, 0, 0, 0, 0, 124, 0, 124, 124, 0, - 0, 122, 122, -197, -197, 0, 0, 123, 123, 0, - 0, 0, 0, 0, 17, 53, 0, 0, 124, 124, - 202, 0, 0, 0, 0, 125, 0, 125, 203, 0, - 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, + 16, 158, 116, 355, 108, 6, 31, 151, 280, 16, + 19, 20, 356, 287, 96, 357, 152, 1, 2, 3, + 4, 5, 35, 36, 6, 38, 33, 196, 21, 6, + 42, 43, 44, 45, 112, 97, 100, 22, 113, 397, + 117, 94, 98, 101, 26, 30, 95, 284, 109, 28, + 6, 126, 29, 6, 151, 17, 53, 285, 127, 99, + 154, 108, 128, 152, 93, -196, -196, 398, 319, 320, + 27, 321, 322, 102, 153, 7, 292, 156, 197, 17, + 53, 127, 30, 114, 115, 56, -222, 348, 277, 366, + 367, 35, 36, 170, 38, 159, 131, 132, 6, 155, + 17, 53, 17, 18, 7, 160, 337, 149, 256, 340, + 174, 170, 391, 400, 170, 323, 324, 170, 170, -194, + -194, 153, 144, 145, 146, 147, 148, 161, 127, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 401, 162, 408, -195, -195, 170, 257, 170, 17, 53, + 157, 355, 164, 256, 410, 201, 434, 262, 256, 170, + 356, 170, 265, 357, 127, 268, 447, 146, 147, 148, + 163, 170, 116, 116, 116, 274, 448, 256, 449, 35, + 36, 170, 38, 170, 165, 166, 6, 42, 43, 44, + 45, 257, 170, 171, 151, 303, 257, 293, 173, 414, + 175, 416, 262, 152, 154, 197, 278, 262, 283, 127, + 117, 117, 117, 286, 127, 257, 57, 288, 289, 290, + 291, 308, 262, 262, 295, 301, 262, 302, 127, 127, + 127, 296, 256, 127, 297, 103, 17, 53, 110, 111, + 116, 450, 151, 151, 453, 300, 313, 314, 118, 199, + 315, 152, 152, 316, 317, 318, 264, 338, 341, 267, + 344, 153, 350, 352, 463, 464, 115, 384, 127, 361, + 257, 144, 145, 146, 147, 148, 362, 369, 117, 370, + 371, 262, 372, 386, 390, 392, 388, 394, 127, 262, + 359, 151, 407, 169, 409, 396, 127, 411, 435, 422, + 152, 172, 439, 423, 23, 437, 421, 455, 440, 153, + 153, 441, 443, 445, 451, 456, 127, 127, 116, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 457, + 458, 460, 461, 462, 256, 24, 256, 25, 312, 263, + 452, 402, 266, 120, 259, 269, 117, 270, 153, 272, + 294, 0, 273, 0, 0, 127, 0, 308, 0, 0, + 0, 0, 0, 346, 127, 119, 0, 0, 0, 0, + 0, 0, 257, 442, 257, 444, 256, 446, 116, 256, + 0, 0, 282, 262, 0, 262, 364, 365, 420, 259, + 127, 0, 127, 0, 259, 299, 121, 0, 0, 256, + 256, 0, 0, 0, 0, 0, 0, 0, 306, 259, + 259, 0, 0, 259, 257, 0, 117, 257, 0, 0, + 0, 122, 0, 385, 0, 262, 387, 262, 262, 0, + 0, 0, 127, 0, 127, 127, 0, 257, 257, 0, + 0, 0, 0, -201, -201, 0, -201, 0, 262, 262, + -201, 0, 0, 0, 345, 127, 127, 0, 123, -201, + 0, 0, -201, 0, 0, 351, 0, 353, 259, 0, + 360, 260, 0, 0, 0, 413, 259, 0, 0, 0, + 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 431, 124, 432, 0, 433, 368, 0, 0, + -201, -201, 261, 0, 373, 374, 375, 376, 377, 378, + 379, 380, 381, 382, 383, 0, 260, 0, 0, 0, + 0, 260, 389, 0, 0, 0, 0, 122, 0, 0, + 0, 125, 0, 0, 0, 307, 260, 260, 0, 0, + 260, 0, 0, 0, 0, 0, 0, 261, 403, 404, + 405, 406, 261, 0, 306, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 123, 0, 121, 309, 310, 0, + 0, 261, 122, 415, 0, 417, 419, 122, 35, 36, + 259, 38, 259, 0, 0, 6, 42, 43, 44, 45, + 0, 122, 122, 122, 113, 260, 122, 0, 0, 124, + 0, 0, 0, 260, -209, -209, 0, -209, 0, 123, + 0, -209, 0, 0, 123, 0, 154, 0, 454, 0, + -209, 0, 259, -209, 259, 259, 261, 0, 123, 123, + 123, 0, 0, 123, 358, 17, 53, 125, 0, 0, + 0, 0, 0, 0, 124, 259, 259, 0, 0, 124, + 0, 122, 0, 0, 0, 0, 0, 0, 0, 122, + 0, -209, -209, 124, 124, 124, 0, 0, 124, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 220, 113, 125, 0, 125, 125, - 0, 0, 0, 221, 222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, - 125, 0, 0, 0, 0, 0, 0, 202, 0, 0, - 0, 0, 0, 0, 0, 203, 17, 53, 204, 205, - 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, 0, 0, - 157, 303, 113, 0, 0, 0, 0, 0, 0, 0, - 221, 222, 0, 0, 0, 0, 0, 0, -198, -198, - 0, -198, 0, 0, 0, -198, 0, 0, 0, 0, - 0, 0, 0, 0, -198, 277, 0, -198, 0, 0, - 0, 0, 203, 17, 53, 204, 205, 206, 0, 207, - 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, -198, -198, 157, 0, 113, - 0, 0, 0, 0, 0, 0, 0, 221, 222, 0, - 0, 0, 0, 0, 0, -199, -199, 0, -199, 0, - 0, 0, -199, 0, 0, 0, 0, 0, 0, 0, - 0, -199, 338, 0, -199, 0, 0, 0, 0, 203, - 17, 53, 204, 205, 206, 0, 207, 208, 209, 210, + 45, 307, 125, 0, 0, 221, 0, 125, 123, 0, + 0, 0, 0, 222, 223, 0, 123, -202, -202, 0, + -202, 125, 125, 125, -202, 0, 125, 260, 0, 260, + 0, 0, 121, -202, 0, 0, -202, 0, 0, 0, + 0, 0, 0, 124, 0, 0, 17, 53, 0, -203, + -203, 124, -203, 0, 0, 0, -203, 122, 261, 0, + 261, 0, 0, 0, 0, -203, 0, 0, -203, 260, + 0, 260, 260, 0, -202, -202, 0, 0, 0, -204, + -204, 125, -204, 122, 0, 122, -204, 0, 0, 125, + 0, 0, 260, 260, 123, -204, 0, 0, -204, 0, + 261, 0, 358, 261, 131, 132, -203, -203, 135, 136, + 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, + 123, 0, 123, 261, 261, 122, 0, 122, 122, 124, + 144, 145, 146, 147, 148, 0, -204, -204, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34, 122, 122, + 0, 0, 0, 0, 0, 124, 0, 124, 0, 0, + 0, 0, 123, 0, 123, 123, 0, 125, 0, 0, + 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, + 43, 44, 45, 46, 0, 123, 123, 104, 105, 0, + 0, 48, 0, 125, 0, 125, 0, 124, 0, 124, + 124, 0, 0, 0, 0, 0, 0, 49, 50, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 124, 124, 0, 0, 51, 0, 0, 52, 17, 53, + 30, 54, 55, 56, 0, 125, 0, 125, 125, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, + 0, 0, 0, 0, 0, 0, 0, 203, 125, 125, + 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 35, 36, + 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, + 0, 0, 157, 220, 221, 0, 0, 0, 0, 0, + 0, 202, 222, 223, 0, 0, 0, 0, 0, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 35, 36, 34, 38, 0, 0, 0, 6, 42, 43, - 44, 45, -199, -199, 157, 0, 113, 0, 0, 0, - 0, 0, 0, 0, 221, 222, 35, 36, 37, 38, - 39, 40, 41, 6, 42, 43, 44, 45, 46, 334, - 0, 0, 104, 105, 130, 0, 48, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 17, 53, 0, - 0, 0, 49, 50, 0, 34, 0, 0, 0, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 0, 51, - 0, 0, 52, 17, 53, 30, 54, 55, 56, 35, - 36, 37, 38, 39, 40, 41, 6, 42, 43, 44, - 45, 46, 0, 0, 0, 47, 0, 0, 0, 48, - 0, 296, 0, -200, -200, 0, -200, 0, 0, 0, - -200, 0, 0, 0, 0, 49, 50, 0, 34, -200, - 0, 0, -200, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 51, 0, 0, 52, 17, 53, 30, 54, - 55, 56, 35, 36, 37, 38, 39, 40, 41, 6, - 42, 43, 44, 45, 46, 0, 0, 0, 47, 0, - -200, -200, 48, 0, 0, 0, -201, -201, 0, -201, - 0, 0, 0, -201, 0, 0, 0, 0, 49, 50, - 0, 34, -201, 0, 0, -201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 51, 0, 0, 52, 17, - 53, 30, 54, 55, 56, 35, 36, 37, 38, 39, - 40, 41, 6, 42, 43, 44, 45, 46, 0, 0, - 0, 104, 0, -201, -201, 48, 0, 0, 0, 310, - 311, 0, 312, 313, 0, 0, 0, 0, 0, 0, - 0, 49, 50, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 35, 36, 0, 38, 0, 0, 51, 6, - 0, 52, 17, 53, 30, 54, 55, 56, 149, 0, - 0, 174, 0, 0, 0, 0, 314, 315, 0, 0, + 35, 36, 0, 38, 0, 17, 53, 6, 42, 43, + 44, 45, 0, 0, 157, 311, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 0, 0, 0, 0, + 0, 0, 35, 36, 0, 38, 0, 0, 0, 6, + 0, 0, 0, 0, 0, 0, 0, 0, 149, 279, + 0, 150, 0, 0, 0, 0, 203, 17, 53, 204, + 205, 206, 0, 207, 208, 209, 210, 0, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 35, 36, 0, + 38, 0, 0, 0, 6, 42, 43, 44, 45, 17, + 53, 157, 0, 221, 0, 0, 0, 0, 0, 0, + 0, 222, 223, 0, 0, 0, 0, 0, 0, -205, + -205, 0, -205, 0, 0, 0, -205, 0, 0, 0, + 0, 0, 0, 0, 0, -205, 347, 0, -205, 0, + 0, 0, 0, 203, 17, 53, 204, 205, 206, 0, + 207, 208, 209, 210, 0, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 35, 36, 34, 38, 0, 0, + 0, 6, 42, 43, 44, 45, -205, -205, 157, 0, + 221, 0, 0, 0, 0, 0, 0, 0, 222, 223, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 0, 0, 0, 47, 0, 0, 0, + 48, 0, 298, 0, 0, 0, 0, -206, -206, 0, + -206, 17, 53, 0, -206, 0, 49, 50, 0, 34, + 0, 0, 0, -206, 0, 0, -206, 0, 0, 0, + 0, 0, 0, 51, 0, 0, 52, 17, 53, 30, + 54, 55, 56, 35, 36, 37, 38, 39, 40, 41, + 6, 42, 43, 44, 45, 46, 0, 0, 0, 47, + 0, 0, 0, 48, -206, -206, 0, -207, -207, 0, + -207, 0, 0, 0, -207, 0, 0, 0, 0, 49, + 50, 0, 34, -207, 0, 0, -207, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 51, 0, 0, 52, + 17, 53, 30, 54, 55, 56, 35, 36, 37, 38, + 39, 40, 41, 6, 42, 43, 44, 45, 46, 0, + 0, 0, 104, 0, -207, -207, 48, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -208, -208, 0, + -208, 0, 49, 50, -208, 0, 0, 0, 0, 0, + 0, 0, 0, -208, 0, 0, -208, 0, 0, 51, + 0, 0, 52, 17, 53, 30, 54, 55, 56, 203, + 0, 0, 204, 205, 206, 0, 207, 208, 209, 210, + 0, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 35, 36, 0, 38, -208, -208, 0, 6, 42, 43, + 44, 45, 0, 0, 157, 0, 221, 0, 0, 0, + 0, 0, 0, 0, 222, 223, 35, 36, 0, 38, + 0, 0, 0, 6, 0, 0, 35, 36, 0, 38, + 0, 0, 149, 6, 0, 174, 0, 0, 0, 0, + 323, 324, 149, 0, 0, 174, 0, 17, 53, 0, + 0, 0, 0, 0, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, 0, 0, 0, 0, 0, + 0, 0, 167, 17, 53, 0, 0, 168, 0, 0, + 0, 0, 130, 17, 53, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 425, 0, 0, 0, + 0, 426, 0, 0, 0, 0, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 0, 0, 0, 0, 0, 0, 0, 203, 17, - 53, 204, 205, 206, 0, 207, 208, 209, 210, 0, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 35, - 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, 0, 0, 157, 0, 113, 0, 0, 0, 0, - 0, 0, 0, 221, 222, 35, 36, 0, 38, 0, - 0, 0, 6, 0, 0, 35, 36, 0, 38, 0, - 0, 149, 6, 0, 174, 0, 0, 0, 0, 314, - 315, 149, 0, 0, 174, 0, 17, 53, 0, 0, - 0, 0, 0, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 0, 0, 0, 0, 0, 0, - 0, 167, 17, 53, 0, 0, 168, 0, 0, 0, - 0, 130, 17, 53, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 412, 0, 0, 0, 0, - 413, 0, 0, 0, 0, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, + 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 427, 0, 0, 0, 0, 428, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 429, 0, 0, 0, 0, 430, + 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 167, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 393, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 395, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 414, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 416, 0, 0, 0, 0, 417, 0, - 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 167, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 399, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 412, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 130, 0, 0, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, + 141, 142, 143, 144, 145, 146, 147, 148, 130, 0, + 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 436, 0, 141, 142, 143, 144, 145, 146, + 147, 148, 130, 0, 0, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 438, 0, 141, 142, + 143, 144, 145, 146, 147, 148, 130, 0, 0, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 381, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 383, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 387, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 399, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 130, 0, 0, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 411, 0, 141, - 142, 143, 144, 145, 146, 147, 148, 130, 0, 0, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 423, 0, 141, 142, 143, 144, 145, 146, 147, - 148, 130, 0, 0, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 425, 0, 141, 142, 143, - 144, 145, 146, 147, 148, 130, 0, 0, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 130, + 459, 0, 141, 142, 143, 144, 145, 146, 147, 148, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 271, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 276, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 336, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 339, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 342, 0, 0, 0, 0, 0, + 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, + 145, 146, 147, 148, 343, 0, 0, 0, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 269, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 274, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 327, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 330, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 333, 0, 0, 0, 0, 0, 130, - 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, - 146, 147, 148, 273, 0, 130, 0, 0, 131, 132, + 146, 147, 148, 275, 0, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, 145, 146, 147, 148, 129, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 143, 144, - 145, 146, 147, 148, 340, 130, 0, 0, 131, 132, + 145, 146, 147, 148, 349, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 141, 142, 143, 144, 145, 146, 147, 148, 354, + 0, 141, 142, 143, 144, 145, 146, 147, 148, 363, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 130, 0, 0, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, @@ -4209,226 +4291,232 @@ namespace xsk { namespace gsc { namespace s2 { 0, 0, 135, 136, 137, 138, 139, 140, 0, 0, 0, 0, 142, 143, 144, 145, 146, 147, 148, 0, 0, 0, 142, 0, 144, 145, 146, 147, 148, 131, - 132, 0, 0, 135, 136, 137, 138, 139, 140, 131, 132, 0, 0, 0, 0, 137, 138, 139, 140, 0, - 0, 0, 0, 0, 0, 144, 145, 146, 147, 148, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 147, 148 }; const short parser::yycheck_[] = { - 0, 287, 287, 94, 21, 287, 47, 154, 74, 9, - 3, 4, 52, 47, 161, 74, 47, 164, 51, 47, - 11, 12, 13, 14, 15, 202, 26, 52, 56, 47, - 207, 30, 97, 98, 53, 35, 36, 52, 56, 58, - 93, 0, 35, 36, 99, 51, 99, 62, 48, 102, - 62, 51, 53, 78, 62, 121, 47, 58, 51, 58, - 56, 53, 121, 104, 98, 53, 58, 98, 53, 97, - 98, 98, 53, 58, 74, 40, 41, 58, 43, 97, - 98, 74, 47, 48, 49, 50, 51, 52, 60, 40, - 41, 56, 43, 60, 62, 95, 47, 48, 49, 50, - 51, 53, 279, 53, 52, 56, 58, 98, 58, 40, - 41, 54, 43, 64, 65, 56, 47, 48, 49, 50, - 51, 121, 60, 56, 157, 56, 53, 52, 121, 276, - 53, 58, 97, 98, 60, 58, 101, 102, 424, 424, - 53, 56, 424, 53, 53, 58, 97, 98, 58, 58, - 58, 157, 299, 300, 53, 155, 57, 157, 56, 58, - 60, 52, 162, 98, 157, 165, 97, 98, 52, 202, - 94, 95, 96, 62, 207, 175, 92, 93, 94, 95, - 96, 52, 329, 52, 52, 332, 52, 52, 221, 222, - 62, 61, 225, 259, 52, 212, 202, 52, 62, 62, - 259, 207, 202, 62, 381, 62, 383, 207, 62, 202, - 62, 62, 52, 52, 207, 221, 222, 53, 27, 225, - 57, 221, 222, 27, 102, 225, 61, 61, 221, 222, - 52, 378, 225, 52, 52, 301, 302, 46, 52, 62, - 49, 50, 301, 302, 57, 422, 279, 394, 425, 396, - 57, 398, 57, 52, 287, 40, 41, 52, 43, 259, - 62, 52, 47, 52, 51, 62, 259, 52, 445, 446, - 52, 56, 62, 279, 59, 25, 62, 53, 30, 279, - 9, 287, 62, 349, 62, 62, 279, 287, 288, 62, - 349, 51, 62, 62, 287, 104, 387, 53, 51, 53, - 62, 301, 302, 112, 53, 62, 9, 9, 301, 302, - 424, 225, 97, 98, 51, 66, 67, 212, -1, -1, - -1, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 92, 93, 94, 95, 96, -1, -1, 381, 349, - 383, 160, -1, -1, 163, -1, 349, 166, -1, 168, - -1, 170, -1, -1, 173, -1, -1, 51, -1, -1, - 157, -1, 413, 51, 415, 381, 417, 383, -1, -1, - -1, 381, -1, 383, 51, -1, 386, -1, 381, 422, - 383, 424, 425, -1, 203, -1, -1, 157, -1, -1, - -1, -1, -1, -1, 157, -1, -1, 216, -1, -1, - -1, -1, 445, 446, -1, 202, 422, -1, 424, 425, - 207, -1, 422, -1, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, 221, 222, -1, -1, 225, 445, - 446, -1, 202, -1, -1, 445, 446, 207, -1, 202, - -1, -1, 445, 446, 207, 51, -1, -1, -1, -1, - -1, 221, 222, -1, 273, 225, -1, -1, 221, 222, - -1, -1, 225, 157, -1, 284, -1, 286, -1, 157, - 289, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 157, -1, 279, -1, -1, -1, -1, -1, -1, -1, - 287, -1, -1, -1, -1, -1, -1, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 202, 279, - -1, -1, -1, 207, 202, 334, 279, 287, -1, 207, - -1, -1, -1, -1, 287, 202, -1, 221, 222, -1, - 207, 225, -1, 221, 222, -1, -1, 225, 357, 358, - 359, 360, -1, -1, 221, 222, -1, -1, 225, -1, - -1, 157, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 382, -1, 384, 385, -1, -1, -1, - -1, -1, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, 381, 279, 383, 40, 41, 56, - 43, 279, 59, 287, 47, -1, 202, -1, -1, 287, - -1, 207, 279, 56, -1, -1, 59, 426, -1, -1, - 287, 381, -1, 383, -1, 221, 222, -1, 381, 225, - 383, -1, -1, -1, -1, 422, -1, 424, 425, -1, - 97, 98, -1, -1, 40, 41, -1, 43, -1, -1, - -1, 47, -1, -1, 97, 98, -1, -1, 445, 446, - 56, -1, 422, 59, 424, 425, -1, -1, -1, 422, - -1, 424, 425, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 279, -1, 445, 446, -1, -1, -1, - -1, 287, 445, 446, -1, -1, -1, 381, -1, 383, - -1, 97, 98, 381, -1, 383, 40, 41, -1, 43, - -1, -1, -1, 47, 381, -1, 383, 40, 41, -1, - 43, -1, 56, -1, 47, 59, -1, -1, -1, -1, - -1, -1, -1, 56, -1, -1, 59, -1, 422, -1, - 424, 425, -1, -1, 422, -1, 424, 425, -1, -1, - -1, -1, -1, -1, -1, 422, -1, 424, 425, -1, - -1, 445, 446, 97, 98, -1, -1, 445, 446, -1, - -1, -1, -1, -1, 97, 98, -1, -1, 445, 446, - 11, -1, -1, -1, -1, 381, -1, 383, 19, -1, - -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 0, 94, 51, 289, 47, 47, 21, 74, 202, 9, + 3, 4, 289, 207, 56, 289, 74, 11, 12, 13, + 14, 15, 40, 41, 47, 43, 26, 47, 52, 47, + 48, 49, 50, 51, 52, 35, 36, 0, 56, 30, + 51, 53, 35, 36, 52, 99, 58, 52, 48, 62, + 47, 51, 62, 47, 121, 97, 98, 62, 51, 56, + 52, 104, 98, 121, 53, 57, 58, 58, 17, 18, + 78, 20, 21, 56, 74, 98, 93, 62, 98, 97, + 98, 74, 99, 101, 102, 102, 60, 281, 53, 57, + 58, 40, 41, 58, 43, 95, 66, 67, 47, 60, + 97, 98, 97, 98, 98, 56, 53, 56, 157, 53, + 59, 58, 53, 53, 58, 64, 65, 58, 58, 57, + 58, 121, 92, 93, 94, 95, 96, 52, 121, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 53, 60, 53, 57, 58, 58, 157, 58, 97, 98, + 54, 437, 52, 202, 53, 155, 53, 157, 207, 58, + 437, 58, 162, 437, 157, 165, 53, 94, 95, 96, + 56, 58, 221, 222, 223, 175, 53, 226, 53, 40, + 41, 58, 43, 58, 60, 56, 47, 48, 49, 50, + 51, 202, 58, 57, 261, 56, 207, 212, 56, 393, + 60, 395, 202, 261, 52, 98, 52, 207, 62, 202, + 221, 222, 223, 52, 207, 226, 27, 52, 52, 52, + 52, 221, 222, 223, 61, 52, 226, 52, 221, 222, + 223, 62, 281, 226, 62, 46, 97, 98, 49, 50, + 289, 435, 309, 310, 438, 62, 62, 62, 51, 154, + 62, 309, 310, 62, 62, 78, 161, 52, 52, 164, + 57, 261, 53, 27, 458, 459, 102, 57, 261, 61, + 281, 92, 93, 94, 95, 96, 61, 52, 289, 52, + 52, 281, 52, 57, 52, 62, 57, 52, 281, 289, + 290, 358, 52, 104, 52, 62, 289, 52, 25, 62, + 358, 112, 30, 62, 9, 62, 399, 53, 62, 309, + 310, 62, 62, 62, 62, 53, 309, 310, 367, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 53, + 53, 62, 62, 62, 393, 9, 395, 9, 226, 160, + 437, 367, 163, 51, 157, 166, 367, 168, 358, 170, + 212, -1, 173, -1, -1, 358, -1, 367, -1, -1, + -1, -1, -1, 278, 367, 51, -1, -1, -1, -1, + -1, -1, 393, 426, 395, 428, 435, 430, 437, 438, + -1, -1, 203, 393, -1, 395, 301, 302, 398, 202, + 393, -1, 395, -1, 207, 216, 51, -1, -1, 458, + 459, -1, -1, -1, -1, -1, -1, -1, 221, 222, + 223, -1, -1, 226, 435, -1, 437, 438, -1, -1, + -1, 51, -1, 338, -1, 435, 341, 437, 438, -1, + -1, -1, 435, -1, 437, 438, -1, 458, 459, -1, + -1, -1, -1, 40, 41, -1, 43, -1, 458, 459, + 47, -1, -1, -1, 275, 458, 459, -1, 51, 56, + -1, -1, 59, -1, -1, 286, -1, 288, 281, -1, + 291, 157, -1, -1, -1, 390, 289, -1, -1, -1, + -1, -1, 303, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 407, 51, 409, -1, 411, 318, -1, -1, + 97, 98, 157, -1, 325, 326, 327, 328, 329, 330, + 331, 332, 333, 334, 335, -1, 202, -1, -1, -1, + -1, 207, 343, -1, -1, -1, -1, 157, -1, -1, + -1, 51, -1, -1, -1, 221, 222, 223, -1, -1, + 226, -1, -1, -1, -1, -1, -1, 202, 369, 370, + 371, 372, 207, -1, 367, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 157, -1, 221, 222, 223, -1, + -1, 226, 202, 394, -1, 396, 397, 207, 40, 41, + 393, 43, 395, -1, -1, 47, 48, 49, 50, 51, + -1, 221, 222, 223, 56, 281, 226, -1, -1, 157, + -1, -1, -1, 289, 40, 41, -1, 43, -1, 202, + -1, 47, -1, -1, 207, -1, 52, -1, 439, -1, + 56, -1, 435, 59, 437, 438, 281, -1, 221, 222, + 223, -1, -1, 226, 289, 97, 98, 157, -1, -1, + -1, -1, -1, -1, 202, 458, 459, -1, -1, 207, + -1, 281, -1, -1, -1, -1, -1, -1, -1, 289, + -1, 97, 98, 221, 222, 223, -1, -1, 226, 40, 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, 55, 56, 422, -1, 424, 425, - -1, -1, -1, 64, 65, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 445, - 446, -1, -1, -1, -1, -1, -1, 11, -1, -1, - -1, -1, -1, -1, -1, 19, 97, 98, 22, 23, - 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, - -1, -1, -1, 47, 48, 49, 50, 51, -1, -1, - 54, 55, 56, -1, -1, -1, -1, -1, -1, -1, - 64, 65, -1, -1, -1, -1, -1, -1, 40, 41, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, - -1, -1, -1, -1, 56, 12, -1, 59, -1, -1, - -1, -1, 19, 97, 98, 22, 23, 24, -1, 26, - 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, 97, 98, 54, -1, 56, - -1, -1, -1, -1, -1, -1, -1, 64, 65, -1, - -1, -1, -1, -1, -1, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - -1, 56, 12, -1, 59, -1, -1, -1, -1, 19, - 97, 98, 22, 23, 24, -1, 26, 27, 28, 29, + 51, 367, 202, -1, -1, 56, -1, 207, 281, -1, + -1, -1, -1, 64, 65, -1, 289, 40, 41, -1, + 43, 221, 222, 223, 47, -1, 226, 393, -1, 395, + -1, -1, 367, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 281, -1, -1, 97, 98, -1, 40, + 41, 289, 43, -1, -1, -1, 47, 367, 393, -1, + 395, -1, -1, -1, -1, 56, -1, -1, 59, 435, + -1, 437, 438, -1, 97, 98, -1, -1, -1, 40, + 41, 281, 43, 393, -1, 395, 47, -1, -1, 289, + -1, -1, 458, 459, 367, 56, -1, -1, 59, -1, + 435, -1, 437, 438, 66, 67, 97, 98, 70, 71, + 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, + 393, -1, 395, 458, 459, 435, -1, 437, 438, 367, + 92, 93, 94, 95, 96, -1, 97, 98, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 16, 458, 459, + -1, -1, -1, -1, -1, 393, -1, 395, -1, -1, + -1, -1, 435, -1, 437, 438, -1, 367, -1, -1, + -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, -1, 458, 459, 56, 57, -1, + -1, 60, -1, 393, -1, 395, -1, 435, -1, 437, + 438, -1, -1, -1, -1, -1, -1, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 458, 459, -1, -1, 93, -1, -1, 96, 97, 98, + 99, 100, 101, 102, -1, 435, -1, 437, 438, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, + -1, -1, -1, -1, -1, -1, -1, 19, 458, 459, + 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, + -1, -1, 54, 55, 56, -1, -1, -1, -1, -1, + -1, 11, 64, 65, -1, -1, -1, -1, -1, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 16, 43, -1, -1, -1, 47, 48, 49, - 50, 51, 97, 98, 54, -1, 56, -1, -1, -1, - -1, -1, -1, -1, 64, 65, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 58, - -1, -1, 56, 57, 63, -1, 60, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 97, 98, -1, - -1, -1, 76, 77, -1, 16, -1, -1, -1, -1, - 89, 90, 91, 92, 93, 94, 95, 96, -1, 93, - -1, -1, 96, 97, 98, 99, 100, 101, 102, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, -1, -1, -1, 56, -1, -1, -1, 60, - -1, 62, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, 76, 77, -1, 16, 56, - -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 93, -1, -1, 96, 97, 98, 99, 100, - 101, 102, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, -1, -1, -1, 56, -1, - 97, 98, 60, -1, -1, -1, 40, 41, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, 76, 77, - -1, 16, 56, -1, -1, 59, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 93, -1, -1, 96, 97, - 98, 99, 100, 101, 102, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, -1, -1, - -1, 56, -1, 97, 98, 60, -1, -1, -1, 17, - 18, -1, 20, 21, -1, -1, -1, -1, -1, -1, - -1, 76, 77, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 40, 41, -1, 43, -1, -1, 93, 47, - -1, 96, 97, 98, 99, 100, 101, 102, 56, -1, - -1, 59, -1, -1, -1, -1, 64, 65, -1, -1, + 40, 41, -1, 43, -1, 97, 98, 47, 48, 49, + 50, 51, -1, -1, 54, 55, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, -1, -1, -1, -1, + -1, -1, 40, 41, -1, 43, -1, -1, -1, 47, + -1, -1, -1, -1, -1, -1, -1, -1, 56, 12, + -1, 59, -1, -1, -1, -1, 19, 97, 98, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, -1, -1, 47, 48, 49, 50, 51, 97, + 98, 54, -1, 56, -1, -1, -1, -1, -1, -1, + -1, 64, 65, -1, -1, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, -1, -1, 56, 12, -1, 59, -1, + -1, -1, -1, 19, 97, 98, 22, 23, 24, -1, + 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 16, 43, -1, -1, + -1, 47, 48, 49, 50, 51, 97, 98, 54, -1, + 56, -1, -1, -1, -1, -1, -1, -1, 64, 65, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, 40, 41, -1, + 43, 97, 98, -1, 47, -1, 76, 77, -1, 16, + -1, -1, -1, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 93, -1, -1, 96, 97, 98, 99, + 100, 101, 102, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, -1, -1, -1, 56, + -1, -1, -1, 60, 97, 98, -1, 40, 41, -1, + 43, -1, -1, -1, 47, -1, -1, -1, -1, 76, + 77, -1, 16, 56, -1, -1, 59, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 93, -1, -1, 96, + 97, 98, 99, 100, 101, 102, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, -1, + -1, -1, 56, -1, 97, 98, 60, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, -1, 76, 77, 47, -1, -1, -1, -1, -1, + -1, -1, -1, 56, -1, -1, 59, -1, -1, 93, + -1, -1, 96, 97, 98, 99, 100, 101, 102, 19, + -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, + -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, -1, 43, 97, 98, -1, 47, 48, 49, + 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, + -1, -1, -1, -1, 64, 65, 40, 41, -1, 43, + -1, -1, -1, 47, -1, -1, 40, 41, -1, 43, + -1, -1, 56, 47, -1, 59, -1, -1, -1, -1, + 64, 65, 56, -1, -1, 59, -1, 97, 98, -1, + -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, + -1, -1, 53, 97, 98, -1, -1, 58, -1, -1, + -1, -1, 63, 97, 98, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 53, -1, -1, -1, + -1, 58, -1, -1, -1, -1, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, -1, -1, -1, -1, 19, 97, - 98, 22, 23, 24, -1, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, - -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, - -1, -1, 47, -1, -1, 40, 41, -1, 43, -1, - -1, 56, 47, -1, 59, -1, -1, -1, -1, 64, - 65, 56, -1, -1, 59, -1, 97, 98, -1, -1, - -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, -1, -1, -1, -1, -1, -1, - -1, 53, 97, 98, -1, -1, 58, -1, -1, -1, - -1, 63, 97, 98, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 53, -1, -1, -1, -1, - 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 53, -1, -1, -1, -1, 58, + -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 53, -1, -1, -1, -1, 58, -1, - -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 63, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 53, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 63, -1, + -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 53, -1, 89, 90, 91, 92, 93, 94, + 95, 96, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 53, -1, 89, 90, + 91, 92, 93, 94, 95, 96, 63, -1, -1, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 53, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 63, -1, -1, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, 89, - 90, 91, 92, 93, 94, 95, 96, 63, -1, -1, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 53, -1, 89, 90, 91, 92, 93, 94, 95, - 96, 63, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, 89, 90, 91, - 92, 93, 94, 95, 96, 63, -1, -1, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, 89, 90, 91, 92, 93, 94, 95, 96, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, - -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, - 94, 95, 96, 57, -1, -1, -1, -1, -1, 63, + 53, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 57, -1, -1, -1, -1, -1, + 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, + 93, 94, 95, 96, 58, -1, -1, -1, -1, 63, -1, -1, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 89, 90, 91, 92, 93, @@ -4456,9 +4544,8 @@ namespace xsk { namespace gsc { namespace s2 { -1, -1, 70, 71, 72, 73, 74, 75, -1, -1, -1, -1, 90, 91, 92, 93, 94, 95, 96, -1, -1, -1, 90, -1, 92, 93, 94, 95, 96, 66, - 67, -1, -1, 70, 71, 72, 73, 74, 75, 66, 67, -1, -1, -1, -1, 72, 73, 74, 75, -1, - -1, -1, -1, -1, -1, 92, 93, 94, 95, 96, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, 95, 96 }; @@ -4466,51 +4553,52 @@ namespace xsk { namespace gsc { namespace s2 { parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 47, 98, 114, 115, - 116, 117, 118, 119, 120, 121, 188, 97, 98, 189, - 189, 52, 0, 116, 117, 118, 52, 78, 62, 62, - 99, 191, 169, 188, 16, 40, 41, 42, 43, 44, + 116, 117, 118, 119, 120, 121, 191, 97, 98, 192, + 192, 52, 0, 116, 117, 118, 52, 78, 62, 62, + 99, 194, 169, 191, 16, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, 93, 96, 98, 100, 101, 102, 153, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 53, 53, 58, 56, 188, 189, 56, - 188, 189, 56, 153, 56, 57, 153, 170, 171, 188, - 153, 153, 52, 56, 101, 102, 164, 165, 173, 174, - 176, 177, 181, 182, 183, 184, 188, 189, 98, 62, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 53, 53, 58, 56, 191, 192, 56, + 191, 192, 56, 153, 56, 57, 153, 170, 171, 191, + 153, 153, 52, 56, 101, 102, 164, 165, 176, 177, + 179, 180, 184, 185, 186, 187, 191, 192, 98, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, 93, 94, 95, 96, 56, - 59, 166, 167, 188, 52, 60, 62, 54, 127, 188, + 59, 166, 167, 191, 52, 60, 62, 54, 127, 191, 56, 52, 60, 56, 52, 60, 56, 53, 58, 153, 58, 57, 153, 56, 59, 60, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 47, 98, 187, 170, - 171, 188, 11, 19, 22, 23, 24, 26, 27, 28, + 153, 153, 153, 153, 153, 153, 47, 98, 190, 170, + 171, 191, 11, 19, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 55, 64, 65, 122, 123, 125, 126, 127, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 155, 156, 157, 164, 165, 173, 174, 177, - 188, 153, 170, 188, 153, 170, 188, 153, 153, 57, - 153, 153, 188, 61, 57, 53, 52, 12, 122, 124, - 153, 62, 52, 62, 52, 122, 52, 52, 52, 52, - 93, 191, 194, 61, 62, 62, 62, 153, 62, 52, - 52, 177, 177, 55, 123, 62, 62, 62, 62, 62, - 17, 18, 20, 21, 64, 65, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 57, 53, 52, - 57, 53, 52, 57, 58, 57, 153, 170, 12, 122, - 62, 53, 153, 27, 153, 128, 155, 156, 157, 177, - 188, 153, 61, 61, 62, 170, 170, 52, 52, 52, - 52, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 57, 170, 57, 170, 57, 153, 52, 53, - 62, 53, 52, 53, 62, 30, 58, 53, 53, 53, - 153, 153, 153, 153, 52, 53, 52, 53, 52, 53, - 170, 122, 153, 122, 153, 154, 153, 188, 127, 62, - 62, 53, 53, 58, 53, 58, 53, 58, 170, 170, - 170, 53, 25, 53, 62, 53, 30, 62, 62, 171, - 62, 171, 62, 171, 53, 53, 53, 122, 62, 128, - 122, 153, 53, 53, 53, 53, 53, 62, 62, 62, - 122, 122 + 55, 56, 64, 65, 122, 123, 125, 126, 127, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 155, 156, 157, 164, 165, 173, 176, + 177, 180, 191, 153, 170, 191, 153, 170, 191, 153, + 153, 57, 153, 153, 191, 61, 57, 53, 52, 12, + 122, 124, 153, 62, 52, 62, 52, 122, 52, 52, + 52, 52, 93, 194, 197, 61, 62, 62, 62, 153, + 62, 52, 52, 56, 174, 175, 176, 177, 191, 180, + 180, 55, 123, 62, 62, 62, 62, 62, 78, 17, + 18, 20, 21, 64, 65, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 57, 53, 52, 57, + 53, 52, 57, 58, 57, 153, 170, 12, 122, 62, + 53, 153, 27, 153, 128, 155, 156, 157, 180, 191, + 153, 61, 61, 62, 170, 170, 57, 58, 153, 52, + 52, 52, 52, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 57, 170, 57, 170, 57, 153, + 52, 53, 62, 53, 52, 53, 62, 30, 58, 53, + 53, 53, 175, 153, 153, 153, 153, 52, 53, 52, + 53, 52, 53, 170, 122, 153, 122, 153, 154, 153, + 191, 127, 62, 62, 53, 53, 58, 53, 58, 53, + 58, 170, 170, 170, 53, 25, 53, 62, 53, 30, + 62, 62, 171, 62, 171, 62, 171, 53, 53, 53, + 122, 62, 128, 122, 153, 53, 53, 53, 53, 53, + 62, 62, 62, 122, 122 }; const unsigned char @@ -4526,19 +4614,20 @@ namespace xsk { namespace gsc { namespace s2 { 135, 135, 136, 137, 137, 138, 139, 140, 141, 142, 143, 143, 144, 145, 145, 146, 147, 148, 149, 149, 150, 151, 152, 153, 153, 153, 154, 154, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, - 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, + 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, + 156, 156, 157, 157, 158, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, + 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 161, 162, 162, 162, 162, 163, 164, 164, 165, 165, - 166, 166, 166, 166, 166, 166, 167, 167, 167, 167, - 168, 169, 169, 169, 170, 170, 171, 171, 172, 172, - 173, 174, 175, 176, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 188, 189, 189, 190, 191, 192, - 193, 193, 194, 194, 195, 196 + 160, 161, 162, 162, 162, 162, 163, 164, 164, 165, + 165, 166, 166, 166, 166, 166, 166, 167, 167, 167, + 167, 168, 169, 169, 169, 170, 170, 171, 171, 172, + 172, 173, 174, 174, 175, 175, 175, 176, 177, 178, + 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 191, 192, 192, 193, 194, 195, 196, 196, 197, + 197, 198, 199 }; const signed char @@ -4554,19 +4643,20 @@ namespace xsk { namespace gsc { namespace s2 { 8, 6, 2, 2, 4, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, - 4, 6, 5, 7, 5, 7, 8, 9, 9, 9, - 3, 3, 1, 0, 1, 0, 3, 1, 2, 3, - 4, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 7, - 2, 1, 2, 1, 1, 1 + 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, + 2, 4, 6, 5, 7, 5, 7, 8, 9, 9, + 9, 3, 3, 1, 0, 1, 0, 3, 1, 2, + 3, 3, 3, 1, 1, 1, 1, 4, 3, 3, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, + 1, 1, 1 }; @@ -4576,29 +4666,30 @@ namespace xsk { namespace gsc { namespace s2 { const short parser::yyrline_[] = { - 0, 260, 260, 261, 265, 267, 269, 271, 273, 275, - 280, 284, 289, 290, 291, 292, 293, 297, 302, 307, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 340, 341, 345, 347, 352, - 354, 359, 360, 364, 365, 369, 371, 373, 376, 380, - 382, 387, 389, 391, 396, 401, 403, 408, 413, 415, - 420, 422, 427, 432, 434, 439, 444, 449, 454, 459, - 464, 466, 471, 476, 478, 483, 488, 493, 498, 500, - 505, 510, 515, 520, 521, 522, 526, 527, 531, 533, - 535, 537, 539, 541, 543, 545, 547, 549, 551, 556, - 558, 563, 565, 570, 575, 577, 579, 581, 583, 585, - 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, - 607, 609, 614, 615, 616, 617, 618, 619, 620, 621, - 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, - 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, - 645, 650, 652, 654, 656, 661, 666, 667, 670, 671, - 675, 677, 679, 681, 683, 685, 690, 692, 694, 696, - 701, 706, 708, 711, 715, 718, 722, 724, 729, 731, - 736, 741, 746, 751, 756, 757, 758, 759, 760, 761, - 762, 763, 764, 768, 773, 778, 783, 788, 793, 798, - 803, 808, 813, 818, 820, 825, 827, 832, 837, 842, - 847, 849, 854, 856, 861, 866 + 0, 263, 263, 264, 268, 270, 272, 274, 276, 278, + 283, 287, 292, 293, 294, 295, 296, 300, 305, 310, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 343, 344, 348, 350, 355, + 357, 362, 363, 367, 368, 372, 374, 376, 379, 383, + 385, 390, 392, 394, 399, 404, 406, 411, 416, 418, + 423, 425, 430, 435, 437, 442, 447, 452, 457, 462, + 467, 469, 474, 479, 481, 486, 491, 496, 501, 503, + 508, 513, 518, 523, 524, 525, 529, 530, 534, 536, + 538, 540, 542, 544, 546, 548, 550, 552, 554, 556, + 561, 563, 568, 570, 575, 580, 582, 584, 586, 588, + 590, 592, 594, 596, 598, 600, 602, 604, 606, 608, + 610, 612, 614, 619, 620, 621, 622, 623, 624, 625, + 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, + 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, + 646, 650, 655, 657, 659, 661, 666, 671, 672, 675, + 676, 680, 682, 684, 686, 688, 690, 695, 697, 699, + 701, 706, 711, 713, 716, 720, 723, 727, 729, 734, + 736, 741, 746, 748, 753, 754, 755, 759, 764, 769, + 774, 779, 780, 781, 782, 783, 784, 785, 786, 787, + 791, 796, 801, 806, 811, 816, 821, 826, 831, 836, + 841, 843, 848, 850, 855, 860, 865, 870, 872, 877, + 879, 884, 889 }; void @@ -4631,9 +4722,9 @@ namespace xsk { namespace gsc { namespace s2 { #line 13 "parser.ypp" } } } // xsk::gsc::s2 -#line 4635 "parser.cpp" +#line 4726 "parser.cpp" -#line 870 "parser.ypp" +#line 893 "parser.ypp" void xsk::gsc::s2::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/s2/xsk/parser.hpp b/src/s2/xsk/parser.hpp index e7b99cd3..1fefa44b 100644 --- a/src/s2/xsk/parser.hpp +++ b/src/s2/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace s2 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -538,104 +540,107 @@ namespace xsk { namespace gsc { namespace s2 { // expr_true char dummy35[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy36[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy36[sizeof (ast::expr_undefined::ptr)]; + char dummy37[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy37[sizeof (ast::expr_vector::ptr)]; + char dummy38[sizeof (ast::expr_vector::ptr)]; // include - char dummy38[sizeof (ast::include::ptr)]; + char dummy39[sizeof (ast::include::ptr)]; // program - char dummy39[sizeof (ast::program::ptr)]; + char dummy40[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy40[sizeof (ast::stmt)]; + char dummy41[sizeof (ast::stmt)]; // stmt_assign - char dummy41[sizeof (ast::stmt_assign::ptr)]; + char dummy42[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy42[sizeof (ast::stmt_break::ptr)]; + char dummy43[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy43[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy44[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy44[sizeof (ast::stmt_call::ptr)]; + char dummy45[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy45[sizeof (ast::stmt_case::ptr)]; + char dummy46[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy46[sizeof (ast::stmt_continue::ptr)]; + char dummy47[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy47[sizeof (ast::stmt_default::ptr)]; + char dummy48[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy48[sizeof (ast::stmt_dev::ptr)]; + char dummy49[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy49[sizeof (ast::stmt_dowhile::ptr)]; + char dummy50[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy50[sizeof (ast::stmt_endon::ptr)]; + char dummy51[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy51[sizeof (ast::stmt_expr::ptr)]; + char dummy52[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy52[sizeof (ast::stmt_for::ptr)]; + char dummy53[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy53[sizeof (ast::stmt_foreach::ptr)]; + char dummy54[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy54[sizeof (ast::stmt_if::ptr)]; + char dummy55[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy55[sizeof (ast::stmt_ifelse::ptr)]; + char dummy56[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy56[sizeof (ast::stmt_list::ptr)]; + char dummy57[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy57[sizeof (ast::stmt_notify::ptr)]; + char dummy58[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy58[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy59[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy59[sizeof (ast::stmt_prof_end::ptr)]; + char dummy60[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy60[sizeof (ast::stmt_return::ptr)]; + char dummy61[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy61[sizeof (ast::stmt_switch::ptr)]; + char dummy62[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy62[sizeof (ast::stmt_wait::ptr)]; + char dummy63[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe - char dummy63[sizeof (ast::stmt_waitframe::ptr)]; + char dummy64[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill - char dummy64[sizeof (ast::stmt_waittill::ptr)]; + char dummy65[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy65[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy66[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy66[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy67[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy67[sizeof (ast::stmt_while::ptr)]; + char dummy68[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -643,7 +648,7 @@ namespace xsk { namespace gsc { namespace s2 { // "localized string" // "float" // "integer" - char dummy68[sizeof (std::string)]; + char dummy69[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -997,30 +1002,33 @@ namespace xsk { namespace gsc { namespace s2 { S_expr_arguments = 170, // expr_arguments S_expr_arguments_no_empty = 171, // expr_arguments_no_empty S_expr_reference = 172, // expr_reference - S_expr_array = 173, // expr_array - S_expr_field = 174, // expr_field - S_expr_size = 175, // expr_size - S_expr_paren = 176, // expr_paren - S_expr_object = 177, // expr_object - S_expr_thisthread = 178, // expr_thisthread - S_expr_empty_array = 179, // expr_empty_array - S_expr_undefined = 180, // expr_undefined - S_expr_game = 181, // expr_game - S_expr_self = 182, // expr_self - S_expr_anim = 183, // expr_anim - S_expr_level = 184, // expr_level - S_expr_animation = 185, // expr_animation - S_expr_animtree = 186, // expr_animtree - S_expr_identifier_nosize = 187, // expr_identifier_nosize - S_expr_identifier = 188, // expr_identifier - S_expr_path = 189, // expr_path - S_expr_istring = 190, // expr_istring - S_expr_string = 191, // expr_string - S_expr_vector = 192, // expr_vector - S_expr_float = 193, // expr_float - S_expr_integer = 194, // expr_integer - S_expr_false = 195, // expr_false - S_expr_true = 196 // expr_true + S_expr_tuple = 173, // expr_tuple + S_expr_tuple_arguments = 174, // expr_tuple_arguments + S_expr_tuple_types = 175, // expr_tuple_types + S_expr_array = 176, // expr_array + S_expr_field = 177, // expr_field + S_expr_size = 178, // expr_size + S_expr_paren = 179, // expr_paren + S_expr_object = 180, // expr_object + S_expr_thisthread = 181, // expr_thisthread + S_expr_empty_array = 182, // expr_empty_array + S_expr_undefined = 183, // expr_undefined + S_expr_game = 184, // expr_game + S_expr_self = 185, // expr_self + S_expr_anim = 186, // expr_anim + S_expr_level = 187, // expr_level + S_expr_animation = 188, // expr_animation + S_expr_animtree = 189, // expr_animtree + S_expr_identifier_nosize = 190, // expr_identifier_nosize + S_expr_identifier = 191, // expr_identifier + S_expr_path = 192, // expr_path + S_expr_istring = 193, // expr_istring + S_expr_string = 194, // expr_string + S_expr_vector = 195, // expr_vector + S_expr_float = 196, // expr_float + S_expr_integer = 197, // expr_integer + S_expr_false = 198, // expr_false + S_expr_true = 199 // expr_true }; }; @@ -1086,6 +1094,8 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1208,6 +1218,10 @@ namespace xsk { namespace gsc { namespace s2 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1861,6 +1875,20 @@ namespace xsk { namespace gsc { namespace s2 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2376,6 +2404,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2498,6 +2528,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4839,8 +4873,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2419, ///< Last index in yytable_. - yynnts_ = 84, ///< Number of nonterminal symbols. + yylast_ = 2479, ///< Last index in yytable_. + yynnts_ = 87, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4896,6 +4930,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -5018,6 +5054,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5218,6 +5258,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5340,6 +5382,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5547,7 +5593,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s2 -#line 5551 "parser.hpp" +#line 5597 "parser.hpp" diff --git a/src/s2/xsk/resolver.cpp b/src/s2/xsk/resolver.cpp index ca29aa50..c0f915b7 100644 --- a/src/s2/xsk/resolver.cpp +++ b/src/s2/xsk/resolver.cpp @@ -47,7 +47,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -59,7 +59,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -76,7 +76,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -105,7 +105,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/s2/xsk/s2.cpp b/src/s2/xsk/s2.cpp index f59a8deb..f4bbf0c9 100644 --- a/src/s2/xsk/s2.cpp +++ b/src/s2/xsk/s2.cpp @@ -176,7 +176,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/s4/xsk/assembler.cpp b/src/s4/xsk/assembler.cpp index 3dca469f..ad7e6060 100644 --- a/src/s4/xsk/assembler.cpp +++ b/src/s4/xsk/assembler.cpp @@ -439,7 +439,7 @@ void assembler::assemble_instruction(const instruction::ptr& inst) assemble_far_call(inst, true); break;*/ default: - throw asm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw asm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -546,6 +546,10 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) index += 3; } + else + { + throw asm_error("invalid switch case '" + inst->data[1 + (3 * i)] + "'!"); + } } } @@ -623,7 +627,7 @@ auto assembler::resolve_function(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve local function address of '" + name + "'!"); + throw asm_error("couldn't resolve local function address of '" + name + "'!"); } auto assembler::resolve_label(const std::string& name) -> std::int32_t @@ -636,7 +640,7 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t } } - throw asm_error("Couldn't resolve label address of '" + name + "'!"); + throw asm_error("couldn't resolve label address of '" + name + "'!"); } } // namespace xsk::gsc::s4 diff --git a/src/s4/xsk/compiler.cpp b/src/s4/xsk/compiler.cpp index 63ea8453..79e9dc3d 100644 --- a/src/s4/xsk/compiler.cpp +++ b/src/s4/xsk/compiler.cpp @@ -40,7 +40,7 @@ auto compiler::parse_buffer(const std::string& file, char* data, size_t size) -> if (parser.parse() || result == nullptr) { - throw comp_error(location(&file), "An unknown error ocurred while parsing gsc file."); + throw comp_error(location(&file), "an unknown error ocurred while parsing gsc file"); } return result; @@ -91,7 +91,7 @@ void compiler::emit_include(const ast::include::ptr& include) { if (inc.name == path) { - throw comp_error(include->loc(), "error duplicated include file '" + path + "'."); + throw comp_error(include->loc(), "duplicated include file '" + path + "'"); } } @@ -113,7 +113,7 @@ void compiler::emit_include(const ast::include::ptr& include) if (funcs.size() == 0) { - throw comp_error(include->loc(), "error empty include file '" + path + "'."); + throw comp_error(include->loc(), "empty include file '" + path + "'"); } includes_.push_back(include_t(path, funcs)); @@ -151,13 +151,18 @@ void compiler::emit_declaration(const ast::decl& decl) void compiler::emit_decl_usingtree(const ast::decl_usingtree::ptr& animtree) { if (developer_thread_) - throw comp_error(animtree->loc(), "cannot put #using_animtree inside /# ... #/ comment"); + throw comp_error(animtree->loc(), "cannot put #using_animtree inside developer block comment"); animtrees_.push_back({ animtree->name->value, false }); } void compiler::emit_decl_constant(const ast::decl_constant::ptr& constant) { + const auto itr = constants_.find(constant->name->value); + + if (itr != constants_.end()) + throw comp_error(constant->loc(), "duplicated constant '" + constant->name->value + "'"); + constants_.insert({ constant->name->value, std::move(constant->value) }); } @@ -395,7 +400,7 @@ void compiler::emit_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const blo for (const auto& entry : stmt->args->list) { - create_variable(entry.as_identifier, blk); + variable_create(entry.as_identifier, blk); emit_opcode(opcode::OP_SafeSetWaittillVariableFieldCached, variable_access_index(entry.as_identifier, blk)); } @@ -1044,11 +1049,18 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: if (expr->rvalue == ast::kind::expr_undefined) { emit_expr_clear(expr->lvalue, blk); - return; + } + else if (expr->lvalue == ast::kind::expr_tuple) + { + emit_expr(expr->rvalue, blk); + emit_expr_tuple(expr->lvalue.as_tuple, blk); + } + else + { + emit_expr(expr->rvalue, blk); + emit_expr_variable_ref(expr->lvalue, blk, true); } - emit_expr(expr->rvalue, blk); - emit_expr_variable_ref(expr->lvalue, blk, true); return; } @@ -1580,7 +1592,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { - initialize_variable(entry, blk); + variable_initialize(entry, blk); data.push_back(variable_create_index(entry, blk)); } @@ -1644,6 +1656,29 @@ void compiler::emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& emit_opcode(opcode::OP_size); } +void compiler::emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + emit_expr_variable_ref(expr->temp, blk, true); + + auto index = 0; + + for (const auto& entry : expr->list) + { + if (index == 0) + emit_opcode(opcode::OP_GetZero); + else + emit_opcode(opcode::OP_GetByte, utils::string::va("%d", index)); + + index++; + + emit_opcode(opcode::OP_EvalLocalArrayCached, variable_access_index(expr->temp.as_identifier, blk)); + + emit_expr_variable_ref(entry, blk, true); + } + + emit_expr_clear_local(expr->temp.as_identifier, blk); +} + void compiler::emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set) { switch (expr.kind()) @@ -1683,7 +1718,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block { if (!variable_initialized(expr->obj.as_identifier, blk)) { - initialize_variable(expr->obj.as_identifier, blk); + variable_initialize(expr->obj.as_identifier, blk); emit_opcode(opcode::OP_EvalNewLocalArrayRefCached0, variable_create_index(expr->obj.as_identifier, blk)); if (!set) throw comp_error(expr->loc(), "INTERNAL: VAR CREATED BUT NOT SET!"); @@ -1769,7 +1804,7 @@ void compiler::emit_expr_local_ref(const ast::expr_identifier::ptr& expr, const { if (!variable_initialized(expr, blk)) { - initialize_variable(expr, blk); + variable_initialize(expr, blk); emit_opcode(opcode::OP_SetNewLocalVariableFieldCached0, variable_create_index(expr, blk)); } else if (variable_stack_index(expr, blk) == 0) @@ -2298,7 +2333,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - register_variable(entry.as_identifier->value, blk); + variable_register(entry.as_identifier->value, blk); } } @@ -2365,11 +2400,11 @@ void compiler::process_stmt_while(const ast::stmt_while::ptr& stmt, const block: continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2392,11 +2427,11 @@ void compiler::process_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const bl continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2424,7 +2459,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr continue_blks_.push_back(stmt->blk.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_stmt(stmt->iter, stmt->blk_iter); @@ -2433,7 +2468,7 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr if (const_cond) blk->append(break_blks_); - blk->merge({stmt->blk.get()}); + blk->merge({ stmt->blk.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2441,8 +2476,8 @@ void compiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::ptr void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block::ptr& blk) { - auto array_name = utils::string::va("temp_%d", ++label_idx_); - auto key_name = utils::string::va("temp_%d", ++label_idx_); + auto array_name = utils::string::va("_temp_%d", ++label_idx_); + auto key_name = utils::string::va("_temp_%d", ++label_idx_); stmt->array = ast::expr(std::make_unique(stmt->loc(), array_name)); @@ -2474,13 +2509,13 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0u; i < continue_blks_.size(); i++) - blk->append({continue_blks_.at(i)}); + blk->append({ continue_blks_.at(i) }); process_expr(stmt->key_expr, stmt->ctx_post); blk->append({ stmt->ctx_post.get() }); blk->merge({ stmt->ctx_post.get() }); - blk->merge({stmt->ctx.get()}); + blk->merge({ stmt->ctx.get() }); break_blks_ = old_breaks; continue_blks_ = old_continues; @@ -2640,23 +2675,40 @@ void compiler::process_expr(const ast::expr& expr, const block::ptr& blk) { if (expr == ast::kind::expr_identifier) { - register_variable(expr.as_identifier->value, blk); + variable_register(expr.as_identifier->value, blk); } else if (expr == ast::kind::expr_array) { process_expr(expr.as_array->obj, blk); } + else if (expr == ast::kind::expr_tuple) + { + process_expr_tuple(expr.as_tuple, blk); + } +} + +void compiler::process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk) +{ + auto array = utils::string::va("_temp_%d", ++label_idx_); + expr->temp = ast::expr(std::make_unique(expr->loc(), array)); + + process_expr(expr->temp, blk); + + for (const auto& entry : expr->list) + { + process_expr(entry, blk); + } } void compiler::process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk) { for (const auto& entry : decl->list) { - register_variable(entry->value, blk); + variable_register(entry->value, blk); } } -void compiler::register_variable(const std::string& name, const block::ptr& blk) +void compiler::variable_register(const std::string& name, const block::ptr& blk) { auto it = std::find_if (blk->local_vars.begin(), blk->local_vars.end(), [&](const gsc::local_var& v) { return v.name == name; }); @@ -2683,7 +2735,7 @@ void compiler::register_variable(const std::string& name, const block::ptr& blk) } } -void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::uint32_t i = 0; i < blk->local_vars.size(); i++) { @@ -2697,7 +2749,6 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const { emit_opcode(opcode::OP_CreateLocalVariable, utils::string::va("%d", blk->local_vars[j].create)); blk->local_vars[j].init = true; - //ctx->local_vars_create_count++; } } blk->local_vars[i].init = true; @@ -2710,7 +2761,7 @@ void compiler::initialize_variable(const ast::expr_identifier::ptr& name, const throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); } -void compiler::create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk) +void compiler::variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk) { for (std::size_t i = 0; i < blk->local_vars.size(); i++) { @@ -2888,8 +2939,7 @@ auto compiler::is_constant_condition(const ast::expr& expr) -> bool auto compiler::create_label() -> std::string { label_idx_++; - auto name = utils::string::va("loc_%d", label_idx_); - return name; + return utils::string::va("loc_%d", label_idx_); } auto compiler::insert_label() -> std::string @@ -2904,7 +2954,7 @@ auto compiler::insert_label() -> std::string { label_idx_++; auto name = utils::string::va("loc_%d", label_idx_); - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); return name; } } @@ -2937,7 +2987,7 @@ void compiler::insert_label(const std::string& name) } else { - function_->labels.insert({index_, name}); + function_->labels.insert({ index_, name }); } } diff --git a/src/s4/xsk/compiler.hpp b/src/s4/xsk/compiler.hpp index 01238f33..e714ad21 100644 --- a/src/s4/xsk/compiler.hpp +++ b/src/s4/xsk/compiler.hpp @@ -98,6 +98,7 @@ private: void emit_expr_istrue(const ast::expr_istrue::ptr& expr, const block::ptr& blk); void emit_expr_reference(const ast::expr_reference::ptr& expr, const block::ptr& blk); void emit_expr_size(const ast::expr_size::ptr& expr, const block::ptr& blk); + void emit_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void emit_expr_variable_ref(const ast::expr& expr, const block::ptr& blk, bool set); void emit_expr_array_ref(const ast::expr_array::ptr& expr, const block::ptr& blk, bool set); void emit_expr_field_ref(const ast::expr_field::ptr& expr, const block::ptr& blk, bool set); @@ -139,10 +140,11 @@ private: void process_stmt_continue(const ast::stmt_continue::ptr& stmt, const block::ptr& blk); void process_stmt_return(const ast::stmt_return::ptr& stmt, const block::ptr& blk); void process_expr(const ast::expr& expr, const block::ptr& blk); + void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_parameters(const ast::expr_parameters::ptr& decl, const block::ptr& blk); - void register_variable(const std::string& name, const block::ptr& blk); - void initialize_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); - void create_variable(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_register(const std::string& name, const block::ptr& blk); + void variable_initialize(const ast::expr_identifier::ptr& name, const block::ptr& blk); + void variable_create(const ast::expr_identifier::ptr& name, const block::ptr& blk); auto variable_stack_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::uint8_t; auto variable_create_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; auto variable_access_index(const ast::expr_identifier::ptr& name, const block::ptr& blk) -> std::string; diff --git a/src/s4/xsk/decompiler.cpp b/src/s4/xsk/decompiler.cpp index e9824bfd..bcb9f59f 100644 --- a/src/s4/xsk/decompiler.cpp +++ b/src/s4/xsk/decompiler.cpp @@ -92,42 +92,42 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique()); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_Return: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_GetZero: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetNegByte: case opcode::OP_GetNegUnsignedShort: { auto node = std::make_unique(loc, "-" + inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFloat: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetVector: { auto x = ast::expr(std::make_unique(loc, inst->data[0])); @@ -135,60 +135,60 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto z = ast::expr(std::make_unique(loc, inst->data[2])); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetIString: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetUndefined: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_EmptyArray: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLevel: case opcode::OP_GetLevelObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnim: case opcode::OP_GetAnimObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetSelf: case opcode::OP_GetSelfObject: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetGame: case opcode::OP_GetGameRef: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimation: { auto value = utils::string::unquote(inst->data[0]); @@ -202,8 +202,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, utils::string::unquote(inst->data[1])); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetAnimTree: { auto value = utils::string::unquote(inst->data[0]); @@ -217,14 +217,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetThisthread: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetBuiltinFunction: case opcode::OP_GetBuiltinMethod: { @@ -232,24 +232,24 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_GetFarFunction: { auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CreateLocalVariable: { if (in_waittill_) @@ -259,107 +259,107 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } else { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_RemoveLocalVariables: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached1: { auto node = std::make_unique(loc, "1"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached2: { auto node = std::make_unique(loc, "2"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached3: { auto node = std::make_unique(loc, "3"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached4: { auto node = std::make_unique(loc, "4"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached5: { auto node = std::make_unique(loc, "5"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalNewLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached0: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalArrayRefCached: { auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, inst->data[0])); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalArrayRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ClearArray: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -370,8 +370,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_AddArray: { auto value = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -381,8 +381,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto args = std::make_unique(loc); args->list.push_back(std::move(value)); - auto expr = std::make_unique(array->loc(), std::move(args)); - stack_.push(std::move(expr)); + auto node = std::make_unique(array->loc(), std::move(args)); + stack_.push(std::move(node)); } else if (array->kind() == ast::kind::expr_add_array) { @@ -393,14 +393,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { throw decomp_error("unknown add array type (could be an array variable name?)"); } - } break; + } case opcode::OP_PreScriptCall: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); @@ -409,31 +409,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); auto path = std::make_unique(loc); auto name = std::make_unique(loc, inst->data[0]); - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); while (var->kind() != ast::kind::asm_prescriptcall) { args->list.push_back(std::move(var)); - var = std::move(stack_.top()); - stack_.pop(); + var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -456,8 +454,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); @@ -466,8 +464,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) for (auto i = std::stoul(inst->data[1]); i > 0; i--) { - auto var = std::move(stack_.top()); - stack_.pop(); + auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); args->list.push_back(std::move(var)); } @@ -475,8 +472,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); @@ -491,10 +488,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) } auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); - auto expr = std::make_unique(loc, std::move(call)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(call)); + stack_.push(std::move(node)); break; + } case opcode::OP_ScriptLocalMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -514,8 +511,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptLocalMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -535,8 +532,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); @@ -545,8 +542,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); @@ -566,8 +563,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -590,8 +587,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); @@ -608,8 +605,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); @@ -626,8 +623,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -647,8 +644,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFarMethodChildThreadCall: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -668,8 +665,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptFunctionCallPointer: { auto args = std::make_unique(loc); @@ -687,8 +684,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodCallPointer: { auto args = std::make_unique(loc); @@ -707,8 +704,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptThreadCallPointer: { auto args = std::make_unique(loc); @@ -725,8 +722,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -743,8 +740,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodThreadCallPointer: { auto args = std::make_unique(loc); @@ -762,8 +759,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::thread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_ScriptMethodChildThreadCallPointer: { auto args = std::make_unique(loc); @@ -781,8 +778,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::childthread)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinPointer: { auto args = std::make_unique(loc); @@ -799,8 +796,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethodPointer: { auto args = std::make_unique(loc); @@ -818,8 +815,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(func), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); @@ -828,8 +825,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); @@ -846,8 +843,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); @@ -864,8 +861,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); @@ -882,8 +879,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); @@ -900,8 +897,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); @@ -918,8 +915,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); @@ -936,8 +933,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto func = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(func)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); @@ -949,8 +946,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod1: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -968,8 +965,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod2: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -987,8 +984,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod3: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1006,8 +1003,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj) ,std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod4: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1025,8 +1022,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod5: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1044,8 +1041,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); @@ -1064,31 +1061,31 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(obj), std::move(call)); stack_.push(std::move(node)); - } break; + } case opcode::OP_DecTop: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - auto stmt = std::make_unique(expr.loc(), std::move(expr)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(expr.loc(), std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_inc: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_dec: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), false); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1096,8 +1093,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_ex_or: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1105,8 +1102,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_bit_and: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1114,8 +1111,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_equality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1123,8 +1120,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_inequality: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1132,8 +1129,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1141,8 +1138,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1150,8 +1147,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_less_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1159,8 +1156,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_greater_equal: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1168,8 +1165,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_left: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1177,8 +1174,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_shift_right: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1186,8 +1183,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_plus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1195,8 +1192,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_minus: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1204,8 +1201,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_multiply: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1213,8 +1210,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_divide: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1222,8 +1219,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_mod: { auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1231,45 +1228,45 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue), std::move(rvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_wait: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.loc(); auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittillFrameEnd: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waitframe: { auto stmt = ast::stmt(std::make_unique(loc)); func_->stmt->list.push_back(std::move(stmt)); - } break; + } case opcode::OP_waittill: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); auto args = std::make_unique(loc); - auto stmt = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); - stack_.push(std::move(stmt)); + auto node = std::make_unique(loc, std::move(obj) , std::move(event), std::move(args)); + stack_.push(std::move(node)); in_waittill_ = true; - } break; + } case opcode::OP_waittillmatch: { auto args = std::make_unique(loc); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); - auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); - loc = expr.as_node->loc(); + auto event = ast::expr(std::move(stack_.top())); stack_.pop(); + loc = event.as_node->loc(); for (auto i = std::stoul(inst->data[0]); i > 0; i--) { @@ -1278,69 +1275,68 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) args->list.push_back(std::move(node)); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(expr), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_clearparams: { if (in_waittill_) { auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); - stack_.pop(); + auto node = std::move(stack_.top()); stack_.pop(); - while (var->kind() != ast::kind::stmt_waittill) + while (node->kind() != ast::kind::stmt_waittill) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); } - if (var->kind() == ast::kind::stmt_waittill) + if (node->kind() == ast::kind::stmt_waittill) { std::reverse(args->list.begin(), args->list.end()); - (*(ast::stmt_waittill::ptr*)&var)->args = std::move(args); + (*(ast::stmt_waittill::ptr*)&node)->args = std::move(args); in_waittill_ = false; } - func_->stmt->list.push_back(ast::stmt(std::move(var))); + func_->stmt->list.push_back(ast::stmt(std::move(node))); } - } break; + } case opcode::OP_notify: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + auto node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); - while (var->kind() != ast::kind::asm_voidcodepos) + while (node->kind() != ast::kind::asm_voidcodepos) { - args->list.push_back(std::move(var)); - var = std::move(stack_.top()); stack_.pop(); - loc = var->loc(); + args->list.push_back(std::move(node)); + node = std::move(stack_.top()); stack_.pop(); + loc = node->loc(); } - auto stmt = std::make_unique(loc, std::move(obj), std::move(event), std::move(args)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event), std::move(args))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endon: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto event = ast::expr(std::move(stack_.top())); stack_.pop(); loc = event.as_node->loc(); - auto stmt = std::make_unique(loc, std::move(obj), std::move(event)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(obj), std::move(event))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_voidCodepos: { auto node = std::make_unique(loc); stack_.push(std::move(node)); - } break; + } case opcode::OP_vector: { auto x = ast::expr(std::move(stack_.top())); stack_.pop(); @@ -1349,98 +1345,100 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = z.as_node->loc(); auto node = std::make_unique(loc, std::move(x), std::move(y), std::move(z)); stack_.push(std::move(node)); - } break; + } case opcode::OP_size: { auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalLevelFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalAnimFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalSelfFieldVariableRef: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_EvalFieldVariableRef: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); auto field = std::make_unique(loc, inst->data[0]); - auto stmt = std::make_unique(loc, std::move(obj), std::move(field)); - stack_.push(std::move(stmt)); - } + auto node = std::make_unique(loc, std::move(obj), std::move(field)); + stack_.push(std::move(node)); break; + } case opcode::OP_ClearFieldVariable: { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - auto field = std::make_unique(loc, inst->data[0]); - auto expr = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); + auto name = std::make_unique(loc, inst->data[0]); + auto field = ast::expr(std::make_unique(loc, std::move(obj), std::move(name))); auto undef = ast::expr(std::make_unique(loc)); - auto e = ast::expr(std::make_unique(loc, std::move(expr), std::move(undef))); - func_->stmt->list.push_back(ast::stmt(std::make_unique(loc, std::move(e)))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(field), std::move(undef))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SafeCreateVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetWaittillVariableFieldCached: { if (stack_.top()->kind() != ast::kind::asm_create) @@ -1448,256 +1446,243 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); } - } break; + } case opcode::OP_SafeSetVariableFieldCached0: { - func_->params->list.push_back(std::make_unique(loc, "var_0")); - } + auto expr = std::make_unique(loc, "var_0"); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_SafeSetVariableFieldCached: { - func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[0])); - } + auto expr = std::make_unique(loc, "var_" + inst->data[0]); + func_->params->list.push_back(std::move(expr)); break; + } case opcode::OP_EvalLocalVariableRefCached0: { auto node = std::make_unique(loc, "0"); stack_.push(std::move(node)); - } break; + } case opcode::OP_EvalLocalVariableRefCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_SetLevelFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetVariableField: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); if (lvalue.as_node->kind() == ast::kind::expr_increment) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else if (lvalue.as_node->kind() == ast::kind::expr_decrement) { - auto stmt = std::make_unique(loc, std::move(lvalue)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue))); + func_->stmt->list.push_back(std::move(stmt)); } else { - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); } - } break; + } case opcode::OP_SetAnimFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetSelfFieldVariableField: { auto obj = ast::expr(std::make_unique(loc)); auto field = std::make_unique(loc, inst->data[0]); auto lvalue = ast::expr(std::make_unique(loc, std::move(obj), std::move(field))); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, "0")); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetNewLocalVariableFieldCached0: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); if (func_->stmt->list.size() > 0) { - std::vector creates; + std::vector vars; while (func_->stmt->list.back().as_node->kind() == ast::kind::asm_create) { auto& entry = func_->stmt->list.back(); if (loc.begin.line < entry.as_node->loc().begin.line) { - creates.push_back(entry.as_asm_create->index); + vars.push_back(entry.as_asm_create->index); func_->stmt->list.pop_back(); continue; } break; } - std::reverse(creates.begin(), creates.end()); - lvalue.as_asm_create->vars = creates; + std::reverse(vars.begin(), vars.end()); + lvalue.as_asm_create->vars = vars; } - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_SetLocalVariableFieldCached: { auto lvalue = ast::expr(std::make_unique(loc, inst->data[0])); - auto rvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto rvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = rvalue.as_node->loc(); - auto e = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); - auto stmt = std::make_unique(loc, std::move(e)); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue), std::move(rvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr))); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached: { - auto stmt = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_ClearLocalVariableFieldCached0: { - auto stmt = std::make_unique(loc, "0"); - func_->stmt->list.push_back(ast::stmt(std::move(stmt))); - } + auto stmt = ast::stmt(std::make_unique(loc, "0")); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_EvalLocalVariableObjectCached: { auto node = std::make_unique(loc, inst->data[0]); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNot: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_BoolComplement: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue)); - stack_.push(std::move(expr)); - } + auto node = std::make_unique(loc, std::move(lvalue)); + stack_.push(std::move(node)); break; + } case opcode::OP_switch: { - auto expr = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); loc = expr.as_node->loc(); - auto sw = std::make_unique(loc, std::move(expr), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(sw))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_endswitch: { auto count = inst->data[0]; inst->data.erase(inst->data.begin()); auto data = inst->data; - auto end = std::make_unique(loc, data, count); - func_->stmt->list.push_back(ast::stmt(std::move(end))); - } + auto stmt = ast::stmt(std::make_unique(loc, data, count)); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_jump: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); if (stack_.size() != 0) tern_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_jumpback: { - auto expr = std::make_unique(loc, inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrue: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto e_not = ast::expr(std::make_unique(loc, std::move(lvalue))); - auto expr = std::make_unique(loc, std::move(e_not), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto expr = ast::expr(std::make_unique(loc, std::move(lvalue))); + auto stmt = ast::stmt(std::make_unique(loc, std::move(expr), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnFalse: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - func_->stmt->list.push_back(ast::stmt(std::move(expr))); - } + auto stmt = ast::stmt(std::make_unique(loc, std::move(lvalue), inst->data[0])); + func_->stmt->list.push_back(std::move(stmt)); break; + } case opcode::OP_JumpOnTrueExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_JumpOnFalseExpr: { - auto lvalue = ast::expr(std::move(stack_.top())); - stack_.pop(); + auto lvalue = ast::expr(std::move(stack_.top())); stack_.pop(); loc = lvalue.as_node->loc(); - auto expr = std::make_unique(loc, std::move(lvalue), inst->data[0]); - stack_.push(std::move(expr)); + auto node = std::make_unique(loc, std::move(lvalue), inst->data[0]); + stack_.push(std::move(node)); expr_labels_.push_back(inst->data[0]); - } break; + } case opcode::OP_FormalParams: { auto count = std::stoi(inst->data[0]); @@ -1706,29 +1691,29 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { func_->params->list.push_back(std::make_unique(loc, "var_" + inst->data[i])); } - } break; + } case opcode::OP_IsDefined: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_IsTrue: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_BoolNotAfterAnd: { auto expr = ast::expr(std::move(stack_.top())); stack_.pop(); auto node = std::make_unique(expr.loc(), std::move(expr)); stack_.push(std::move(node)); - } break; + } case opcode::OP_waittillmatch2: case opcode::OP_checkclearparams: case opcode::OP_CastFieldObject: @@ -1748,7 +1733,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) if (itr == labels_.end()) return; - for (auto& expr : expr_labels_) + for (const auto& expr : expr_labels_) { if (expr == itr->second) { @@ -1775,7 +1760,7 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) } } - for (auto& tern : tern_labels_) + for (const auto& tern : tern_labels_) { if (tern == itr->second) { @@ -1802,7 +1787,6 @@ void decompiler::decompile_expressions(const instruction::ptr& inst) void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) { - decompile_infinites(stmt); decompile_loops(stmt); decompile_switches(stmt); decompile_ifelses(stmt); @@ -1810,9 +1794,10 @@ void decompiler::decompile_statements(const ast::stmt_list::ptr& stmt) decompile_tuples(stmt); } -void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) +void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) { - if (stmt->list.size() == 0) return; + if (stmt->list.size() == 0) + return; for (auto i = static_cast(stmt->list.size() - 1); i >= 0; i--) { @@ -1823,60 +1808,38 @@ void decompiler::decompile_infinites(const ast::stmt_list::ptr& stmt) if (i > 0 && stmt->list.at(i - 1).as_node->kind() == ast::kind::asm_jump_cond) { - if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->loc().label())) + if (i - 1 == static_cast(start)) // condition belongs to empty loop { - continue; // do-while + decompile_while(stmt, start, i); + i = static_cast(stmt->list.size()); + continue; + } + else if (static_cast(i) < find_location_index(stmt, stmt->list.at(i - 1).as_cond->value)) + { + decompile_dowhile(stmt, i - 1, i); + i = static_cast(stmt->list.size()); + continue; } - // empty if at loop end } - if (i == static_cast(start)) // empty loop + if (i == static_cast(start)) // empty inf loop { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) + else if (stmt->list.at(start).as_node->kind() != ast::kind::asm_jump_cond) // no condition { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value != break_loc) // cond belong to other stmt + else if (stmt->list.at(start).as_cond->value != break_loc) // condition belong to other stmt { - decompile_infinite(stmt, start, i); - i = static_cast(stmt->list.size()); + decompile_inf(stmt, start, i); } - else if (stmt->list.at(start).as_cond->value == break_loc) // not inf + else // condition belong to loop { decompile_loop(stmt, start, i); - i = static_cast(stmt->list.size()); } - } - } -} -void decompiler::decompile_loops(const ast::stmt_list::ptr& stmt) -{ - for (auto i = 0u; i < stmt->list.size(); i++) - { - auto& entry = stmt->list.at(i); - - if (entry == ast::kind::asm_jump_cond) - { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); - - if (stmt->list.at(j) == ast::kind::asm_jump_back) - { - if (j == i + 1) - { - decompile_dowhile(stmt, i, j); - i = 0; - } - else if (stmt->list.at(i).loc().label() == stmt->list.at(j).as_jump_back->value) - { - decompile_loop(stmt, i, j); - i = 0; - } - } + i = static_cast(stmt->list.size()); } } } @@ -2006,7 +1969,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) } else { - decompile_last_ifelse(stmt, i, j); // special case + decompile_ifelse_end(stmt, i, j); // special case } } else @@ -2040,7 +2003,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) } else { - printf("WARNING: unresolved jump to '%s', maybe incomplete for loop\n", jump_loc.data()); + std::cout << "WARNING: unresolved jump to '" + jump_loc + "', maybe incomplete for loop\n"; } } } @@ -2057,7 +2020,7 @@ void decompiler::decompile_tuples(const ast::stmt_list::ptr& block) while (j >= 0 && block->list.at(j) == ast::kind::stmt_assign) { - auto& expr = block->list.at(j).as_assign->expr; + const auto& expr = block->list.at(j).as_assign->expr; if (expr != ast::kind::expr_assign_equal) break; @@ -2186,7 +2149,7 @@ void decompiler::decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t b stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } -void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block if_blk; if_blk.is_last = true; @@ -2246,7 +2209,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::siz } } -void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) +void decompiler::decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end) { block blk; blk.loc_break = last_location_index(stmt, end) ? blocks_.back().loc_end : stmt->list.at(end + 1).loc().label(); @@ -2278,7 +2241,7 @@ void decompiler::decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::size_t start, std::size_t end) { - auto& last = block->list.at(end - 1); + const auto& last = block->list.at(end - 1); if (last == ast::kind::stmt_assign) { @@ -2409,17 +2372,17 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 1).loc(); auto test = std::move(stmt->list.at(begin).as_cond->expr); @@ -2452,7 +2415,7 @@ void decompiler::decompile_for(const ast::stmt_list::ptr& stmt, std::size_t begi blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, std::move(init), std::move(test), std::move(iter), ast::stmt(std::move(for_stmt)))); - new_stmt.as_for->vars = creates; + new_stmt.as_for->vars = vars; stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); } @@ -2463,17 +2426,17 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blk.loc_end = stmt->list.at(end - 1).loc().label(); blk.loc_continue = stmt->list.at(end - 1).loc().label(); - // remove var_create instructions - std::vector creates; + // collect local vars + std::vector vars; while (stmt->list.at(begin - 1) == ast::kind::asm_create) { - creates.push_back(stmt->list.at(begin - 1).as_asm_create->index); + vars.push_back(stmt->list.at(begin - 1).as_asm_create->index); stmt->list.erase(stmt->list.begin() + begin - 1); begin--; end--; } - std::reverse(creates.begin(), creates.end()); + std::reverse(vars.begin(), vars.end()); auto loc = stmt->list.at(begin - 2).loc(); @@ -2517,7 +2480,7 @@ void decompiler::decompile_foreach(const ast::stmt_list::ptr& stmt, std::size_t blocks_.pop_back(); auto new_stmt = ast::stmt(std::make_unique(loc, ast::stmt(std::move(foreach_stmt)), use_key)); - new_stmt.as_foreach->vars = creates; + new_stmt.as_foreach->vars = vars; new_stmt.as_foreach->pre_expr = std::move(init); new_stmt.as_foreach->stmt0 = std::move(stmt0); stmt->list.insert(stmt->list.begin() + begin, std::move(new_stmt)); @@ -2669,7 +2632,7 @@ auto decompiler::find_location_index(const ast::stmt_list::ptr& stmt, const std: if (location == blocks_.back().loc_end) return stmt->list.size(); - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry.loc().label() == location) return index; @@ -2773,8 +2736,8 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } break; + } default: break; } @@ -3018,7 +2981,7 @@ void decompiler::process_stmt_for(const ast::stmt_for::ptr& stmt, const block::p { process_stmt(stmt->init, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var, static_cast(std::stoi(index)), true }); @@ -3047,7 +3010,7 @@ void decompiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const { process_stmt(stmt->pre_expr, blk); - for (auto& index : stmt->vars) + for (const auto& index : stmt->vars) { auto var1 = utils::string::va("var_%d", std::stoi(index)); blk->local_vars.push_back({ var1, static_cast(std::stoi(index)), true }); @@ -3087,7 +3050,7 @@ void decompiler::process_stmt_cases(const ast::stmt_list::ptr& stmt, const block std::vector childs; bool has_default = false; - for (auto& entry : stmt->list) + for (const auto& entry : stmt->list) { if (entry == ast::kind::stmt_case) { @@ -3215,9 +3178,6 @@ void decompiler::process_expr(ast::expr& expr, const block::ptr& blk) case ast::kind::expr_field: process_expr_field(expr.as_field, blk); break; - case ast::kind::expr_identifier: - process_expr_local(expr.as_identifier, blk); - break; case ast::kind::expr_vector: process_expr_vector(expr.as_vector, blk); break; @@ -3466,11 +3426,6 @@ void decompiler::process_expr_field(const ast::expr_field::ptr& expr, const bloc process_expr(expr->obj, blk); } -void decompiler::process_expr_local(const ast::expr_identifier::ptr&, const block::ptr&) -{ - return; -} - void decompiler::process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk) { process_expr(vec->z, blk); @@ -3488,7 +3443,7 @@ void decompiler::process_var_create(ast::expr& expr, const block::ptr& blk, bool } else { - for (auto& entry : expr.as_asm_create->vars) + for (const auto& entry : expr.as_asm_create->vars) { blk->local_vars.push_back({ utils::string::va("var_%d", std::stoi(entry)), static_cast(std::stoi(entry)), true }); blk->local_vars_create_count++; @@ -3506,7 +3461,7 @@ void decompiler::process_var_access(ast::expr& expr, const block::ptr& blk) { if (blk->local_vars.size() <= std::stoul(expr.as_asm_access->index)) { - printf("WARNING: bad local var access\n"); + std::cout << "WARNING: bad local var access\n"; } else { diff --git a/src/s4/xsk/decompiler.hpp b/src/s4/xsk/decompiler.hpp index 74068e0f..566c60b4 100644 --- a/src/s4/xsk/decompiler.hpp +++ b/src/s4/xsk/decompiler.hpp @@ -29,7 +29,6 @@ private: void decompile_instruction(const instruction::ptr& inst); void decompile_expressions(const instruction::ptr& inst); void decompile_statements(const ast::stmt_list::ptr& stmt); - void decompile_infinites(const ast::stmt_list::ptr& stmt); void decompile_loops(const ast::stmt_list::ptr& stmt); void decompile_switches(const ast::stmt_list::ptr& stmt); void decompile_ifelses(const ast::stmt_list::ptr& stmt); @@ -37,8 +36,8 @@ private: void decompile_tuples(const ast::stmt_list::ptr& stmt); void decompile_if(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); - void decompile_infinite(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_ifelse_end(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); + void decompile_inf(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_loop(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_while(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); void decompile_dowhile(const ast::stmt_list::ptr& stmt, std::size_t begin, std::size_t end); @@ -93,7 +92,6 @@ private: void process_expr_tuple(const ast::expr_tuple::ptr& expr, const block::ptr& blk); void process_expr_array(const ast::expr_array::ptr& expr, const block::ptr& blk); void process_expr_field(const ast::expr_field::ptr& expr, const block::ptr& blk); - void process_expr_local(const ast::expr_identifier::ptr& expr, const block::ptr& blk); void process_expr_vector(const ast::expr_vector::ptr& vec, const block::ptr& blk); void process_var_create(ast::expr& expr, const block::ptr& blk, bool fromstmt = false); void process_var_access(ast::expr& expr, const block::ptr& blk); diff --git a/src/s4/xsk/disassembler.cpp b/src/s4/xsk/disassembler.cpp index 5b8e1ef5..d03d19a8 100644 --- a/src/s4/xsk/disassembler.cpp +++ b/src/s4/xsk/disassembler.cpp @@ -352,7 +352,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) disassemble_far_call(inst, true); break;*/ default: - throw disasm_error(utils::string::va("Unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); + throw disasm_error(utils::string::va("unhandled opcode 0x%X at index '%04X'!", inst->opcode, inst->index)); } } @@ -559,7 +559,7 @@ auto disassembler::resolve_function(const std::string& index) -> std::string } } - throw disasm_error(utils::string::va("Couldn't resolve function name at index '0x%04X'!", idx)); + throw disasm_error(utils::string::va("couldn't resolve function name at index '0x%04X'!", idx)); } throw disasm_error(utils::string::va("\"%s\" is not valid function address!", index.data())); @@ -582,7 +582,6 @@ void disassembler::print_function(const function::ptr& func) print_instruction(inst); } - output_->write_string("\n"); output_->write_string(utils::string::va("end_%s\n", func->name.substr(4).data())); } diff --git a/src/s4/xsk/lexer.cpp b/src/s4/xsk/lexer.cpp index 8a2e03c2..4af77a3a 100644 --- a/src/s4/xsk/lexer.cpp +++ b/src/s4/xsk/lexer.cpp @@ -696,7 +696,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -730,7 +730,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -764,7 +764,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(utils::string::hex_to_dec(buffer_.data), loc_); } throw error("UNEXPECTED LEXER INTERNAL ERROR!"); diff --git a/src/s4/xsk/parser.cpp b/src/s4/xsk/parser.cpp index 41da7326..32ff7eb5 100644 --- a/src/s4/xsk/parser.cpp +++ b/src/s4/xsk/parser.cpp @@ -244,6 +244,8 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.YY_MOVE_OR_COPY< ast::expr > (YY_MOVE (that.value)); break; @@ -374,6 +376,10 @@ namespace xsk { namespace gsc { namespace s4 { value.YY_MOVE_OR_COPY< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.YY_MOVE_OR_COPY< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.YY_MOVE_OR_COPY< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -558,6 +564,8 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (that.value)); break; @@ -688,6 +696,10 @@ namespace xsk { namespace gsc { namespace s4 { value.move< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -872,6 +884,8 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (that.value); break; @@ -1002,6 +1016,10 @@ namespace xsk { namespace gsc { namespace s4 { value.copy< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (that.value); break; @@ -1185,6 +1203,8 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (that.value); break; @@ -1315,6 +1335,10 @@ namespace xsk { namespace gsc { namespace s4 { value.move< ast::expr_true::ptr > (that.value); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (that.value); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (that.value); break; @@ -1753,6 +1777,8 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object yylhs.value.emplace< ast::expr > (); break; @@ -1883,6 +1909,10 @@ namespace xsk { namespace gsc { namespace s4 { yylhs.value.emplace< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + yylhs.value.emplace< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined yylhs.value.emplace< ast::expr_undefined::ptr > (); break; @@ -2044,1375 +2074,1417 @@ namespace xsk { namespace gsc { namespace s4 { switch (yyn) { case 2: // root: program -#line 264 "parser.ypp" +#line 267 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2050 "parser.cpp" - break; - - case 3: // root: %empty -#line 265 "parser.ypp" - { ast = std::make_unique(yylhs.location); } -#line 2056 "parser.cpp" - break; - - case 4: // program: program inline -#line 270 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2062 "parser.cpp" - break; - - case 5: // program: program include -#line 272 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } -#line 2068 "parser.cpp" - break; - - case 6: // program: program declaration -#line 274 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } -#line 2074 "parser.cpp" - break; - - case 7: // program: inline -#line 276 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2080 "parser.cpp" break; - case 8: // program: include -#line 278 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } + case 3: // root: %empty +#line 268 "parser.ypp" + { ast = std::make_unique(yylhs.location); } #line 2086 "parser.cpp" break; - case 9: // program: declaration -#line 280 "parser.ypp" - { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } + case 4: // program: program inline +#line 273 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2092 "parser.cpp" break; - case 10: // inline: "#inline" expr_path ";" -#line 284 "parser.ypp" - { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } + case 5: // program: program include +#line 275 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2098 "parser.cpp" break; - case 11: // include: "#include" expr_path ";" -#line 289 "parser.ypp" - { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } + case 6: // program: program declaration +#line 277 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2104 "parser.cpp" break; - case 12: // declaration: "/#" -#line 293 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } + case 7: // program: inline +#line 279 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2110 "parser.cpp" break; - case 13: // declaration: "#/" -#line 294 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } + case 8: // program: include +#line 281 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->includes.push_back(std::move(yystack_[0].value.as < ast::include::ptr > ())); } #line 2116 "parser.cpp" break; - case 14: // declaration: decl_usingtree -#line 295 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } + case 9: // program: declaration +#line 283 "parser.ypp" + { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::program::ptr > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2122 "parser.cpp" break; - case 15: // declaration: decl_constant -#line 296 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } + case 10: // inline: "#inline" expr_path ";" +#line 287 "parser.ypp" + { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2128 "parser.cpp" break; - case 16: // declaration: decl_thread -#line 297 "parser.ypp" - { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } + case 11: // include: "#include" expr_path ";" +#line 292 "parser.ypp" + { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2134 "parser.cpp" break; - case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 302 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } + case 12: // declaration: "/#" +#line 296 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2140 "parser.cpp" break; - case 18: // decl_constant: expr_identifier "=" expr ";" -#line 307 "parser.ypp" - { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 13: // declaration: "#/" +#line 297 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2146 "parser.cpp" break; - case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 312 "parser.ypp" - { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 14: // declaration: decl_usingtree +#line 298 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2152 "parser.cpp" break; - case 20: // stmt: stmt_block -#line 316 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } + case 15: // declaration: decl_constant +#line 299 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2158 "parser.cpp" break; - case 21: // stmt: stmt_call -#line 317 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } + case 16: // declaration: decl_thread +#line 300 "parser.ypp" + { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2164 "parser.cpp" break; - case 22: // stmt: stmt_assign -#line 318 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } + case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" +#line 305 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_usingtree::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_string::ptr > ())); } #line 2170 "parser.cpp" break; - case 23: // stmt: stmt_endon -#line 319 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } + case 18: // decl_constant: expr_identifier "=" expr ";" +#line 310 "parser.ypp" + { yylhs.value.as < ast::decl_constant::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 2176 "parser.cpp" break; - case 24: // stmt: stmt_notify -#line 320 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } + case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block +#line 315 "parser.ypp" + { lexer.ban_header(yylhs.location); yylhs.value.as < ast::decl_thread::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2182 "parser.cpp" break; - case 25: // stmt: stmt_wait -#line 321 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } + case 20: // stmt: stmt_block +#line 319 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2188 "parser.cpp" break; - case 26: // stmt: stmt_waittill -#line 322 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } + case 21: // stmt: stmt_call +#line 320 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2194 "parser.cpp" break; - case 27: // stmt: stmt_waittillmatch -#line 323 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } + case 22: // stmt: stmt_assign +#line 321 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2200 "parser.cpp" break; - case 28: // stmt: stmt_waittillframeend -#line 324 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } + case 23: // stmt: stmt_endon +#line 322 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2206 "parser.cpp" break; - case 29: // stmt: stmt_waitframe -#line 325 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } + case 24: // stmt: stmt_notify +#line 323 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2212 "parser.cpp" break; - case 30: // stmt: stmt_if -#line 326 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } + case 25: // stmt: stmt_wait +#line 324 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2218 "parser.cpp" break; - case 31: // stmt: stmt_ifelse -#line 327 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } + case 26: // stmt: stmt_waittill +#line 325 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2224 "parser.cpp" break; - case 32: // stmt: stmt_while -#line 328 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } + case 27: // stmt: stmt_waittillmatch +#line 326 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2230 "parser.cpp" break; - case 33: // stmt: stmt_dowhile -#line 329 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } + case 28: // stmt: stmt_waittillframeend +#line 327 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2236 "parser.cpp" break; - case 34: // stmt: stmt_for -#line 330 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } + case 29: // stmt: stmt_waitframe +#line 328 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2242 "parser.cpp" break; - case 35: // stmt: stmt_foreach -#line 331 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } + case 30: // stmt: stmt_if +#line 329 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2248 "parser.cpp" break; - case 36: // stmt: stmt_switch -#line 332 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } + case 31: // stmt: stmt_ifelse +#line 330 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2254 "parser.cpp" break; - case 37: // stmt: stmt_case -#line 333 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } + case 32: // stmt: stmt_while +#line 331 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2260 "parser.cpp" break; - case 38: // stmt: stmt_default -#line 334 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } + case 33: // stmt: stmt_dowhile +#line 332 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2266 "parser.cpp" break; - case 39: // stmt: stmt_break -#line 335 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } + case 34: // stmt: stmt_for +#line 333 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2272 "parser.cpp" break; - case 40: // stmt: stmt_continue -#line 336 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } + case 35: // stmt: stmt_foreach +#line 334 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2278 "parser.cpp" break; - case 41: // stmt: stmt_return -#line 337 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } + case 36: // stmt: stmt_switch +#line 335 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2284 "parser.cpp" break; - case 42: // stmt: stmt_breakpoint -#line 338 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } + case 37: // stmt: stmt_case +#line 336 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2290 "parser.cpp" break; - case 43: // stmt: stmt_prof_begin -#line 339 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } + case 38: // stmt: stmt_default +#line 337 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2296 "parser.cpp" break; - case 44: // stmt: stmt_prof_end -#line 340 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } + case 39: // stmt: stmt_break +#line 338 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2302 "parser.cpp" break; - case 45: // stmt_or_dev: stmt -#line 344 "parser.ypp" - { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } + case 40: // stmt: stmt_continue +#line 339 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2308 "parser.cpp" break; - case 46: // stmt_or_dev: stmt_dev -#line 345 "parser.ypp" - { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } + case 41: // stmt: stmt_return +#line 340 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2314 "parser.cpp" break; - case 47: // stmt_list: stmt_list stmt -#line 350 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 42: // stmt: stmt_breakpoint +#line 341 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2320 "parser.cpp" break; - case 48: // stmt_list: stmt -#line 352 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 43: // stmt: stmt_prof_begin +#line 342 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2326 "parser.cpp" break; - case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev -#line 357 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 44: // stmt: stmt_prof_end +#line 343 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2332 "parser.cpp" break; - case 50: // stmt_or_dev_list: stmt_or_dev -#line 359 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } + case 45: // stmt_or_dev: stmt +#line 347 "parser.ypp" + { yylhs.value.as < ast::stmt > () = std::move(yystack_[0].value.as < ast::stmt > ()); } #line 2338 "parser.cpp" break; - case 51: // stmt_dev: "/#" stmt_list "#/" -#line 363 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } + case 46: // stmt_or_dev: stmt_dev +#line 348 "parser.ypp" + { yylhs.value.as < ast::stmt > ().as_dev = std::move(yystack_[0].value.as < ast::stmt_dev::ptr > ()); } #line 2344 "parser.cpp" break; - case 52: // stmt_dev: "/#" "#/" -#line 364 "parser.ypp" - { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 47: // stmt_list: stmt_list stmt +#line 353 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2350 "parser.cpp" break; - case 53: // stmt_block: "{" stmt_or_dev_list "}" -#line 368 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } + case 48: // stmt_list: stmt +#line 355 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2356 "parser.cpp" break; - case 54: // stmt_block: "{" "}" -#line 369 "parser.ypp" - { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } + case 49: // stmt_or_dev_list: stmt_or_dev_list stmt_or_dev +#line 360 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2362 "parser.cpp" break; - case 55: // stmt_expr: expr_assign -#line 374 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 50: // stmt_or_dev_list: stmt_or_dev +#line 362 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::stmt_list::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2368 "parser.cpp" break; - case 56: // stmt_expr: expr_increment -#line 376 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 51: // stmt_dev: "/#" stmt_list "#/" +#line 366 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::stmt_list::ptr > ())); } #line 2374 "parser.cpp" break; - case 57: // stmt_expr: expr_decrement -#line 378 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 52: // stmt_dev: "/#" "#/" +#line 367 "parser.ypp" + { yylhs.value.as < ast::stmt_dev::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2380 "parser.cpp" break; - case 58: // stmt_expr: %empty -#line 380 "parser.ypp" - { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 53: // stmt_block: "{" stmt_or_dev_list "}" +#line 371 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2386 "parser.cpp" break; - case 59: // stmt_call: expr_call ";" -#line 385 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } + case 54: // stmt_block: "{" "}" +#line 372 "parser.ypp" + { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2392 "parser.cpp" break; - case 60: // stmt_call: expr_method ";" -#line 387 "parser.ypp" - { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } + case 55: // stmt_expr: expr_assign +#line 377 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2398 "parser.cpp" break; - case 61: // stmt_assign: expr_assign ";" -#line 392 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 56: // stmt_expr: expr_increment +#line 379 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2404 "parser.cpp" break; - case 62: // stmt_assign: expr_increment ";" -#line 394 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 57: // stmt_expr: expr_decrement +#line 381 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2410 "parser.cpp" break; - case 63: // stmt_assign: expr_decrement ";" -#line 396 "parser.ypp" - { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 58: // stmt_expr: %empty +#line 383 "parser.ypp" + { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2416 "parser.cpp" break; - case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 401 "parser.ypp" - { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } + case 59: // stmt_call: expr_call ";" +#line 388 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_call::ptr > ()))); } #line 2422 "parser.cpp" break; - case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 406 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 60: // stmt_call: expr_method ";" +#line 390 "parser.ypp" + { yylhs.value.as < ast::stmt_call::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_method::ptr > ()))); } #line 2428 "parser.cpp" break; - case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 408 "parser.ypp" - { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 61: // stmt_assign: expr_assign ";" +#line 395 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2434 "parser.cpp" break; - case 67: // stmt_wait: "wait" expr ";" -#line 413 "parser.ypp" - { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 62: // stmt_assign: expr_increment ";" +#line 397 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2440 "parser.cpp" break; - case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 418 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 63: // stmt_assign: expr_decrement ";" +#line 399 "parser.ypp" + { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2446 "parser.cpp" break; - case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 420 "parser.ypp" - { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 64: // stmt_endon: expr_object "endon" "(" expr ")" ";" +#line 404 "parser.ypp" + { yylhs.value.as < ast::stmt_endon::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ())); } #line 2452 "parser.cpp" break; - case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 425 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 65: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" +#line 409 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2458 "parser.cpp" break; - case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 427 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } + case 66: // stmt_notify: expr_object "notify" "(" expr ")" ";" +#line 411 "parser.ypp" + { yylhs.value.as < ast::stmt_notify::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2464 "parser.cpp" break; - case 72: // stmt_waittillframeend: "waittillframeend" ";" -#line 432 "parser.ypp" - { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } + case 67: // stmt_wait: "wait" expr ";" +#line 416 "parser.ypp" + { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2470 "parser.cpp" break; - case 73: // stmt_waitframe: "waitframe" ";" -#line 437 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 68: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" +#line 421 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2476 "parser.cpp" break; - case 74: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 439 "parser.ypp" - { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } + case 69: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" +#line 423 "parser.ypp" + { yylhs.value.as < ast::stmt_waittill::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2482 "parser.cpp" break; - case 75: // stmt_if: "if" "(" expr ")" stmt -#line 444 "parser.ypp" - { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 70: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" +#line 428 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[7].value.as < ast::expr > ()), std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2488 "parser.cpp" break; - case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 449 "parser.ypp" - { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 71: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" +#line 430 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillmatch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; - case 77: // stmt_while: "while" "(" expr ")" stmt -#line 454 "parser.ypp" - { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 72: // stmt_waittillframeend: "waittillframeend" ";" +#line 435 "parser.ypp" + { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2500 "parser.cpp" break; - case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 459 "parser.ypp" - { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } + case 73: // stmt_waitframe: "waitframe" ";" +#line 440 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2506 "parser.cpp" break; - case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 464 "parser.ypp" - { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 74: // stmt_waitframe: "waitframe" "(" ")" ";" +#line 442 "parser.ypp" + { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2512 "parser.cpp" break; - case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 469 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 75: // stmt_if: "if" "(" expr ")" stmt +#line 447 "parser.ypp" + { yylhs.value.as < ast::stmt_if::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2518 "parser.cpp" break; - case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 471 "parser.ypp" - { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } + case 76: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt +#line 452 "parser.ypp" + { yylhs.value.as < ast::stmt_ifelse::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::stmt > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2524 "parser.cpp" break; - case 82: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 476 "parser.ypp" - { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } + case 77: // stmt_while: "while" "(" expr ")" stmt +#line 457 "parser.ypp" + { yylhs.value.as < ast::stmt_while::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2530 "parser.cpp" break; - case 83: // stmt_case: "case" expr_integer ":" -#line 481 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } + case 78: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" +#line 462 "parser.ypp" + { yylhs.value.as < ast::stmt_dowhile::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[5].value.as < ast::stmt > ())); } #line 2536 "parser.cpp" break; - case 84: // stmt_case: "case" expr_string ":" -#line 483 "parser.ypp" - { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } + case 79: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt +#line 467 "parser.ypp" + { yylhs.value.as < ast::stmt_for::ptr > () = std::make_unique(yylhs.location, ast::stmt(std::move(yystack_[6].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[4].value.as < ast::expr > ()), ast::stmt(std::move(yystack_[2].value.as < ast::stmt_expr::ptr > ())), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2542 "parser.cpp" break; - case 85: // stmt_default: "default" ":" -#line 488 "parser.ypp" - { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 80: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt +#line 472 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2548 "parser.cpp" break; - case 86: // stmt_break: "break" ";" -#line 493 "parser.ypp" - { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } + case 81: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt +#line 474 "parser.ypp" + { yylhs.value.as < ast::stmt_foreach::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[6].value.as < ast::expr_identifier::ptr > ())), ast::expr(std::move(yystack_[4].value.as < ast::expr_identifier::ptr > ())), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt > ())); } #line 2554 "parser.cpp" break; - case 87: // stmt_continue: "continue" ";" -#line 498 "parser.ypp" - { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } + case 82: // stmt_switch: "switch" "(" expr ")" stmt_block +#line 479 "parser.ypp" + { yylhs.value.as < ast::stmt_switch::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::stmt_list::ptr > ())); } #line 2560 "parser.cpp" break; - case 88: // stmt_return: "return" expr ";" -#line 503 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 83: // stmt_case: "case" expr_integer ":" +#line 484 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_integer::ptr > ())), std::make_unique(yylhs.location)); } #line 2566 "parser.cpp" break; - case 89: // stmt_return: "return" ";" -#line 505 "parser.ypp" - { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } + case 84: // stmt_case: "case" expr_string ":" +#line 486 "parser.ypp" + { yylhs.value.as < ast::stmt_case::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[1].value.as < ast::expr_string::ptr > ())), std::make_unique(yylhs.location)); } #line 2572 "parser.cpp" break; - case 90: // stmt_breakpoint: "breakpoint" ";" -#line 510 "parser.ypp" - { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } + case 85: // stmt_default: "default" ":" +#line 491 "parser.ypp" + { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2578 "parser.cpp" break; - case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 515 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 86: // stmt_break: "break" ";" +#line 496 "parser.ypp" + { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2584 "parser.cpp" break; - case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 520 "parser.ypp" - { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } + case 87: // stmt_continue: "continue" ";" +#line 501 "parser.ypp" + { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2590 "parser.cpp" break; - case 93: // expr: expr_ternary -#line 524 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 88: // stmt_return: "return" expr ";" +#line 506 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2596 "parser.cpp" break; - case 94: // expr: expr_binary -#line 525 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 89: // stmt_return: "return" ";" +#line 508 "parser.ypp" + { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2602 "parser.cpp" break; - case 95: // expr: expr_primitive -#line 526 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 90: // stmt_breakpoint: "breakpoint" ";" +#line 513 "parser.ypp" + { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2608 "parser.cpp" break; - case 96: // expr_or_empty: expr -#line 530 "parser.ypp" - { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } + case 91: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" +#line 518 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_begin::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2614 "parser.cpp" break; - case 97: // expr_or_empty: %empty -#line 531 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } + case 92: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" +#line 523 "parser.ypp" + { yylhs.value.as < ast::stmt_prof_end::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ())); } #line 2620 "parser.cpp" break; - case 98: // expr_assign: expr_object "=" expr -#line 536 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 93: // expr: expr_ternary +#line 527 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2626 "parser.cpp" break; - case 99: // expr_assign: expr_object "|=" expr -#line 538 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 94: // expr: expr_binary +#line 528 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2632 "parser.cpp" break; - case 100: // expr_assign: expr_object "&=" expr -#line 540 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 95: // expr: expr_primitive +#line 529 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2638 "parser.cpp" break; - case 101: // expr_assign: expr_object "^=" expr -#line 542 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 96: // expr_or_empty: expr +#line 533 "parser.ypp" + { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2644 "parser.cpp" break; - case 102: // expr_assign: expr_object "<<=" expr -#line 544 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } + case 97: // expr_or_empty: %empty +#line 534 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2650 "parser.cpp" break; - case 103: // expr_assign: expr_object ">>=" expr -#line 546 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 98: // expr_assign: expr_tuple "=" expr +#line 539 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2656 "parser.cpp" break; - case 104: // expr_assign: expr_object "+=" expr -#line 548 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 99: // expr_assign: expr_object "=" expr +#line 541 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2662 "parser.cpp" break; - case 105: // expr_assign: expr_object "-=" expr -#line 550 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 100: // expr_assign: expr_object "|=" expr +#line 543 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2668 "parser.cpp" break; - case 106: // expr_assign: expr_object "*=" expr -#line 552 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 101: // expr_assign: expr_object "&=" expr +#line 545 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2674 "parser.cpp" break; - case 107: // expr_assign: expr_object "/=" expr -#line 554 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 102: // expr_assign: expr_object "^=" expr +#line 547 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2680 "parser.cpp" break; - case 108: // expr_assign: expr_object "%=" expr -#line 556 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 103: // expr_assign: expr_object "<<=" expr +#line 549 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2686 "parser.cpp" break; - case 109: // expr_increment: "++" expr_object -#line 561 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 104: // expr_assign: expr_object ">>=" expr +#line 551 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2692 "parser.cpp" break; - case 110: // expr_increment: expr_object "++" -#line 563 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 105: // expr_assign: expr_object "+=" expr +#line 553 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2698 "parser.cpp" break; - case 111: // expr_decrement: "--" expr_object -#line 568 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } + case 106: // expr_assign: expr_object "-=" expr +#line 555 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2704 "parser.cpp" break; - case 112: // expr_decrement: expr_object "--" -#line 570 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } + case 107: // expr_assign: expr_object "*=" expr +#line 557 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2710 "parser.cpp" break; - case 113: // expr_ternary: expr "?" expr ":" expr -#line 575 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 108: // expr_assign: expr_object "/=" expr +#line 559 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2716 "parser.cpp" break; - case 114: // expr_binary: expr "||" expr -#line 580 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 109: // expr_assign: expr_object "%=" expr +#line 561 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2722 "parser.cpp" break; - case 115: // expr_binary: expr "&&" expr -#line 582 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 110: // expr_increment: "++" expr_object +#line 566 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2728 "parser.cpp" break; - case 116: // expr_binary: expr "==" expr -#line 584 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 111: // expr_increment: expr_object "++" +#line 568 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2734 "parser.cpp" break; - case 117: // expr_binary: expr "!=" expr -#line 586 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 112: // expr_decrement: "--" expr_object +#line 573 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2740 "parser.cpp" break; - case 118: // expr_binary: expr "<=" expr -#line 588 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 113: // expr_decrement: expr_object "--" +#line 575 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2746 "parser.cpp" break; - case 119: // expr_binary: expr ">=" expr -#line 590 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 114: // expr_ternary: expr "?" expr ":" expr +#line 580 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[4].value.as < ast::expr > ()), std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2752 "parser.cpp" break; - case 120: // expr_binary: expr "<" expr -#line 592 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 115: // expr_binary: expr "||" expr +#line 585 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2758 "parser.cpp" break; - case 121: // expr_binary: expr ">" expr -#line 594 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 116: // expr_binary: expr "&&" expr +#line 587 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2764 "parser.cpp" break; - case 122: // expr_binary: expr "|" expr -#line 596 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 117: // expr_binary: expr "==" expr +#line 589 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2770 "parser.cpp" break; - case 123: // expr_binary: expr "&" expr -#line 598 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 118: // expr_binary: expr "!=" expr +#line 591 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2776 "parser.cpp" break; - case 124: // expr_binary: expr "^" expr -#line 600 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 119: // expr_binary: expr "<=" expr +#line 593 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2782 "parser.cpp" break; - case 125: // expr_binary: expr "<<" expr -#line 602 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 120: // expr_binary: expr ">=" expr +#line 595 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2788 "parser.cpp" break; - case 126: // expr_binary: expr ">>" expr -#line 604 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 121: // expr_binary: expr "<" expr +#line 597 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2794 "parser.cpp" break; - case 127: // expr_binary: expr "+" expr -#line 606 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 122: // expr_binary: expr ">" expr +#line 599 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2800 "parser.cpp" break; - case 128: // expr_binary: expr "-" expr -#line 608 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 123: // expr_binary: expr "|" expr +#line 601 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2806 "parser.cpp" break; - case 129: // expr_binary: expr "*" expr -#line 610 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 124: // expr_binary: expr "&" expr +#line 603 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2812 "parser.cpp" break; - case 130: // expr_binary: expr "/" expr -#line 612 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 125: // expr_binary: expr "^" expr +#line 605 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2818 "parser.cpp" break; - case 131: // expr_binary: expr "%" expr -#line 614 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } + case 126: // expr_binary: expr "<<" expr +#line 607 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2824 "parser.cpp" break; - case 132: // expr_primitive: expr_complement -#line 618 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } + case 127: // expr_binary: expr ">>" expr +#line 609 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2830 "parser.cpp" break; - case 133: // expr_primitive: expr_negate -#line 619 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } + case 128: // expr_binary: expr "+" expr +#line 611 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2836 "parser.cpp" break; - case 134: // expr_primitive: expr_not -#line 620 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } + case 129: // expr_binary: expr "-" expr +#line 613 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2842 "parser.cpp" break; - case 135: // expr_primitive: expr_call -#line 621 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 130: // expr_binary: expr "*" expr +#line 615 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2848 "parser.cpp" break; - case 136: // expr_primitive: expr_method -#line 622 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 131: // expr_binary: expr "/" expr +#line 617 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2854 "parser.cpp" break; - case 137: // expr_primitive: expr_add_array -#line 623 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } + case 132: // expr_binary: expr "%" expr +#line 619 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2860 "parser.cpp" break; - case 138: // expr_primitive: expr_isdefined -#line 624 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } + case 133: // expr_primitive: expr_complement +#line 623 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2866 "parser.cpp" break; - case 139: // expr_primitive: expr_istrue -#line 625 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } + case 134: // expr_primitive: expr_negate +#line 624 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_negate::ptr > ()); } #line 2872 "parser.cpp" break; - case 140: // expr_primitive: expr_reference -#line 626 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } + case 135: // expr_primitive: expr_not +#line 625 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2878 "parser.cpp" break; - case 141: // expr_primitive: expr_array -#line 627 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 136: // expr_primitive: expr_call +#line 626 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2884 "parser.cpp" break; - case 142: // expr_primitive: expr_field -#line 628 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 137: // expr_primitive: expr_method +#line 627 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2890 "parser.cpp" break; - case 143: // expr_primitive: expr_size -#line 629 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } + case 138: // expr_primitive: expr_add_array +#line 628 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2896 "parser.cpp" break; - case 144: // expr_primitive: expr_paren -#line 630 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } + case 139: // expr_primitive: expr_isdefined +#line 629 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } #line 2902 "parser.cpp" break; - case 145: // expr_primitive: expr_thisthread -#line 631 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } + case 140: // expr_primitive: expr_istrue +#line 630 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } #line 2908 "parser.cpp" break; - case 146: // expr_primitive: expr_empty_array -#line 632 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } + case 141: // expr_primitive: expr_reference +#line 631 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2914 "parser.cpp" break; - case 147: // expr_primitive: expr_undefined -#line 633 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } + case 142: // expr_primitive: expr_array +#line 632 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2920 "parser.cpp" break; - case 148: // expr_primitive: expr_game -#line 634 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 143: // expr_primitive: expr_field +#line 633 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2926 "parser.cpp" break; - case 149: // expr_primitive: expr_self -#line 635 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 144: // expr_primitive: expr_size +#line 634 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2932 "parser.cpp" break; - case 150: // expr_primitive: expr_anim -#line 636 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 145: // expr_primitive: expr_paren +#line 635 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2938 "parser.cpp" break; - case 151: // expr_primitive: expr_level -#line 637 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 146: // expr_primitive: expr_thisthread +#line 636 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2944 "parser.cpp" break; - case 152: // expr_primitive: expr_animation -#line 638 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } + case 147: // expr_primitive: expr_empty_array +#line 637 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2950 "parser.cpp" break; - case 153: // expr_primitive: expr_animtree -#line 639 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } + case 148: // expr_primitive: expr_undefined +#line 638 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2956 "parser.cpp" break; - case 154: // expr_primitive: expr_identifier -#line 640 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 149: // expr_primitive: expr_game +#line 639 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2962 "parser.cpp" break; - case 155: // expr_primitive: expr_istring -#line 641 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } + case 150: // expr_primitive: expr_self +#line 640 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2968 "parser.cpp" break; - case 156: // expr_primitive: expr_string -#line 642 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } + case 151: // expr_primitive: expr_anim +#line 641 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2974 "parser.cpp" break; - case 157: // expr_primitive: expr_vector -#line 643 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } + case 152: // expr_primitive: expr_level +#line 642 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2980 "parser.cpp" break; - case 158: // expr_primitive: expr_float -#line 644 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } + case 153: // expr_primitive: expr_animation +#line 643 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2986 "parser.cpp" break; - case 159: // expr_primitive: expr_integer -#line 645 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } + case 154: // expr_primitive: expr_animtree +#line 644 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2992 "parser.cpp" break; - case 160: // expr_primitive: expr_false -#line 646 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } + case 155: // expr_primitive: expr_identifier +#line 645 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2998 "parser.cpp" break; - case 161: // expr_primitive: expr_true -#line 647 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } + case 156: // expr_primitive: expr_istring +#line 646 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 3004 "parser.cpp" break; - case 162: // expr_complement: "~" expr -#line 652 "parser.ypp" - { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 157: // expr_primitive: expr_string +#line 647 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 3010 "parser.cpp" break; - case 163: // expr_negate: "-" expr_identifier -#line 657 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } + case 158: // expr_primitive: expr_vector +#line 648 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 3016 "parser.cpp" break; - case 164: // expr_negate: "-" expr_paren -#line 659 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } + case 159: // expr_primitive: expr_float +#line 649 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 3022 "parser.cpp" break; - case 165: // expr_negate: "-" expr_array -#line 661 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } + case 160: // expr_primitive: expr_integer +#line 650 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 3028 "parser.cpp" break; - case 166: // expr_negate: "-" expr_field -#line 663 "parser.ypp" - { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } + case 161: // expr_primitive: expr_false +#line 651 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 3034 "parser.cpp" break; - case 167: // expr_not: "!" expr -#line 668 "parser.ypp" - { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } + case 162: // expr_primitive: expr_true +#line 652 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 3040 "parser.cpp" break; - case 168: // expr_call: expr_function -#line 672 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 163: // expr_complement: "~" expr +#line 657 "parser.ypp" + { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3046 "parser.cpp" break; - case 169: // expr_call: expr_pointer -#line 673 "parser.ypp" - { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } + case 164: // expr_negate: "-" expr_identifier +#line 662 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()))); } #line 3052 "parser.cpp" break; - case 170: // expr_method: expr_object expr_function -#line 676 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 165: // expr_negate: "-" expr_paren +#line 664 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()))); } #line 3058 "parser.cpp" break; - case 171: // expr_method: expr_object expr_pointer -#line 677 "parser.ypp" - { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } + case 166: // expr_negate: "-" expr_array +#line 666 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_array::ptr > ()))); } #line 3064 "parser.cpp" break; - case 172: // expr_function: expr_identifier "(" expr_arguments ")" -#line 682 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 167: // expr_negate: "-" expr_field +#line 668 "parser.ypp" + { yylhs.value.as < ast::expr_negate::ptr > () = std::make_unique(yylhs.location, ast::expr(std::move(yystack_[0].value.as < ast::expr_field::ptr > ()))); } #line 3070 "parser.cpp" break; - case 173: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 684 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 168: // expr_not: "!" expr +#line 673 "parser.ypp" + { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 3076 "parser.cpp" break; - case 174: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 686 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 169: // expr_call: expr_function +#line 677 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3082 "parser.cpp" break; - case 175: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 688 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 170: // expr_call: expr_pointer +#line 678 "parser.ypp" + { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 3088 "parser.cpp" break; - case 176: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 690 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 171: // expr_method: expr_object expr_function +#line 681 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3094 "parser.cpp" break; - case 177: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 692 "parser.ypp" - { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 172: // expr_method: expr_object expr_pointer +#line 682 "parser.ypp" + { yylhs.value.as < ast::expr_method::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::call > ())); } #line 3100 "parser.cpp" break; - case 178: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 697 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } + case 173: // expr_function: expr_identifier "(" expr_arguments ")" +#line 687 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3106 "parser.cpp" break; - case 179: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 699 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } + case 174: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" +#line 689 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3112 "parser.cpp" break; - case 180: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 701 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } + case 175: // expr_function: "thread" expr_identifier "(" expr_arguments ")" +#line 691 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3118 "parser.cpp" break; - case 181: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 703 "parser.ypp" - { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } + case 176: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 693 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3124 "parser.cpp" break; - case 182: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 708 "parser.ypp" - { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } + case 177: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" +#line 695 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3130 "parser.cpp" break; - case 183: // expr_parameters: expr_parameters "," expr_identifier -#line 713 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 178: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" +#line 697 "parser.ypp" + { yylhs.value.as < ast::call > ().as_function = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr_path::ptr > ()), std::move(yystack_[3].value.as < ast::expr_identifier::ptr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3136 "parser.cpp" break; - case 184: // expr_parameters: expr_identifier -#line 715 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 179: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 702 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::normal); } #line 3142 "parser.cpp" break; - case 185: // expr_parameters: %empty -#line 717 "parser.ypp" - { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } + case 180: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 704 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::thread); } #line 3148 "parser.cpp" break; - case 186: // expr_arguments: expr_arguments_no_empty -#line 722 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } + case 181: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 706 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::childthread); } #line 3154 "parser.cpp" break; - case 187: // expr_arguments: %empty -#line 724 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } + case 182: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" +#line 708 "parser.ypp" + { yylhs.value.as < ast::call > ().as_pointer = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ()), ast::call::mode::builtin); } #line 3160 "parser.cpp" break; - case 188: // expr_arguments_no_empty: expr_arguments "," expr -#line 729 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 183: // expr_add_array: "[" expr_arguments_no_empty "]" +#line 713 "parser.ypp" + { yylhs.value.as < ast::expr_add_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_arguments::ptr > ())); } #line 3166 "parser.cpp" break; - case 189: // expr_arguments_no_empty: expr -#line 731 "parser.ypp" - { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } + case 184: // expr_parameters: expr_parameters "," expr_identifier +#line 718 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::move(yystack_[2].value.as < ast::expr_parameters::ptr > ()); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3172 "parser.cpp" break; - case 190: // expr_isdefined: "isdefined" "(" expr ")" -#line 736 "parser.ypp" - { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 185: // expr_parameters: expr_identifier +#line 720 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_parameters::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3178 "parser.cpp" break; - case 191: // expr_istrue: "istrue" "(" expr ")" -#line 741 "parser.ypp" - { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 186: // expr_parameters: %empty +#line 722 "parser.ypp" + { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3184 "parser.cpp" break; - case 192: // expr_reference: "::" expr_identifier -#line 746 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 187: // expr_arguments: expr_arguments_no_empty +#line 727 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3190 "parser.cpp" break; - case 193: // expr_reference: expr_path "::" expr_identifier -#line 748 "parser.ypp" - { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 188: // expr_arguments: %empty +#line 729 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3196 "parser.cpp" break; - case 194: // expr_array: expr_object "[" expr "]" -#line 753 "parser.ypp" - { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 189: // expr_arguments_no_empty: expr_arguments "," expr +#line 734 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[2].value.as < ast::expr_arguments::ptr > ()); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3202 "parser.cpp" break; - case 195: // expr_field: expr_object "." expr_identifier_nosize -#line 758 "parser.ypp" - { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } + case 190: // expr_arguments_no_empty: expr +#line 736 "parser.ypp" + { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_arguments::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3208 "parser.cpp" break; - case 196: // expr_size: expr_object "." "size" -#line 763 "parser.ypp" - { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } + case 191: // expr_isdefined: "isdefined" "(" expr ")" +#line 741 "parser.ypp" + { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3214 "parser.cpp" break; - case 197: // expr_paren: "(" expr ")" -#line 768 "parser.ypp" - { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } + case 192: // expr_istrue: "istrue" "(" expr ")" +#line 746 "parser.ypp" + { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3220 "parser.cpp" break; - case 198: // expr_object: expr_call -#line 772 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } + case 193: // expr_reference: "::" expr_identifier +#line 751 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3226 "parser.cpp" break; - case 199: // expr_object: expr_method -#line 773 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } + case 194: // expr_reference: expr_path "::" expr_identifier +#line 753 "parser.ypp" + { yylhs.value.as < ast::expr_reference::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr_path::ptr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3232 "parser.cpp" break; - case 200: // expr_object: expr_array -#line 774 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } + case 195: // expr_tuple: "[" expr_tuple_arguments "]" +#line 758 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[1].value.as < ast::expr_tuple::ptr > ()); } #line 3238 "parser.cpp" break; - case 201: // expr_object: expr_field -#line 775 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } + case 196: // expr_tuple_arguments: expr_tuple_arguments "," expr_tuple_types +#line 763 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::move(yystack_[2].value.as < ast::expr_tuple::ptr > ()); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3244 "parser.cpp" break; - case 202: // expr_object: expr_game -#line 776 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } + case 197: // expr_tuple_arguments: expr_tuple_types +#line 765 "parser.ypp" + { yylhs.value.as < ast::expr_tuple::ptr > () = std::make_unique(yylhs.location); yylhs.value.as < ast::expr_tuple::ptr > ()->list.push_back(std::move(yystack_[0].value.as < ast::expr > ())); } #line 3250 "parser.cpp" break; - case 203: // expr_object: expr_self -#line 777 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } + case 198: // expr_tuple_types: expr_array +#line 769 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3256 "parser.cpp" break; - case 204: // expr_object: expr_anim -#line 778 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } + case 199: // expr_tuple_types: expr_field +#line 770 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3262 "parser.cpp" break; - case 205: // expr_object: expr_level -#line 779 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } + case 200: // expr_tuple_types: expr_identifier +#line 771 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3268 "parser.cpp" break; - case 206: // expr_object: expr_identifier -#line 780 "parser.ypp" - { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } + case 201: // expr_array: expr_object "[" expr "]" +#line 776 "parser.ypp" + { yylhs.value.as < ast::expr_array::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } #line 3274 "parser.cpp" break; - case 207: // expr_thisthread: "thisthread" -#line 785 "parser.ypp" - { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } + case 202: // expr_field: expr_object "." expr_identifier_nosize +#line 781 "parser.ypp" + { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ())); } #line 3280 "parser.cpp" break; - case 208: // expr_empty_array: "[" "]" -#line 790 "parser.ypp" - { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } + case 203: // expr_size: expr_object "." "size" +#line 786 "parser.ypp" + { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ())); } #line 3286 "parser.cpp" break; - case 209: // expr_undefined: "undefined" -#line 795 "parser.ypp" - { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } + case 204: // expr_paren: "(" expr ")" +#line 791 "parser.ypp" + { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3292 "parser.cpp" break; - case 210: // expr_game: "game" -#line 800 "parser.ypp" - { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } + case 205: // expr_object: expr_call +#line 795 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3298 "parser.cpp" break; - case 211: // expr_self: "self" -#line 805 "parser.ypp" - { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } + case 206: // expr_object: expr_method +#line 796 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3304 "parser.cpp" break; - case 212: // expr_anim: "anim" -#line 810 "parser.ypp" - { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } + case 207: // expr_object: expr_array +#line 797 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3310 "parser.cpp" break; - case 213: // expr_level: "level" -#line 815 "parser.ypp" - { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } + case 208: // expr_object: expr_field +#line 798 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3316 "parser.cpp" break; - case 214: // expr_animation: "%" "identifier" -#line 820 "parser.ypp" - { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 209: // expr_object: expr_game +#line 799 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3322 "parser.cpp" break; - case 215: // expr_animtree: "#animtree" -#line 825 "parser.ypp" - { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } + case 210: // expr_object: expr_self +#line 800 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3328 "parser.cpp" break; - case 216: // expr_identifier_nosize: "identifier" -#line 830 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 211: // expr_object: expr_anim +#line 801 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3334 "parser.cpp" break; - case 217: // expr_identifier: "identifier" -#line 835 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 212: // expr_object: expr_level +#line 802 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3340 "parser.cpp" break; - case 218: // expr_identifier: "size" -#line 837 "parser.ypp" - { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } + case 213: // expr_object: expr_identifier +#line 803 "parser.ypp" + { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3346 "parser.cpp" break; - case 219: // expr_path: "identifier" -#line 842 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 214: // expr_thisthread: "thisthread" +#line 808 "parser.ypp" + { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3352 "parser.cpp" break; - case 220: // expr_path: "path" -#line 844 "parser.ypp" - { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 215: // expr_empty_array: "[" "]" +#line 813 "parser.ypp" + { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3358 "parser.cpp" break; - case 221: // expr_istring: "localized string" -#line 849 "parser.ypp" - { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 216: // expr_undefined: "undefined" +#line 818 "parser.ypp" + { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3364 "parser.cpp" break; - case 222: // expr_string: "string literal" -#line 854 "parser.ypp" - { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 217: // expr_game: "game" +#line 823 "parser.ypp" + { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3370 "parser.cpp" break; - case 223: // expr_vector: "(" expr "," expr "," expr ")" -#line 859 "parser.ypp" - { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } + case 218: // expr_self: "self" +#line 828 "parser.ypp" + { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3376 "parser.cpp" break; - case 224: // expr_float: "-" "float" -#line 864 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 219: // expr_anim: "anim" +#line 833 "parser.ypp" + { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3382 "parser.cpp" break; - case 225: // expr_float: "float" -#line 866 "parser.ypp" - { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 220: // expr_level: "level" +#line 838 "parser.ypp" + { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3388 "parser.cpp" break; - case 226: // expr_integer: "-" "integer" -#line 871 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } + case 221: // expr_animation: "%" "identifier" +#line 843 "parser.ypp" + { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3394 "parser.cpp" break; - case 227: // expr_integer: "integer" -#line 873 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } + case 222: // expr_animtree: "#animtree" +#line 848 "parser.ypp" + { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3400 "parser.cpp" break; - case 228: // expr_false: "false" -#line 878 "parser.ypp" - { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } + case 223: // expr_identifier_nosize: "identifier" +#line 853 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3406 "parser.cpp" break; - case 229: // expr_true: "true" -#line 883 "parser.ypp" - { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } + case 224: // expr_identifier: "identifier" +#line 858 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3412 "parser.cpp" break; + case 225: // expr_identifier: "size" +#line 860 "parser.ypp" + { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, "size"); } +#line 3418 "parser.cpp" + break; -#line 3416 "parser.cpp" + case 226: // expr_path: "identifier" +#line 865 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3424 "parser.cpp" + break; + + case 227: // expr_path: "path" +#line 867 "parser.ypp" + { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3430 "parser.cpp" + break; + + case 228: // expr_istring: "localized string" +#line 872 "parser.ypp" + { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3436 "parser.cpp" + break; + + case 229: // expr_string: "string literal" +#line 877 "parser.ypp" + { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3442 "parser.cpp" + break; + + case 230: // expr_vector: "(" expr "," expr "," expr ")" +#line 882 "parser.ypp" + { yylhs.value.as < ast::expr_vector::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[5].value.as < ast::expr > ()), std::move(yystack_[3].value.as < ast::expr > ()), std::move(yystack_[1].value.as < ast::expr > ())); } +#line 3448 "parser.cpp" + break; + + case 231: // expr_float: "-" "float" +#line 887 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3454 "parser.cpp" + break; + + case 232: // expr_float: "float" +#line 889 "parser.ypp" + { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3460 "parser.cpp" + break; + + case 233: // expr_integer: "-" "integer" +#line 894 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } +#line 3466 "parser.cpp" + break; + + case 234: // expr_integer: "integer" +#line 896 "parser.ypp" + { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } +#line 3472 "parser.cpp" + break; + + case 235: // expr_false: "false" +#line 901 "parser.ypp" + { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } +#line 3478 "parser.cpp" + break; + + case 236: // expr_true: "true" +#line 906 "parser.ypp" + { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } +#line 3484 "parser.cpp" + break; + + +#line 3488 "parser.cpp" default: break; @@ -3625,12 +3697,13 @@ namespace xsk { namespace gsc { namespace s4 { "expr_call", "expr_method", "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", "expr_arguments", "expr_arguments_no_empty", "expr_isdefined", "expr_istrue", - "expr_reference", "expr_array", "expr_field", "expr_size", "expr_paren", - "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", - "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier_nosize", "expr_identifier", - "expr_path", "expr_istring", "expr_string", "expr_vector", "expr_float", - "expr_integer", "expr_false", "expr_true", YY_NULLPTR + "expr_reference", "expr_tuple", "expr_tuple_arguments", + "expr_tuple_types", "expr_array", "expr_field", "expr_size", + "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", + "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", + "expr_animation", "expr_animtree", "expr_identifier_nosize", + "expr_identifier", "expr_path", "expr_istring", "expr_string", + "expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3899,700 +3972,715 @@ namespace xsk { namespace gsc { namespace s4 { } - const short parser::yypact_ninf_ = -295; + const short parser::yypact_ninf_ = -296; - const short parser::yytable_ninf_ = -220; + const short parser::yytable_ninf_ = -227; const short parser::yypact_[] = { - 1, -295, -295, -26, -26, -29, -295, -295, 37, 1, - -295, -295, -295, -295, -295, -295, -22, -295, -295, -25, - 11, -57, -295, -295, -295, -295, -23, 1138, -295, -295, - -295, 16, 2, -295, -295, -7, -2, -295, -17, -295, - -295, -295, -295, -295, -295, -295, 27, 28, 1138, 701, - -23, 1138, 1138, -20, -12, 42, -295, -295, -295, 2218, - -295, -295, -295, -295, -295, -295, 135, 512, -295, -295, - -295, -295, -295, -295, 919, 998, -295, -295, 1099, -295, - -295, -295, 1163, 1341, 1350, 1360, -295, -295, 106, 44, - -295, -295, -295, -295, -295, -295, -295, 74, 35, -23, - 81, 87, 86, 92, 98, 93, 100, 1138, 1138, 1402, - 701, -295, 2301, 96, 103, -295, -295, -295, 1138, 101, - -295, -295, -295, -295, 919, 998, -295, 1369, -295, -295, - -295, -295, 106, 104, -295, -295, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1138, 1138, 1203, -14, -295, -295, 111, - 1138, -23, -295, 833, -295, -295, 1138, 1138, -23, 1138, - 1138, -23, 1138, 1568, 1602, -295, 1138, 1948, 1138, -295, - 1636, 1138, 69, -23, 2183, 91, 91, 2332, 2342, 718, - 718, 561, 561, 561, 561, 2373, 2383, 624, 26, 26, - -295, -295, -295, 1988, -295, -295, -295, 4, -295, 118, - 966, 1138, 109, -47, 120, 1329, 123, 126, 127, 136, - -49, 128, 131, 133, 1073, 139, 138, 146, -295, 603, - 603, -295, -295, 887, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - 144, 147, 148, 149, 150, -295, -295, 1250, 111, 2028, - 6, 162, 2068, 8, 164, 2108, -295, -295, 2147, 160, - 2301, 1948, 118, 1138, -295, -295, 1138, -295, -295, 1045, - 2253, -295, 165, -295, 1138, 194, 1138, 538, -23, 1138, - 122, 168, 169, -295, -295, -295, -295, 2288, -295, 1138, - 1138, 1369, 1369, -295, -295, -295, -295, -295, -295, -295, - 174, 187, 188, 190, -295, -295, 1138, 1138, 1138, 1138, - 1138, 1138, 1138, 1138, 1138, 1138, 1138, 186, -295, 1138, - 189, -295, 1138, 195, 1138, 193, 2301, 34, -295, -295, - -295, 191, 1670, 199, 1704, 192, -295, -295, -295, 29, - -11, 1738, -295, -295, -295, 45, 47, 1138, 1138, 1138, - 1138, 2301, 2301, 2301, 2301, 2301, 2301, 2301, 2301, 2301, - 2301, 2301, 203, 48, 205, 65, 206, 1772, 1138, -295, - -295, 1329, 1138, 1329, 1138, 1138, -23, 35, 197, 200, - 1806, 1446, 1490, 1534, 1138, -295, 1138, -295, 1138, -295, - 66, 237, 1840, -295, 2301, 201, 1874, 233, -295, -295, - -295, 204, 207, 1138, 208, 1138, 209, 1138, 75, 76, - 82, -295, 1329, 211, 538, 1329, 1138, -295, -295, 214, - -295, 221, -295, 223, -295, -295, -295, -295, -295, 224, - -295, 1908, 216, 217, 220, 1329, 1329, -295, -295, -295, - -295, -295 + 2, -296, -296, -24, -24, -29, -296, -296, 27, 2, + -296, -296, -296, -296, -296, -296, -35, -296, -296, -30, + -7, -49, -296, -296, -296, -296, -41, 1265, -296, -296, + -296, 45, -31, -296, -296, -27, -19, -296, 66, -296, + -296, -296, -296, -296, -296, -296, 72, 74, 1265, 1135, + -41, 1265, 1265, 817, 37, 73, -296, -296, -296, 2289, + -296, -296, -296, -296, -296, -296, 119, 430, -296, -296, + -296, -296, -296, -296, 604, 647, -296, -296, 750, -296, + -296, -296, 904, 981, 1060, 1161, -296, -296, -3, 84, + -296, -296, -296, -296, -296, -296, -296, 89, 102, -41, + 109, 115, 114, 120, 125, 122, 134, 1265, 1265, 1513, + 1135, -296, 2372, 135, 146, -296, -296, -296, 1265, 136, + -296, -296, -296, -296, 604, 647, -296, 1225, -296, -296, + -296, -296, -3, 144, -296, -296, 1265, 1265, 1265, 1265, + 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, 1265, + 1265, 1265, 1265, 1265, 1265, 1330, -26, -296, -296, 153, + 1265, -41, -296, 82, -296, -296, 1265, 1265, -41, 1265, + 1265, -41, 1265, 1679, 1713, -296, 1265, 1261, 1265, -296, + 1747, 1265, 112, -41, 2254, 91, 91, 2403, 2413, 758, + 758, 176, 176, 176, 176, 2444, 680, 543, 46, 46, + -296, -296, -296, 2059, -296, -296, -296, -14, -296, 159, + 1028, 1265, 152, -32, 166, 1456, 167, 172, 178, 179, + -39, 177, 171, 175, 1200, 191, 188, 189, -296, 150, + 382, 382, -296, -296, 949, -296, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + -296, 192, 193, 194, 196, 198, 185, -296, -296, 1377, + 153, 2099, 22, 212, 2139, 24, 213, 2179, -296, -296, + 2218, 209, 2372, 1261, 159, 1265, -296, -296, 1265, -296, + -296, 1107, 2324, -296, 220, -296, 1265, 250, 1265, 833, + -41, 1265, 174, 216, 218, -296, -296, -296, -296, 2359, + -296, 1265, 1265, 1330, 8, -296, 105, 113, 10, 1225, + 1225, -296, -296, -296, -296, -296, -296, -296, 1265, 229, + 232, 233, 234, -296, -296, 1265, 1265, 1265, 1265, 1265, + 1265, 1265, 1265, 1265, 1265, 1265, 230, -296, 1265, 231, + -296, 1265, 235, 1265, 238, 2372, 28, -296, -296, -296, + 239, 1781, 242, 1815, 241, -296, -296, -296, 1477, -12, + 1849, -296, -296, -296, 31, 32, -296, 382, 2372, 1265, + 1265, 1265, 1265, 2372, 2372, 2372, 2372, 2372, 2372, 2372, + 2372, 2372, 2372, 2372, 243, 34, 255, 35, 259, 1883, + 1265, -296, -296, 1456, 1265, 1456, 1265, 1265, -41, 102, + 251, 253, -296, 1917, 1557, 1601, 1645, 1265, -296, 1265, + -296, 1265, -296, 43, 289, 1951, -296, 2372, 257, 1985, + 292, -296, -296, -296, 264, 265, 1265, 269, 1265, 270, + 1265, 52, 81, 90, -296, 1456, 293, 833, 1456, 1265, + -296, -296, 268, -296, 301, -296, 303, -296, -296, -296, + -296, -296, 304, -296, 2019, 296, 297, 298, 1456, 1456, + -296, -296, -296, -296, -296 }; const unsigned char parser::yydefact_[] = { - 3, 12, 13, 0, 0, 0, 218, 217, 0, 2, - 7, 8, 9, 14, 15, 16, 0, 220, 219, 0, - 0, 0, 1, 4, 5, 6, 185, 0, 10, 11, - 222, 0, 0, 184, 215, 0, 0, 207, 0, 229, - 228, 209, 210, 211, 212, 213, 0, 0, 0, 187, - 0, 0, 0, 0, 0, 217, 221, 225, 227, 0, - 93, 94, 95, 132, 133, 134, 135, 136, 168, 169, - 137, 138, 139, 140, 141, 142, 143, 144, 0, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 0, - 155, 156, 157, 158, 159, 160, 161, 0, 0, 0, + 3, 12, 13, 0, 0, 0, 225, 224, 0, 2, + 7, 8, 9, 14, 15, 16, 0, 227, 226, 0, + 0, 0, 1, 4, 5, 6, 186, 0, 10, 11, + 229, 0, 0, 185, 222, 0, 0, 214, 0, 236, + 235, 216, 217, 218, 219, 220, 0, 0, 0, 188, + 0, 0, 0, 0, 0, 224, 228, 232, 234, 0, + 93, 94, 95, 133, 134, 135, 136, 137, 169, 170, + 138, 139, 140, 141, 142, 143, 144, 145, 0, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 0, + 156, 157, 158, 159, 160, 161, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 187, 208, 189, 0, 186, 192, 167, 162, 0, 0, - 224, 226, 198, 199, 165, 166, 164, 0, 202, 203, - 204, 205, 163, 0, 214, 18, 0, 0, 0, 0, + 188, 215, 190, 0, 187, 193, 168, 163, 0, 0, + 231, 233, 205, 206, 166, 167, 165, 0, 209, 210, + 211, 212, 164, 0, 221, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 170, 171, 0, - 187, 0, 17, 0, 19, 183, 0, 187, 0, 0, - 187, 0, 0, 0, 0, 197, 0, 189, 0, 182, - 0, 0, 0, 0, 0, 125, 126, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 127, 128, - 129, 130, 131, 0, 196, 216, 195, 0, 186, 193, + 0, 0, 0, 0, 0, 0, 0, 171, 172, 0, + 188, 0, 17, 0, 19, 184, 0, 188, 0, 0, + 188, 0, 0, 0, 0, 204, 0, 190, 0, 183, + 0, 0, 0, 0, 0, 126, 127, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 128, 129, + 130, 131, 132, 0, 203, 223, 202, 0, 187, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, - 0, 45, 50, 0, 46, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 0, 0, 0, 198, 199, 200, 201, 0, 206, 0, - 0, 0, 0, 0, 0, 0, 190, 191, 0, 0, - 188, 0, 0, 0, 194, 172, 187, 52, 48, 0, - 0, 72, 0, 73, 0, 0, 0, 58, 0, 0, - 0, 0, 0, 85, 86, 87, 89, 0, 90, 187, - 187, 109, 111, 53, 49, 61, 62, 63, 59, 60, - 0, 0, 0, 0, 110, 112, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 174, 187, - 0, 176, 187, 0, 0, 0, 113, 0, 51, 47, - 67, 0, 0, 0, 0, 0, 55, 56, 57, 0, - 0, 0, 84, 83, 88, 0, 0, 0, 0, 0, - 0, 98, 104, 105, 106, 107, 108, 99, 100, 101, - 103, 102, 0, 0, 0, 0, 0, 0, 187, 173, - 74, 0, 0, 0, 97, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 187, 175, 187, 177, 187, 223, - 0, 75, 0, 77, 96, 0, 0, 0, 82, 91, - 92, 0, 0, 187, 0, 187, 0, 187, 0, 0, - 0, 178, 0, 0, 58, 0, 0, 64, 66, 186, - 69, 186, 71, 186, 179, 180, 181, 76, 78, 0, - 80, 0, 0, 0, 0, 0, 0, 65, 68, 70, - 79, 81 + 0, 0, 45, 50, 0, 46, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 0, 0, 0, 205, 206, 0, 207, 208, 0, + 213, 0, 0, 0, 0, 0, 0, 0, 191, 192, + 0, 0, 189, 0, 0, 0, 201, 173, 188, 52, + 48, 0, 0, 72, 0, 73, 0, 0, 0, 58, + 0, 0, 0, 0, 0, 85, 86, 87, 89, 0, + 90, 188, 188, 0, 0, 197, 207, 208, 213, 110, + 112, 53, 49, 61, 62, 63, 59, 60, 0, 0, + 0, 0, 0, 111, 113, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 175, 188, 0, + 177, 188, 0, 0, 0, 114, 0, 51, 47, 67, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 84, 83, 88, 0, 0, 195, 0, 98, 0, + 0, 0, 0, 99, 105, 106, 107, 108, 109, 100, + 101, 102, 104, 103, 0, 0, 0, 0, 0, 0, + 188, 174, 74, 0, 0, 0, 97, 0, 0, 0, + 0, 0, 196, 0, 0, 0, 0, 188, 176, 188, + 178, 188, 230, 0, 75, 0, 77, 96, 0, 0, + 0, 82, 91, 92, 0, 0, 188, 0, 188, 0, + 188, 0, 0, 0, 179, 0, 0, 58, 0, 0, + 64, 66, 187, 69, 187, 71, 187, 180, 181, 182, + 76, 78, 0, 80, 0, 0, 0, 0, 0, 0, + 65, 68, 70, 79, 81 }; const short parser::yypgoto_[] = { - -295, -295, -295, 276, 278, 279, -295, -295, -295, 67, - 59, -295, -295, -295, -97, -133, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - -295, -295, -295, -295, -295, -295, -295, -295, -295, -295, - 198, -295, -294, -291, -289, -295, -295, -295, -295, -295, - -295, -31, -6, -73, -60, -295, -295, -16, -45, -295, - -295, -295, 80, 249, -295, 250, 274, -295, -295, -295, - 280, 385, 391, 398, -295, -295, -295, 0, 7, -295, - -19, -295, -295, 94, -295, -295 + -296, -296, -296, 354, 355, 356, -296, -296, -296, -144, + 133, -296, -296, -296, -97, -77, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + -296, -296, -296, -296, -296, -296, -296, -296, -296, -296, + 200, -296, -295, -292, -291, -296, -296, -296, -296, -296, + -296, -6, 101, -73, -66, -296, -296, -137, -47, -296, + -296, -296, -296, -296, -4, 337, 362, -296, 321, 368, + -296, -296, -296, 393, 442, 467, 501, -296, -296, -296, + 0, 7, -296, -18, -296, -296, 160, -296, -296 }; const short parser::yydefgoto_[] = { - 0, 8, 9, 10, 11, 12, 13, 14, 15, 231, - 232, 289, 233, 234, 235, 355, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - 112, 415, 260, 261, 262, 60, 61, 62, 63, 64, + 0, 8, 9, 10, 11, 12, 13, 14, 15, 232, + 233, 291, 234, 235, 236, 364, 237, 238, 239, 240, + 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, + 112, 428, 261, 262, 263, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 32, 113, 208, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 206, 88, 89, 90, - 91, 92, 93, 94, 95, 96 + 72, 73, 266, 314, 315, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 206, + 88, 89, 90, 91, 92, 93, 94, 95, 96 }; const short parser::yytable_[] = { - 16, 164, 31, 356, 114, 157, 357, 292, 358, 16, - 19, 20, 1, 2, 3, 4, 5, 293, 158, 395, - 35, 36, 122, 38, 6, 21, 33, 6, 42, 43, - 44, 45, 26, 204, 118, 101, 104, 22, 119, 28, - 6, 106, 102, 105, 30, 6, 300, 123, 6, 396, - 115, 100, 30, 132, 157, 58, 103, 98, 27, 285, - 133, 338, 99, 341, 178, 114, 178, 158, 178, 35, - 36, 97, 38, 17, 18, 29, 6, 7, 159, 17, - 55, 107, 108, 120, 121, 133, 205, 155, 134, 389, - 182, 163, 17, 55, 178, 324, 325, 17, 55, 165, - 398, 7, 399, 405, -219, 178, 161, 178, 178, 326, - 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, - 407, 431, 152, 153, 154, 178, 178, 159, 17, 55, - 444, 445, 263, 124, 133, 178, 178, 446, 162, 166, - 356, 167, 178, 357, 207, 358, -206, -206, 168, -206, - 169, 270, 170, -206, 273, 171, 178, 264, 172, 181, - 160, 209, 179, 268, -206, 160, 183, -206, 271, 205, - 133, 274, 286, 291, 294, -198, -198, 296, -198, 263, - 297, 298, -198, 282, 263, 150, 151, 152, 153, 154, - 299, 303, 309, -198, 157, 304, -198, 305, 122, 122, - 310, 301, 263, 308, 264, -206, -206, 158, 315, 264, - 268, 316, 317, 318, 319, 268, 339, 133, 342, 345, - 351, 353, 133, 123, 123, 59, 121, 264, 367, 268, - 268, 362, 363, 268, -198, -198, 133, 133, 157, 157, - 133, 368, 369, 265, 370, 382, 109, 388, 384, 116, - 117, 158, 158, 392, 386, 390, 394, 404, 263, 406, - 408, 419, 432, 436, 420, 434, 122, 159, 437, 452, - 347, 438, 440, 442, 133, 448, 453, 288, 454, 455, - 457, 458, 295, 264, 459, 23, 157, 24, 25, 268, - 265, 123, 314, 365, 366, 265, 133, 268, 360, 158, - 418, 449, 125, 126, 133, 173, 174, 0, 177, 265, - 265, 159, 159, 265, 302, 0, 180, 0, 133, 133, - 0, 0, 0, 383, 0, 0, 385, 127, 0, 0, - 0, 0, 0, 128, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 0, 0, 349, 0, 0, 159, - 263, 0, 263, 0, 269, 0, 133, 272, 0, 265, - 275, 0, 410, 0, 278, 0, 280, 265, 439, 281, - 441, 0, 443, 0, 0, 264, 0, 264, 428, 0, - 429, 268, 430, 268, 0, 0, 417, 0, 133, 0, - 133, 263, 0, 122, 263, 0, 0, 0, 0, 290, - 0, 0, 266, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 307, 0, 263, 263, 264, 0, 123, 264, - 0, 0, 268, 0, 268, 268, 0, 267, 129, 133, - 0, 133, 133, 128, 130, 0, 0, 0, 0, 264, - 264, 131, 0, 0, 0, 268, 268, 0, 411, 266, - 413, 0, 133, 133, 266, 0, 0, 0, 0, 0, - 0, 265, 0, 265, 0, 0, 0, 0, 266, 266, - 0, 346, 266, 0, 267, 0, 0, 0, 0, 267, - 128, 0, 352, 0, 354, 128, 0, 361, 0, 447, - 0, 0, 450, 311, 312, 0, 0, 267, 0, 128, - 128, 0, 265, 128, 265, 265, 0, 0, 0, 0, - 0, 0, 460, 461, 371, 372, 373, 374, 375, 376, - 377, 378, 379, 380, 381, 265, 265, 0, 266, 0, - 0, 0, 387, 0, 0, 0, 266, 0, 129, 0, - 0, 0, -199, -199, 130, -199, 0, 0, 0, -199, - 0, 131, 0, 267, 0, 400, 401, 402, 403, 128, - -199, 359, 0, -199, 0, 0, 0, 128, 35, 36, - 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, - 412, 0, 414, 416, 0, 129, 119, 0, 0, 0, - 129, 130, 0, 0, 229, 230, 130, 0, 131, 0, - 0, -199, -199, 131, 129, 129, 0, 0, 129, 0, - 130, 130, 0, 0, 130, 0, 0, 131, 131, 137, - 138, 131, 0, 0, 451, 0, 0, 17, 55, 0, - 266, 0, 266, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 150, 151, 152, 153, 154, - 0, 119, 0, 0, 0, 267, 0, 267, 0, 0, - 0, 128, 0, 128, 129, 0, 0, 0, 0, 0, - 130, 266, 129, 266, 266, 0, 0, 131, 130, 0, - 0, 0, 137, 138, 0, 131, 141, 142, 143, 144, - 145, 146, 17, 55, 266, 266, 267, 0, 359, 267, - 0, 0, 128, 0, 128, 128, 148, 34, 150, 151, - 152, 153, 154, 0, 0, 0, 0, 0, 0, 267, - 267, 0, 0, 0, 0, 128, 128, 0, 0, 0, - 0, 35, 36, 37, 38, 39, 40, 41, 6, 42, - 43, 44, 45, 46, 47, 48, 0, 0, 0, 110, - 111, 0, 0, 50, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 0, 129, 51, - 52, 0, 130, 0, 130, 0, 137, 138, 0, 131, - 0, 131, 143, 144, 145, 146, 53, 0, 0, 54, - 17, 55, 30, 56, 57, 58, 0, 0, 0, 0, - 0, 0, 150, 151, 152, 153, 154, 129, 0, 129, - 129, 0, 0, 130, 0, 130, 130, 0, 0, 0, - 131, 0, 131, 131, 0, 0, 0, 0, 0, 0, - 129, 129, 0, 0, 210, 0, 130, 130, 0, 0, - 0, 0, 211, 131, 131, 212, 213, 214, 0, 215, - 216, 217, 218, 0, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 35, 36, 0, 38, 0, 0, 0, - 6, 42, 43, 44, 45, 0, 0, 0, 0, 163, - 228, 119, 0, 0, 0, 0, 0, 0, 210, 229, - 230, 0, 0, 0, 0, 0, 211, 0, 0, 212, - 213, 214, 0, 215, 216, 217, 218, 0, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 35, 36, 0, - 38, 0, 17, 55, 6, 42, 43, 44, 45, 0, - 0, 0, 0, 163, 313, 119, 0, 0, 0, 0, - 0, 0, 0, 229, 230, 0, 0, 0, 0, -200, - -200, 0, -200, 0, 0, 0, -200, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -200, 287, 0, - -200, 0, 0, 0, 0, 211, 17, 55, 212, 213, - 214, 0, 215, 216, 217, 218, 0, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 35, 36, 0, 38, - 0, 0, 0, 6, 42, 43, 44, 45, -200, -200, - 0, 0, 163, 0, 119, 0, 0, 0, 0, 0, - 0, 0, 229, 230, 0, 0, 0, 0, -201, -201, - 0, -201, 0, 0, 0, -201, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -201, 348, 0, -201, - 0, 0, 0, 0, 211, 17, 55, 212, 213, 214, - 0, 215, 216, 217, 218, 0, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 35, 36, 0, 38, 34, - 0, 0, 6, 42, 43, 44, 45, -201, -201, 0, - 0, 163, 0, 119, 0, 0, 0, 0, 0, 0, - 0, 229, 230, 35, 36, 37, 38, 39, 40, 41, - 6, 42, 43, 44, 45, 46, 47, 48, 0, 0, - 0, 49, 0, 0, 0, 50, 0, 306, 0, 35, - 36, 0, 38, 0, 17, 55, 6, 0, 0, 0, - 0, 51, 52, 0, 34, 0, 0, 155, 0, 0, - 156, 0, 0, 0, 0, 0, 0, 0, 53, 0, - 0, 54, 17, 55, 30, 56, 57, 58, 35, 36, - 37, 38, 39, 40, 41, 6, 42, 43, 44, 45, - 46, 47, 48, 0, 0, 0, 49, 0, 17, 55, - 50, 0, 0, -202, -202, 0, -202, 0, 0, 0, - -202, 0, 0, 0, 0, 0, 51, 52, 0, 34, - 0, -202, 0, 0, -202, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 0, 0, 54, 17, 55, 30, - 56, 57, 58, 35, 36, 37, 38, 39, 40, 41, - 6, 42, 43, 44, 45, 46, 47, 48, 0, 0, - 0, 110, -202, -202, 0, 50, 0, 320, 321, 0, - 322, 323, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 51, 52, 0, 0, 0, 0, 0, 0, 0, - 35, 36, 0, 38, 0, 0, 0, 6, 53, 0, - 0, 54, 17, 55, 30, 56, 57, 58, 155, 0, - 0, 182, 0, 0, 0, 0, 324, 325, 0, 0, + 16, 164, 114, 31, 365, 157, 6, 366, 367, 16, + 19, 20, 158, 1, 2, 3, 4, 5, 407, 26, + 6, 204, 294, 207, 98, 21, 33, 22, 6, 99, + 272, 100, 295, 275, 28, 101, 104, -213, -213, 103, + -213, 287, 102, 105, -213, 27, 178, 122, 408, 6, + 115, 160, 30, 132, 157, -213, 302, 29, -213, 7, + 133, 158, 30, 114, 160, 58, 290, 376, 377, -200, + -200, 297, 17, 55, 205, 17, 18, 347, 159, 350, + 17, 55, 178, 401, 178, 133, 410, 411, 178, 418, + 420, 178, 178, 210, 178, 178, -213, -213, 444, 165, + 97, 211, 7, 178, 212, 213, 214, 457, 215, 216, + 217, 218, 178, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 35, 36, 106, 38, 107, 159, 108, 6, + 42, 43, 44, 45, 133, -226, 458, 134, 163, 228, + 229, 178, 152, 153, 154, 459, 161, 358, 230, 231, + 178, 356, 365, 162, 123, 366, 367, 264, 163, -205, + -205, 209, -205, 270, -198, -198, -205, 166, 273, 167, + 133, 276, -199, -199, 374, 375, 168, -205, 169, 170, + -205, 17, 55, 284, 171, 150, 151, 152, 153, 154, + 35, 36, 172, 38, 181, 178, 157, 6, 42, 43, + 44, 45, 303, 158, 264, 179, 183, 160, 313, 264, + 270, 395, 205, 288, 397, 270, 293, 133, -205, -205, + 296, 298, 133, 122, 122, 122, 299, 59, 264, 318, + 270, 270, 300, 301, 270, 306, 133, 133, 133, 307, + 305, 133, 311, 312, 137, 138, 157, 157, 109, 17, + 55, 116, 117, 158, 158, 310, 323, 324, 325, 424, + 326, 426, 327, 423, 265, 328, 348, 351, 354, 159, + 150, 151, 152, 153, 154, 360, 133, 362, 121, 371, + 441, 372, 442, 379, 443, 264, 380, 381, 382, 394, + 396, 270, 400, 122, 398, 157, 404, 417, 133, 270, + 369, 460, 158, 402, 463, 406, 133, 173, 174, 419, + 177, 265, 431, 421, 445, 432, 265, 433, 180, 159, + 159, 447, 449, 465, 473, 474, 133, 133, 450, 451, + 123, 123, 123, 453, 455, 265, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 466, 461, 467, 468, + 470, 471, 472, 23, 24, 25, 271, 322, 159, 274, + 462, 122, 277, 412, 126, 133, 280, 318, 282, 0, + 304, 283, 0, 0, 133, 0, 0, 0, 0, 452, + 124, 454, 265, 456, 0, 0, 0, 264, 0, 264, + 123, 0, 0, 270, 0, 270, 0, 0, 430, 0, + 133, 292, 133, 0, 0, 125, 0, 0, 0, 0, + 0, 127, 35, 36, 309, 38, 0, 0, 0, 6, + 42, 43, 44, 45, 0, 0, 0, 0, 0, 264, + 119, 122, 264, 0, 0, 270, 128, 270, 270, 0, + 0, 0, 133, 0, 133, 133, 0, 0, 0, 0, + 0, 0, 264, 264, 0, 0, 0, 0, 270, 270, + -206, -206, 0, -206, 0, 133, 133, -206, 123, 0, + 0, 17, 55, 0, 0, 355, 0, 0, -206, 0, + 0, -206, 0, 0, 0, 129, 361, 0, 363, 0, + 267, 370, 0, 0, 265, 0, 265, 0, 0, 0, + 0, 0, 0, 283, 0, 0, 0, 0, 0, 0, + 130, 0, 0, 0, 0, 268, 0, 0, 378, -206, + -206, 269, 0, 0, 0, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 265, 267, 123, 265, + 0, 0, 267, 399, 131, 0, 128, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 316, 267, 267, 265, + 265, 267, 268, 0, 0, 0, 0, 268, 269, 413, + 414, 415, 416, 269, 0, 0, 0, 0, 0, 0, + 0, 317, 268, 268, 0, 0, 268, 127, 319, 320, + 0, 0, 269, 128, 425, 129, 427, 429, 128, 0, + 0, 137, 138, 0, 0, 141, 142, 143, 144, 145, + 146, 0, 128, 128, 128, 0, 0, 128, 267, 0, + 130, 0, 0, 0, 0, 148, 267, 150, 151, 152, + 153, 154, 0, 0, -207, -207, 0, -207, 0, 464, + 0, -207, 129, 268, 0, 0, 0, 129, 0, 269, + 0, 268, -207, 0, 131, -207, 0, 368, 0, 0, + 0, 129, 129, 129, 0, 0, 129, 130, 0, 0, + 0, 0, 130, 0, 128, 0, 0, -208, -208, 0, + -208, 0, 128, 0, -208, 0, 130, 130, 130, 0, + 0, 130, 0, -207, -207, -208, 0, 0, -208, 0, + 0, 131, 0, 0, 316, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 0, 0, 0, 0, 0, 0, 0, 211, 17, - 55, 212, 213, 214, 0, 215, 216, 217, 218, 0, + 131, 131, 131, 129, 0, 131, 0, 0, 0, 317, + 267, 129, 267, 0, 0, 127, -208, -208, 137, 138, + 0, 0, 141, 142, 143, 144, 145, 146, 130, 0, + 0, 0, 0, 0, 0, 268, 130, 268, 0, 0, + 128, 269, 0, 269, 150, 151, 152, 153, 154, 0, + 0, 0, 267, 0, 267, 267, 0, 0, 0, 0, + 35, 36, 131, 38, 0, 0, 128, 6, 128, 0, + 131, 0, 0, 0, 0, 267, 267, 268, 155, 268, + 268, 156, 0, 269, 0, 368, 269, 0, 0, 129, + 0, 0, 0, 0, 0, 0, 137, 138, 0, 0, + 268, 268, 143, 144, 145, 146, 269, 269, 128, 0, + 128, 128, 0, 0, 130, 129, 0, 129, 0, 17, + 55, 0, 150, 151, 152, 153, 154, 35, 36, 0, + 38, 128, 128, 0, 6, 42, 43, 44, 45, 0, + 130, 118, 130, 35, 36, 119, 38, 0, 131, 0, + 6, 42, 43, 44, 45, 0, 0, 129, 0, 129, + 129, 229, 0, 0, 0, 0, 0, 0, 0, 230, + 231, 0, 0, 0, 131, 0, 131, 0, 0, 0, + 129, 129, 130, 0, 130, 130, 17, 55, 0, 0, + 120, 121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 55, 0, 130, 130, 0, 0, 0, + 0, 0, 0, 0, -209, -209, 131, -209, 131, 131, + 0, -209, 0, 0, 0, 0, 0, 0, 0, 0, + 210, 0, -209, 0, 0, -209, 0, 0, 211, 131, + 131, 212, 213, 214, 0, 215, 216, 217, 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 227, 35, 36, 0, 38, 0, 0, 0, 6, 42, 43, 44, - 45, -203, -203, 0, -203, 163, 0, 119, -203, 0, - -204, -204, 0, -204, 0, 229, 230, -204, 0, -203, - -205, -205, -203, -205, 0, 0, 0, -205, -204, 35, - 36, -204, 38, 0, 0, 0, 6, 0, -205, 0, - 0, -205, 0, 0, 0, 0, 0, 155, 17, 55, - 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -203, -203, 0, 0, 0, 0, 0, 0, 0, -204, - -204, 0, 0, 0, 0, 0, 0, 175, 0, -205, - -205, 0, 176, 0, 0, 0, 0, 136, 17, 55, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 422, 0, 0, 0, 0, 423, 0, 0, 0, - 0, 136, 0, 0, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 147, 148, 149, - 150, 151, 152, 153, 154, 424, 0, 0, 0, 0, - 425, 0, 0, 0, 0, 136, 0, 0, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 147, 148, 149, 150, 151, 152, 153, 154, 426, - 0, 0, 0, 0, 427, 0, 0, 0, 0, 136, - 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 276, 0, 147, 148, 149, 150, 151, - 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 277, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 136, 0, 0, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 175, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 136, 0, 0, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 391, 0, 147, 148, 149, - 150, 151, 152, 153, 154, 136, 0, 0, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, - 0, 147, 148, 149, 150, 151, 152, 153, 154, 136, - 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 397, 0, 147, 148, 149, 150, 151, - 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 409, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 136, 0, 0, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 421, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 136, 0, 0, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 433, 0, 147, 148, 149, - 150, 151, 152, 153, 154, 136, 0, 0, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 435, - 0, 147, 148, 149, 150, 151, 152, 153, 154, 136, - 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 456, 0, 147, 148, 149, 150, 151, - 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 279, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 284, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 337, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 340, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 343, 0, 0, - 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 344, 0, 0, + 45, 0, 0, -209, -209, 163, 321, 229, 0, 0, + 0, 0, 0, 0, 0, 230, 231, 0, 0, 0, + 0, -210, -210, 0, -210, 0, 0, 0, -210, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -210, + 289, 0, -210, 0, 0, 0, 0, 211, 17, 55, + 212, 213, 214, 0, 215, 216, 217, 218, 0, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 35, 36, + 0, 38, 0, 0, 0, 6, 42, 43, 44, 45, + -210, -210, 0, 0, 163, 0, 229, 0, 0, 0, + 0, 0, 0, 0, 230, 231, 0, 0, 0, 0, + -211, -211, 0, -211, 0, 0, 0, -211, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -211, 357, + 0, -211, 0, 0, 0, 0, 211, 17, 55, 212, + 213, 214, 0, 215, 216, 217, 218, 0, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 35, 36, 0, + 38, 34, 0, 0, 6, 42, 43, 44, 45, -211, + -211, 0, 0, 163, 0, 229, 0, 0, 0, 0, + 0, 0, 0, 230, 231, 35, 36, 37, 38, 39, + 40, 41, 6, 42, 43, 44, 45, 46, 47, 48, + 0, 0, 0, 110, 111, 0, 0, 50, 0, 0, + 0, -212, -212, 0, -212, 0, 17, 55, -212, 0, + 0, 0, 0, 51, 52, 0, 34, 0, 0, -212, + 0, 0, -212, 0, 0, 0, 0, 0, 0, 0, + 53, 0, 0, 54, 17, 55, 30, 56, 57, 58, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 47, 48, 0, 0, 0, 49, 0, + -212, -212, 50, 0, 308, 35, 36, 0, 38, 0, + 0, 0, 6, 0, 0, 0, 0, 0, 51, 52, + 0, 34, 0, 155, 0, 0, 182, 0, 0, 0, + 0, 0, 0, 0, 0, 53, 0, 0, 54, 17, + 55, 30, 56, 57, 58, 35, 36, 37, 38, 39, + 40, 41, 6, 42, 43, 44, 45, 46, 47, 48, + 281, 0, 0, 49, 17, 55, 136, 50, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 51, 52, 0, 34, 0, 0, 0, + 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 53, 0, 0, 54, 17, 55, 30, 56, 57, 58, + 35, 36, 37, 38, 39, 40, 41, 6, 42, 43, + 44, 45, 46, 47, 48, 0, 0, 0, 110, 0, + 0, 0, 50, 0, 329, 330, 0, 331, 332, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 51, 52, + 0, 0, 0, 0, 0, 0, 0, 35, 36, 0, + 38, 0, 0, 0, 6, 53, 0, 0, 54, 17, + 55, 30, 56, 57, 58, 155, 0, 0, 182, 0, + 0, 0, 0, 333, 334, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 0, 0, + 0, 0, 0, 0, 0, 211, 17, 55, 212, 213, + 214, 0, 215, 216, 217, 218, 0, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 35, 36, 0, 38, + 0, 0, 0, 6, 42, 43, 44, 45, 0, 0, + 0, 0, 163, 0, 229, 0, 0, 35, 36, 0, + 38, 0, 230, 231, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 155, 0, 0, 182, 0, + 0, 0, 0, 333, 334, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 55, 335, 336, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 175, 0, + 0, 0, 0, 176, 0, 0, 17, 55, 136, 0, + 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 435, 0, 0, 0, 0, 436, 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, 148, - 149, 150, 151, 152, 153, 154, 283, 0, 136, 0, + 149, 150, 151, 152, 153, 154, 437, 0, 0, 0, + 0, 438, 0, 0, 0, 0, 136, 0, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 439, 0, 0, 0, 0, 440, 0, 0, 0, 0, + 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 278, 0, 147, 148, 149, 150, + 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 279, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, - 153, 154, 135, 136, 0, 0, 137, 138, 139, 140, + 0, 0, 175, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 136, 0, 0, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 403, 0, 147, 148, + 149, 150, 151, 152, 153, 154, 136, 0, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 405, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 409, 0, 147, 148, 149, 150, + 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 136, 0, + 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 434, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 136, 0, 0, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 446, 0, 147, 148, + 149, 150, 151, 152, 153, 154, 136, 0, 0, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 448, 0, 147, 148, 149, 150, 151, 152, 153, 154, + 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 469, 0, 147, 148, 149, 150, + 151, 152, 153, 154, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 286, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 346, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 349, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 352, 0, + 0, 0, 0, 0, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 353, 0, + 0, 0, 0, 136, 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 147, - 148, 149, 150, 151, 152, 153, 154, 350, 136, 0, - 0, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, - 153, 154, 364, 136, 0, 0, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 136, 0, 0, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 0, 0, 0, - 0, 0, 147, 148, 149, 150, 151, 152, 153, 154, - 137, 138, 0, 140, 141, 142, 143, 144, 145, 146, - 137, 138, 0, 0, 141, 142, 143, 144, 145, 146, + 148, 149, 150, 151, 152, 153, 154, 285, 0, 136, + 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 147, 148, 149, 150, 151, + 152, 153, 154, 135, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 147, 148, 149, 150, 151, 152, 153, 154, 359, 136, + 0, 0, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 147, 148, 149, 150, 151, + 152, 153, 154, 373, 136, 0, 0, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 136, 0, 0, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 0, 0, 147, 148, 149, 150, 151, 152, 153, - 154, 137, 138, 0, 0, 141, 142, 143, 144, 145, + 154, 137, 138, 0, 140, 141, 142, 143, 144, 145, 146, 137, 138, 0, 0, 141, 142, 143, 144, 145, - 146, 0, 0, 0, 0, 148, 149, 150, 151, 152, - 153, 154, 0, 0, 0, 0, 0, 150, 151, 152, - 153, 154 + 146, 0, 0, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 0, 0, 147, 148, 149, 150, 151, 152, + 153, 154, 137, 138, 0, 0, 141, 142, 143, 144, + 145, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 148, 149, 150, 151, + 152, 153, 154 }; const short parser::yycheck_[] = { - 0, 98, 21, 297, 49, 78, 297, 54, 297, 9, - 3, 4, 11, 12, 13, 14, 15, 64, 78, 30, - 40, 41, 53, 43, 47, 54, 26, 47, 48, 49, - 50, 51, 54, 47, 54, 35, 36, 0, 58, 64, - 47, 58, 35, 36, 101, 47, 95, 53, 47, 60, - 50, 58, 101, 53, 127, 104, 58, 55, 80, 55, - 53, 55, 60, 55, 60, 110, 60, 127, 60, 40, - 41, 55, 43, 99, 100, 64, 47, 100, 78, 99, - 100, 54, 54, 103, 104, 78, 100, 58, 100, 55, - 61, 56, 99, 100, 60, 66, 67, 99, 100, 99, - 55, 100, 55, 55, 62, 60, 62, 60, 60, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 55, 55, 96, 97, 98, 60, 60, 127, 99, 100, - 55, 55, 163, 53, 127, 60, 60, 55, 64, 58, - 434, 54, 60, 434, 160, 434, 40, 41, 62, 43, - 58, 167, 54, 47, 170, 62, 60, 163, 58, 58, - 54, 161, 59, 163, 58, 54, 62, 61, 168, 100, - 163, 171, 54, 64, 54, 40, 41, 54, 43, 210, - 54, 54, 47, 183, 215, 94, 95, 96, 97, 98, - 54, 63, 54, 58, 267, 64, 61, 64, 229, 230, - 54, 220, 233, 64, 210, 99, 100, 267, 64, 215, - 210, 64, 64, 64, 64, 215, 54, 210, 54, 59, - 55, 27, 215, 229, 230, 27, 104, 233, 54, 229, - 230, 63, 63, 233, 99, 100, 229, 230, 311, 312, - 233, 54, 54, 163, 54, 59, 48, 54, 59, 51, - 52, 311, 312, 54, 59, 64, 64, 54, 289, 54, - 54, 64, 25, 30, 64, 64, 297, 267, 64, 55, - 286, 64, 64, 64, 267, 64, 55, 210, 55, 55, - 64, 64, 215, 289, 64, 9, 359, 9, 9, 289, - 210, 297, 233, 309, 310, 215, 289, 297, 298, 359, - 397, 434, 53, 53, 297, 107, 108, -1, 110, 229, - 230, 311, 312, 233, 220, -1, 118, -1, 311, 312, - -1, -1, -1, 339, -1, -1, 342, 53, -1, -1, - -1, -1, -1, 53, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, -1, -1, 289, -1, -1, 359, - 391, -1, 393, -1, 166, -1, 359, 169, -1, 289, - 172, -1, 388, -1, 176, -1, 178, 297, 423, 181, - 425, -1, 427, -1, -1, 391, -1, 393, 404, -1, - 406, 391, 408, 393, -1, -1, 396, -1, 391, -1, - 393, 432, -1, 434, 435, -1, -1, -1, -1, 211, - -1, -1, 163, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 224, -1, 455, 456, 432, -1, 434, 435, - -1, -1, 432, -1, 434, 435, -1, 163, 53, 432, - -1, 434, 435, 163, 53, -1, -1, -1, -1, 455, - 456, 53, -1, -1, -1, 455, 456, -1, 391, 210, - 393, -1, 455, 456, 215, -1, -1, -1, -1, -1, - -1, 391, -1, 393, -1, -1, -1, -1, 229, 230, - -1, 283, 233, -1, 210, -1, -1, -1, -1, 215, - 210, -1, 294, -1, 296, 215, -1, 299, -1, 432, - -1, -1, 435, 229, 230, -1, -1, 233, -1, 229, - 230, -1, 432, 233, 434, 435, -1, -1, -1, -1, - -1, -1, 455, 456, 326, 327, 328, 329, 330, 331, - 332, 333, 334, 335, 336, 455, 456, -1, 289, -1, - -1, -1, 344, -1, -1, -1, 297, -1, 163, -1, - -1, -1, 40, 41, 163, 43, -1, -1, -1, 47, - -1, 163, -1, 289, -1, 367, 368, 369, 370, 289, - 58, 297, -1, 61, -1, -1, -1, 297, 40, 41, - -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, - 392, -1, 394, 395, -1, 210, 58, -1, -1, -1, - 215, 210, -1, -1, 66, 67, 215, -1, 210, -1, - -1, 99, 100, 215, 229, 230, -1, -1, 233, -1, - 229, 230, -1, -1, 233, -1, -1, 229, 230, 68, - 69, 233, -1, -1, 436, -1, -1, 99, 100, -1, - 391, -1, 393, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, 94, 95, 96, 97, 98, - -1, 58, -1, -1, -1, 391, -1, 393, -1, -1, - -1, 391, -1, 393, 289, -1, -1, -1, -1, -1, - 289, 432, 297, 434, 435, -1, -1, 289, 297, -1, - -1, -1, 68, 69, -1, 297, 72, 73, 74, 75, - 76, 77, 99, 100, 455, 456, 432, -1, 434, 435, - -1, -1, 432, -1, 434, 435, 92, 16, 94, 95, - 96, 97, 98, -1, -1, -1, -1, -1, -1, 455, - 456, -1, -1, -1, -1, 455, 456, -1, -1, -1, - -1, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, -1, -1, -1, 58, - 59, -1, -1, 62, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 391, -1, 393, 78, - 79, -1, 391, -1, 393, -1, 68, 69, -1, 391, - -1, 393, 74, 75, 76, 77, 95, -1, -1, 98, - 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, - -1, -1, 94, 95, 96, 97, 98, 432, -1, 434, - 435, -1, -1, 432, -1, 434, 435, -1, -1, -1, - 432, -1, 434, 435, -1, -1, -1, -1, -1, -1, - 455, 456, -1, -1, 11, -1, 455, 456, -1, -1, - -1, -1, 19, 455, 456, 22, 23, 24, -1, 26, - 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, - 47, 48, 49, 50, 51, -1, -1, -1, -1, 56, - 57, 58, -1, -1, -1, -1, -1, -1, 11, 66, - 67, -1, -1, -1, -1, -1, 19, -1, -1, 22, - 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, - 43, -1, 99, 100, 47, 48, 49, 50, 51, -1, - -1, -1, -1, 56, 57, 58, -1, -1, -1, -1, - -1, -1, -1, 66, 67, -1, -1, -1, -1, 40, - 41, -1, 43, -1, -1, -1, 47, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 58, 12, -1, - 61, -1, -1, -1, -1, 19, 99, 100, 22, 23, - 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, - -1, -1, -1, 47, 48, 49, 50, 51, 99, 100, - -1, -1, 56, -1, 58, -1, -1, -1, -1, -1, - -1, -1, 66, 67, -1, -1, -1, -1, 40, 41, - -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 58, 12, -1, 61, - -1, -1, -1, -1, 19, 99, 100, 22, 23, 24, - -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, -1, 43, 16, - -1, -1, 47, 48, 49, 50, 51, 99, 100, -1, - -1, 56, -1, 58, -1, -1, -1, -1, -1, -1, - -1, 66, 67, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, -1, -1, - -1, 58, -1, -1, -1, 62, -1, 64, -1, 40, - 41, -1, 43, -1, 99, 100, 47, -1, -1, -1, - -1, 78, 79, -1, 16, -1, -1, 58, -1, -1, - 61, -1, -1, -1, -1, -1, -1, -1, 95, -1, - -1, 98, 99, 100, 101, 102, 103, 104, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, -1, -1, -1, 58, -1, 99, 100, - 62, -1, -1, 40, 41, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, 78, 79, -1, 16, - -1, 58, -1, -1, 61, -1, -1, -1, -1, -1, - -1, -1, -1, 95, -1, -1, 98, 99, 100, 101, - 102, 103, 104, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, -1, -1, - -1, 58, 99, 100, -1, 62, -1, 17, 18, -1, - 20, 21, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 78, 79, -1, -1, -1, -1, -1, -1, -1, - 40, 41, -1, 43, -1, -1, -1, 47, 95, -1, - -1, 98, 99, 100, 101, 102, 103, 104, 58, -1, - -1, 61, -1, -1, -1, -1, 66, 67, -1, -1, + 0, 98, 49, 21, 299, 78, 47, 299, 299, 9, + 3, 4, 78, 11, 12, 13, 14, 15, 30, 54, + 47, 47, 54, 160, 55, 54, 26, 0, 47, 60, + 167, 58, 64, 170, 64, 35, 36, 40, 41, 58, + 43, 55, 35, 36, 47, 80, 60, 53, 60, 47, + 50, 54, 101, 53, 127, 58, 95, 64, 61, 100, + 53, 127, 101, 110, 54, 104, 210, 59, 60, 59, + 60, 215, 99, 100, 100, 99, 100, 55, 78, 55, + 99, 100, 60, 55, 60, 78, 55, 55, 60, 55, + 55, 60, 60, 11, 60, 60, 99, 100, 55, 99, + 55, 19, 100, 60, 22, 23, 24, 55, 26, 27, + 28, 29, 60, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 58, 43, 54, 127, 54, 47, + 48, 49, 50, 51, 127, 62, 55, 100, 56, 57, + 58, 60, 96, 97, 98, 55, 62, 291, 66, 67, + 60, 288, 447, 64, 53, 447, 447, 163, 56, 40, + 41, 161, 43, 163, 59, 60, 47, 58, 168, 54, + 163, 171, 59, 60, 311, 312, 62, 58, 58, 54, + 61, 99, 100, 183, 62, 94, 95, 96, 97, 98, + 40, 41, 58, 43, 58, 60, 269, 47, 48, 49, + 50, 51, 220, 269, 210, 59, 62, 54, 58, 215, + 210, 348, 100, 54, 351, 215, 64, 210, 99, 100, + 54, 54, 215, 229, 230, 231, 54, 27, 234, 229, + 230, 231, 54, 54, 234, 64, 229, 230, 231, 64, + 63, 234, 54, 54, 68, 69, 319, 320, 48, 99, + 100, 51, 52, 319, 320, 64, 64, 64, 64, 403, + 64, 405, 64, 400, 163, 80, 54, 54, 59, 269, + 94, 95, 96, 97, 98, 55, 269, 27, 104, 63, + 417, 63, 419, 54, 421, 291, 54, 54, 54, 59, + 59, 291, 54, 299, 59, 368, 54, 54, 291, 299, + 300, 445, 368, 64, 448, 64, 299, 107, 108, 54, + 110, 210, 409, 54, 25, 64, 215, 64, 118, 319, + 320, 64, 30, 55, 468, 469, 319, 320, 64, 64, + 229, 230, 231, 64, 64, 234, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 55, 64, 55, 55, + 64, 64, 64, 9, 9, 9, 166, 234, 368, 169, + 447, 377, 172, 377, 53, 368, 176, 377, 178, -1, + 220, 181, -1, -1, 377, -1, -1, -1, -1, 436, + 53, 438, 291, 440, -1, -1, -1, 403, -1, 405, + 299, -1, -1, 403, -1, 405, -1, -1, 408, -1, + 403, 211, 405, -1, -1, 53, -1, -1, -1, -1, + -1, 53, 40, 41, 224, 43, -1, -1, -1, 47, + 48, 49, 50, 51, -1, -1, -1, -1, -1, 445, + 58, 447, 448, -1, -1, 445, 53, 447, 448, -1, + -1, -1, 445, -1, 447, 448, -1, -1, -1, -1, + -1, -1, 468, 469, -1, -1, -1, -1, 468, 469, + 40, 41, -1, 43, -1, 468, 469, 47, 377, -1, + -1, 99, 100, -1, -1, 285, -1, -1, 58, -1, + -1, 61, -1, -1, -1, 53, 296, -1, 298, -1, + 163, 301, -1, -1, 403, -1, 405, -1, -1, -1, + -1, -1, -1, 313, -1, -1, -1, -1, -1, -1, + 53, -1, -1, -1, -1, 163, -1, -1, 328, 99, + 100, 163, -1, -1, -1, 335, 336, 337, 338, 339, + 340, 341, 342, 343, 344, 345, 445, 210, 447, 448, + -1, -1, 215, 353, 53, -1, 163, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 229, 230, 231, 468, + 469, 234, 210, -1, -1, -1, -1, 215, 210, 379, + 380, 381, 382, 215, -1, -1, -1, -1, -1, -1, + -1, 229, 230, 231, -1, -1, 234, 229, 230, 231, + -1, -1, 234, 210, 404, 163, 406, 407, 215, -1, + -1, 68, 69, -1, -1, 72, 73, 74, 75, 76, + 77, -1, 229, 230, 231, -1, -1, 234, 291, -1, + 163, -1, -1, -1, -1, 92, 299, 94, 95, 96, + 97, 98, -1, -1, 40, 41, -1, 43, -1, 449, + -1, 47, 210, 291, -1, -1, -1, 215, -1, 291, + -1, 299, 58, -1, 163, 61, -1, 299, -1, -1, + -1, 229, 230, 231, -1, -1, 234, 210, -1, -1, + -1, -1, 215, -1, 291, -1, -1, 40, 41, -1, + 43, -1, 299, -1, 47, -1, 229, 230, 231, -1, + -1, 234, -1, 99, 100, 58, -1, -1, 61, -1, + -1, 210, -1, -1, 377, -1, 215, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, -1, -1, -1, -1, -1, -1, -1, 19, 99, - 100, 22, 23, 24, -1, 26, 27, 28, 29, -1, + 229, 230, 231, 291, -1, 234, -1, -1, -1, 377, + 403, 299, 405, -1, -1, 377, 99, 100, 68, 69, + -1, -1, 72, 73, 74, 75, 76, 77, 291, -1, + -1, -1, -1, -1, -1, 403, 299, 405, -1, -1, + 377, 403, -1, 405, 94, 95, 96, 97, 98, -1, + -1, -1, 445, -1, 447, 448, -1, -1, -1, -1, + 40, 41, 291, 43, -1, -1, 403, 47, 405, -1, + 299, -1, -1, -1, -1, 468, 469, 445, 58, 447, + 448, 61, -1, 445, -1, 447, 448, -1, -1, 377, + -1, -1, -1, -1, -1, -1, 68, 69, -1, -1, + 468, 469, 74, 75, 76, 77, 468, 469, 445, -1, + 447, 448, -1, -1, 377, 403, -1, 405, -1, 99, + 100, -1, 94, 95, 96, 97, 98, 40, 41, -1, + 43, 468, 469, -1, 47, 48, 49, 50, 51, -1, + 403, 54, 405, 40, 41, 58, 43, -1, 377, -1, + 47, 48, 49, 50, 51, -1, -1, 445, -1, 447, + 448, 58, -1, -1, -1, -1, -1, -1, -1, 66, + 67, -1, -1, -1, 403, -1, 405, -1, -1, -1, + 468, 469, 445, -1, 447, 448, 99, 100, -1, -1, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 99, 100, -1, 468, 469, -1, -1, -1, + -1, -1, -1, -1, 40, 41, 445, 43, 447, 448, + -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, + 11, -1, 58, -1, -1, 61, -1, -1, 19, 468, + 469, 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, -1, -1, -1, 47, 48, 49, 50, - 51, 40, 41, -1, 43, 56, -1, 58, 47, -1, - 40, 41, -1, 43, -1, 66, 67, 47, -1, 58, - 40, 41, 61, 43, -1, -1, -1, 47, 58, 40, - 41, 61, 43, -1, -1, -1, 47, -1, 58, -1, - -1, 61, -1, -1, -1, -1, -1, 58, 99, 100, - 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 99, 100, -1, -1, -1, -1, -1, -1, -1, 99, - 100, -1, -1, -1, -1, -1, -1, 55, -1, 99, - 100, -1, 60, -1, -1, -1, -1, 65, 99, 100, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 55, -1, -1, -1, -1, 60, -1, -1, -1, - -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 91, 92, 93, - 94, 95, 96, 97, 98, 55, -1, -1, -1, -1, - 60, -1, -1, -1, -1, 65, -1, -1, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, 92, 93, 94, 95, 96, 97, 98, 55, - -1, -1, -1, -1, 60, -1, -1, -1, -1, 65, - -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 55, -1, 91, 92, 93, 94, 95, - 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 55, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 65, -1, -1, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 55, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 65, -1, -1, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 55, -1, 91, 92, 93, - 94, 95, 96, 97, 98, 65, -1, -1, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, - -1, 91, 92, 93, 94, 95, 96, 97, 98, 65, - -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 55, -1, 91, 92, 93, 94, 95, - 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 55, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 65, -1, -1, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 55, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 65, -1, -1, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 55, -1, 91, 92, 93, - 94, 95, 96, 97, 98, 65, -1, -1, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, - -1, 91, 92, 93, 94, 95, 96, 97, 98, 65, - -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 55, -1, 91, 92, 93, 94, 95, - 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 59, -1, -1, - -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 60, -1, -1, + 51, -1, -1, 99, 100, 56, 57, 58, -1, -1, + -1, -1, -1, -1, -1, 66, 67, -1, -1, -1, + -1, 40, 41, -1, 43, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 58, + 12, -1, 61, -1, -1, -1, -1, 19, 99, 100, + 22, 23, 24, -1, 26, 27, 28, 29, -1, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + -1, 43, -1, -1, -1, 47, 48, 49, 50, 51, + 99, 100, -1, -1, 56, -1, 58, -1, -1, -1, + -1, -1, -1, -1, 66, 67, -1, -1, -1, -1, + 40, 41, -1, 43, -1, -1, -1, 47, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 58, 12, + -1, 61, -1, -1, -1, -1, 19, 99, 100, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, 16, -1, -1, 47, 48, 49, 50, 51, 99, + 100, -1, -1, 56, -1, 58, -1, -1, -1, -1, + -1, -1, -1, 66, 67, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + -1, -1, -1, 58, 59, -1, -1, 62, -1, -1, + -1, 40, 41, -1, 43, -1, 99, 100, 47, -1, + -1, -1, -1, 78, 79, -1, 16, -1, -1, 58, + -1, -1, 61, -1, -1, -1, -1, -1, -1, -1, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, -1, -1, -1, 58, -1, + 99, 100, 62, -1, 64, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, 78, 79, + -1, 16, -1, 58, -1, -1, 61, -1, -1, -1, + -1, -1, -1, -1, -1, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 59, -1, -1, 58, 99, 100, 65, 62, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, 78, 79, -1, 16, -1, -1, -1, + -1, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, -1, -1, -1, 58, -1, + -1, -1, 62, -1, 17, 18, -1, 20, 21, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, + -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + 43, -1, -1, -1, 47, 95, -1, -1, 98, 99, + 100, 101, 102, 103, 104, 58, -1, -1, 61, -1, + -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, -1, -1, + -1, -1, -1, -1, -1, 19, 99, 100, 22, 23, + 24, -1, 26, 27, 28, 29, -1, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, -1, 43, + -1, -1, -1, 47, 48, 49, 50, 51, -1, -1, + -1, -1, 56, -1, 58, -1, -1, 40, 41, -1, + 43, -1, 66, 67, 47, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 58, -1, -1, 61, -1, + -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 99, 100, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 55, -1, + -1, -1, -1, 60, -1, -1, 99, 100, 65, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 55, -1, -1, -1, -1, 60, -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, 92, - 93, 94, 95, 96, 97, 98, 63, -1, 65, -1, + 93, 94, 95, 96, 97, 98, 55, -1, -1, -1, + -1, 60, -1, -1, -1, -1, 65, -1, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 55, -1, -1, -1, -1, 60, -1, -1, -1, -1, + 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 55, -1, 91, 92, 93, 94, + 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, - 97, 98, 64, 65, -1, -1, 68, 69, 70, 71, + -1, -1, 55, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 65, -1, -1, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 55, -1, 91, 92, + 93, 94, 95, 96, 97, 98, 65, -1, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 55, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 55, -1, 91, 92, 93, 94, + 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 65, -1, + -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 55, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 65, -1, -1, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 55, -1, 91, 92, + 93, 94, 95, 96, 97, 98, 65, -1, -1, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 55, -1, 91, 92, 93, 94, 95, 96, 97, 98, + 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 55, -1, 91, 92, 93, 94, + 95, 96, 97, 98, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 59, -1, + -1, -1, -1, -1, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 60, -1, + -1, -1, -1, 65, -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 91, - 92, 93, 94, 95, 96, 97, 98, 64, 65, -1, - -1, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, - 97, 98, 64, 65, -1, -1, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 65, -1, -1, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 91, - 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, - -1, -1, 91, 92, 93, 94, 95, 96, 97, 98, - 68, 69, -1, 71, 72, 73, 74, 75, 76, 77, - 68, 69, -1, -1, 72, 73, 74, 75, 76, 77, + 92, 93, 94, 95, 96, 97, 98, 63, -1, 65, + -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 91, 92, 93, 94, 95, + 96, 97, 98, 64, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 91, 92, 93, 94, 95, 96, 97, 98, 64, 65, + -1, -1, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 91, 92, 93, 94, 95, + 96, 97, 98, 64, 65, -1, -1, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 65, -1, -1, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 91, 92, 93, 94, 95, 96, 97, 98, -1, -1, -1, -1, -1, 91, 92, 93, 94, 95, 96, 97, - 98, -1, -1, 91, 92, 93, 94, 95, 96, 97, - 98, 68, 69, -1, -1, 72, 73, 74, 75, 76, + 98, 68, 69, -1, 71, 72, 73, 74, 75, 76, 77, 68, 69, -1, -1, 72, 73, 74, 75, 76, - 77, -1, -1, -1, -1, 92, 93, 94, 95, 96, - 97, 98, -1, -1, -1, -1, -1, 94, 95, 96, - 97, 98 + 77, -1, -1, -1, 91, 92, 93, 94, 95, 96, + 97, 98, -1, -1, 91, 92, 93, 94, 95, 96, + 97, 98, 68, 69, -1, -1, 72, 73, 74, 75, + 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 92, 93, 94, 95, + 96, 97, 98 }; const unsigned char parser::yystos_[] = { 0, 11, 12, 13, 14, 15, 47, 100, 116, 117, - 118, 119, 120, 121, 122, 123, 192, 99, 100, 193, - 193, 54, 0, 118, 119, 120, 54, 80, 64, 64, - 101, 195, 171, 192, 16, 40, 41, 42, 43, 44, + 118, 119, 120, 121, 122, 123, 195, 99, 100, 196, + 196, 54, 0, 118, 119, 120, 54, 80, 64, 64, + 101, 198, 171, 195, 16, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 58, 62, 78, 79, 95, 98, 100, 102, 103, 104, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 55, 55, 60, - 58, 192, 193, 58, 192, 193, 58, 54, 54, 155, - 58, 59, 155, 172, 173, 192, 155, 155, 54, 58, - 103, 104, 166, 167, 177, 178, 180, 181, 185, 186, - 187, 188, 192, 193, 100, 64, 65, 68, 69, 70, + 170, 174, 175, 176, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 55, 55, 60, + 58, 195, 196, 58, 195, 196, 58, 54, 54, 155, + 58, 59, 155, 172, 173, 195, 155, 155, 54, 58, + 103, 104, 166, 167, 180, 181, 183, 184, 188, 189, + 190, 191, 195, 196, 100, 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 91, 92, 93, - 94, 95, 96, 97, 98, 58, 61, 168, 169, 192, - 54, 62, 64, 56, 129, 192, 58, 54, 62, 58, + 94, 95, 96, 97, 98, 58, 61, 168, 169, 195, + 54, 62, 64, 56, 129, 195, 58, 54, 62, 58, 54, 62, 58, 155, 155, 55, 60, 155, 60, 59, 155, 58, 61, 62, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 47, 100, 191, 172, 173, 192, + 155, 155, 155, 155, 47, 100, 194, 172, 173, 195, 11, 19, 22, 23, 24, 26, 27, 28, 29, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 57, 66, - 67, 124, 125, 127, 128, 129, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 157, 158, 159, 166, 167, 177, 178, 181, 192, 155, - 172, 192, 155, 172, 192, 155, 55, 55, 155, 59, - 155, 155, 192, 63, 59, 55, 54, 12, 124, 126, - 155, 64, 54, 64, 54, 124, 54, 54, 54, 54, - 95, 195, 198, 63, 64, 64, 64, 155, 64, 54, - 54, 181, 181, 57, 125, 64, 64, 64, 64, 64, - 17, 18, 20, 21, 66, 67, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 59, 55, 54, - 59, 55, 54, 59, 60, 59, 155, 172, 12, 124, - 64, 55, 155, 27, 155, 130, 157, 158, 159, 181, - 192, 155, 63, 63, 64, 172, 172, 54, 54, 54, - 54, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 59, 172, 59, 172, 59, 155, 54, 55, - 64, 55, 54, 55, 64, 30, 60, 55, 55, 55, - 155, 155, 155, 155, 54, 55, 54, 55, 54, 55, - 172, 124, 155, 124, 155, 156, 155, 192, 129, 64, - 64, 55, 55, 60, 55, 60, 55, 60, 172, 172, - 172, 55, 25, 55, 64, 55, 30, 64, 64, 173, - 64, 173, 64, 173, 55, 55, 55, 124, 64, 130, - 124, 155, 55, 55, 55, 55, 55, 64, 64, 64, - 124, 124 + 32, 33, 34, 35, 36, 37, 38, 39, 57, 58, + 66, 67, 124, 125, 127, 128, 129, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 157, 158, 159, 166, 167, 177, 180, 181, 184, + 195, 155, 172, 195, 155, 172, 195, 155, 55, 55, + 155, 59, 155, 155, 195, 63, 59, 55, 54, 12, + 124, 126, 155, 64, 54, 64, 54, 124, 54, 54, + 54, 54, 95, 198, 201, 63, 64, 64, 64, 155, + 64, 54, 54, 58, 178, 179, 180, 181, 195, 184, + 184, 57, 125, 64, 64, 64, 64, 64, 80, 17, + 18, 20, 21, 66, 67, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 59, 55, 54, 59, + 55, 54, 59, 60, 59, 155, 172, 12, 124, 64, + 55, 155, 27, 155, 130, 157, 158, 159, 184, 195, + 155, 63, 63, 64, 172, 172, 59, 60, 155, 54, + 54, 54, 54, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 155, 59, 172, 59, 172, 59, 155, + 54, 55, 64, 55, 54, 55, 64, 30, 60, 55, + 55, 55, 179, 155, 155, 155, 155, 54, 55, 54, + 55, 54, 55, 172, 124, 155, 124, 155, 156, 155, + 195, 129, 64, 64, 55, 55, 60, 55, 60, 55, + 60, 172, 172, 172, 55, 25, 55, 64, 55, 30, + 64, 64, 173, 64, 173, 64, 173, 55, 55, 55, + 124, 64, 130, 124, 155, 55, 55, 55, 55, 55, + 64, 64, 64, 124, 124 }; const unsigned char @@ -4608,19 +4696,20 @@ namespace xsk { namespace gsc { namespace s4 { 137, 137, 138, 139, 139, 140, 141, 142, 143, 144, 145, 145, 146, 147, 147, 148, 149, 150, 151, 151, 152, 153, 154, 155, 155, 155, 156, 156, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, - 158, 159, 159, 160, 161, 161, 161, 161, 161, 161, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 158, 158, 159, 159, 160, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 162, 162, 162, 162, 162, 162, 162, 162, + 161, 161, 161, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 163, 164, 164, 164, 164, 165, 166, 166, - 167, 167, 168, 168, 168, 168, 168, 168, 169, 169, - 169, 169, 170, 171, 171, 171, 172, 172, 173, 173, - 174, 175, 176, 176, 177, 178, 179, 180, 181, 181, - 181, 181, 181, 181, 181, 181, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 192, 193, - 193, 194, 195, 196, 197, 197, 198, 198, 199, 200 + 162, 162, 162, 163, 164, 164, 164, 164, 165, 166, + 166, 167, 167, 168, 168, 168, 168, 168, 168, 169, + 169, 169, 169, 170, 171, 171, 171, 172, 172, 173, + 173, 174, 175, 176, 176, 177, 178, 178, 179, 179, + 179, 180, 181, 182, 183, 184, 184, 184, 184, 184, + 184, 184, 184, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 195, 196, 196, 197, 198, + 199, 200, 200, 201, 201, 202, 203 }; const signed char @@ -4636,19 +4725,20 @@ namespace xsk { namespace gsc { namespace s4 { 8, 6, 2, 2, 4, 5, 7, 5, 7, 9, 7, 9, 5, 3, 3, 2, 2, 2, 3, 2, 2, 5, 5, 1, 1, 1, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, - 2, 2, 4, 6, 5, 7, 5, 7, 8, 9, - 9, 9, 3, 3, 1, 0, 1, 0, 3, 1, - 4, 4, 2, 3, 4, 3, 3, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 7, 2, 1, 2, 1, 1, 1 + 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, + 1, 2, 2, 4, 6, 5, 7, 5, 7, 8, + 9, 9, 9, 3, 3, 1, 0, 1, 0, 3, + 1, 4, 4, 2, 3, 3, 3, 1, 1, 1, + 1, 4, 3, 3, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 7, 2, 1, 2, 1, 1, 1 }; @@ -4658,29 +4748,30 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yyrline_[] = { - 0, 264, 264, 265, 269, 271, 273, 275, 277, 279, - 284, 288, 293, 294, 295, 296, 297, 301, 306, 311, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, - 336, 337, 338, 339, 340, 344, 345, 349, 351, 356, - 358, 363, 364, 368, 369, 373, 375, 377, 380, 384, - 386, 391, 393, 395, 400, 405, 407, 412, 417, 419, - 424, 426, 431, 436, 438, 443, 448, 453, 458, 463, - 468, 470, 475, 480, 482, 487, 492, 497, 502, 504, - 509, 514, 519, 524, 525, 526, 530, 531, 535, 537, - 539, 541, 543, 545, 547, 549, 551, 553, 555, 560, - 562, 567, 569, 574, 579, 581, 583, 585, 587, 589, - 591, 593, 595, 597, 599, 601, 603, 605, 607, 609, - 611, 613, 618, 619, 620, 621, 622, 623, 624, 625, - 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, - 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, - 646, 647, 651, 656, 658, 660, 662, 667, 672, 673, - 676, 677, 681, 683, 685, 687, 689, 691, 696, 698, - 700, 702, 707, 712, 714, 717, 721, 724, 728, 730, - 735, 740, 745, 747, 752, 757, 762, 767, 772, 773, - 774, 775, 776, 777, 778, 779, 780, 784, 789, 794, - 799, 804, 809, 814, 819, 824, 829, 834, 836, 841, - 843, 848, 853, 858, 863, 865, 870, 872, 877, 882 + 0, 267, 267, 268, 272, 274, 276, 278, 280, 282, + 287, 291, 296, 297, 298, 299, 300, 304, 309, 314, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, + 339, 340, 341, 342, 343, 347, 348, 352, 354, 359, + 361, 366, 367, 371, 372, 376, 378, 380, 383, 387, + 389, 394, 396, 398, 403, 408, 410, 415, 420, 422, + 427, 429, 434, 439, 441, 446, 451, 456, 461, 466, + 471, 473, 478, 483, 485, 490, 495, 500, 505, 507, + 512, 517, 522, 527, 528, 529, 533, 534, 538, 540, + 542, 544, 546, 548, 550, 552, 554, 556, 558, 560, + 565, 567, 572, 574, 579, 584, 586, 588, 590, 592, + 594, 596, 598, 600, 602, 604, 606, 608, 610, 612, + 614, 616, 618, 623, 624, 625, 626, 627, 628, 629, + 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, + 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, + 650, 651, 652, 656, 661, 663, 665, 667, 672, 677, + 678, 681, 682, 686, 688, 690, 692, 694, 696, 701, + 703, 705, 707, 712, 717, 719, 722, 726, 729, 733, + 735, 740, 745, 750, 752, 757, 762, 764, 769, 770, + 771, 775, 780, 785, 790, 795, 796, 797, 798, 799, + 800, 801, 802, 803, 807, 812, 817, 822, 827, 832, + 837, 842, 847, 852, 857, 859, 864, 866, 871, 876, + 881, 886, 888, 893, 895, 900, 905 }; void @@ -4713,9 +4804,9 @@ namespace xsk { namespace gsc { namespace s4 { #line 13 "parser.ypp" } } } // xsk::gsc::s4 -#line 4717 "parser.cpp" +#line 4808 "parser.cpp" -#line 886 "parser.ypp" +#line 909 "parser.ypp" void xsk::gsc::s4::parser::error(const xsk::gsc::location& loc, const std::string& msg) diff --git a/src/s4/xsk/parser.hpp b/src/s4/xsk/parser.hpp index 6dfff086..db2999ae 100644 --- a/src/s4/xsk/parser.hpp +++ b/src/s4/xsk/parser.hpp @@ -446,6 +446,8 @@ namespace xsk { namespace gsc { namespace s4 { // expr_ternary // expr_binary // expr_primitive + // expr_tuple + // expr_tuple_types // expr_object char dummy6[sizeof (ast::expr)]; @@ -544,104 +546,107 @@ namespace xsk { namespace gsc { namespace s4 { // expr_true char dummy37[sizeof (ast::expr_true::ptr)]; + // expr_tuple_arguments + char dummy38[sizeof (ast::expr_tuple::ptr)]; + // expr_undefined - char dummy38[sizeof (ast::expr_undefined::ptr)]; + char dummy39[sizeof (ast::expr_undefined::ptr)]; // expr_vector - char dummy39[sizeof (ast::expr_vector::ptr)]; + char dummy40[sizeof (ast::expr_vector::ptr)]; // include - char dummy40[sizeof (ast::include::ptr)]; + char dummy41[sizeof (ast::include::ptr)]; // program - char dummy41[sizeof (ast::program::ptr)]; + char dummy42[sizeof (ast::program::ptr)]; // stmt // stmt_or_dev - char dummy42[sizeof (ast::stmt)]; + char dummy43[sizeof (ast::stmt)]; // stmt_assign - char dummy43[sizeof (ast::stmt_assign::ptr)]; + char dummy44[sizeof (ast::stmt_assign::ptr)]; // stmt_break - char dummy44[sizeof (ast::stmt_break::ptr)]; + char dummy45[sizeof (ast::stmt_break::ptr)]; // stmt_breakpoint - char dummy45[sizeof (ast::stmt_breakpoint::ptr)]; + char dummy46[sizeof (ast::stmt_breakpoint::ptr)]; // stmt_call - char dummy46[sizeof (ast::stmt_call::ptr)]; + char dummy47[sizeof (ast::stmt_call::ptr)]; // stmt_case - char dummy47[sizeof (ast::stmt_case::ptr)]; + char dummy48[sizeof (ast::stmt_case::ptr)]; // stmt_continue - char dummy48[sizeof (ast::stmt_continue::ptr)]; + char dummy49[sizeof (ast::stmt_continue::ptr)]; // stmt_default - char dummy49[sizeof (ast::stmt_default::ptr)]; + char dummy50[sizeof (ast::stmt_default::ptr)]; // stmt_dev - char dummy50[sizeof (ast::stmt_dev::ptr)]; + char dummy51[sizeof (ast::stmt_dev::ptr)]; // stmt_dowhile - char dummy51[sizeof (ast::stmt_dowhile::ptr)]; + char dummy52[sizeof (ast::stmt_dowhile::ptr)]; // stmt_endon - char dummy52[sizeof (ast::stmt_endon::ptr)]; + char dummy53[sizeof (ast::stmt_endon::ptr)]; // stmt_expr - char dummy53[sizeof (ast::stmt_expr::ptr)]; + char dummy54[sizeof (ast::stmt_expr::ptr)]; // stmt_for - char dummy54[sizeof (ast::stmt_for::ptr)]; + char dummy55[sizeof (ast::stmt_for::ptr)]; // stmt_foreach - char dummy55[sizeof (ast::stmt_foreach::ptr)]; + char dummy56[sizeof (ast::stmt_foreach::ptr)]; // stmt_if - char dummy56[sizeof (ast::stmt_if::ptr)]; + char dummy57[sizeof (ast::stmt_if::ptr)]; // stmt_ifelse - char dummy57[sizeof (ast::stmt_ifelse::ptr)]; + char dummy58[sizeof (ast::stmt_ifelse::ptr)]; // stmt_list // stmt_or_dev_list // stmt_block - char dummy58[sizeof (ast::stmt_list::ptr)]; + char dummy59[sizeof (ast::stmt_list::ptr)]; // stmt_notify - char dummy59[sizeof (ast::stmt_notify::ptr)]; + char dummy60[sizeof (ast::stmt_notify::ptr)]; // stmt_prof_begin - char dummy60[sizeof (ast::stmt_prof_begin::ptr)]; + char dummy61[sizeof (ast::stmt_prof_begin::ptr)]; // stmt_prof_end - char dummy61[sizeof (ast::stmt_prof_end::ptr)]; + char dummy62[sizeof (ast::stmt_prof_end::ptr)]; // stmt_return - char dummy62[sizeof (ast::stmt_return::ptr)]; + char dummy63[sizeof (ast::stmt_return::ptr)]; // stmt_switch - char dummy63[sizeof (ast::stmt_switch::ptr)]; + char dummy64[sizeof (ast::stmt_switch::ptr)]; // stmt_wait - char dummy64[sizeof (ast::stmt_wait::ptr)]; + char dummy65[sizeof (ast::stmt_wait::ptr)]; // stmt_waitframe - char dummy65[sizeof (ast::stmt_waitframe::ptr)]; + char dummy66[sizeof (ast::stmt_waitframe::ptr)]; // stmt_waittill - char dummy66[sizeof (ast::stmt_waittill::ptr)]; + char dummy67[sizeof (ast::stmt_waittill::ptr)]; // stmt_waittillframeend - char dummy67[sizeof (ast::stmt_waittillframeend::ptr)]; + char dummy68[sizeof (ast::stmt_waittillframeend::ptr)]; // stmt_waittillmatch - char dummy68[sizeof (ast::stmt_waittillmatch::ptr)]; + char dummy69[sizeof (ast::stmt_waittillmatch::ptr)]; // stmt_while - char dummy69[sizeof (ast::stmt_while::ptr)]; + char dummy70[sizeof (ast::stmt_while::ptr)]; // "path" // "identifier" @@ -649,7 +654,7 @@ namespace xsk { namespace gsc { namespace s4 { // "localized string" // "float" // "integer" - char dummy70[sizeof (std::string)]; + char dummy71[sizeof (std::string)]; }; /// The size of the largest semantic type. @@ -1009,30 +1014,33 @@ namespace xsk { namespace gsc { namespace s4 { S_expr_isdefined = 174, // expr_isdefined S_expr_istrue = 175, // expr_istrue S_expr_reference = 176, // expr_reference - S_expr_array = 177, // expr_array - S_expr_field = 178, // expr_field - S_expr_size = 179, // expr_size - S_expr_paren = 180, // expr_paren - S_expr_object = 181, // expr_object - S_expr_thisthread = 182, // expr_thisthread - S_expr_empty_array = 183, // expr_empty_array - S_expr_undefined = 184, // expr_undefined - S_expr_game = 185, // expr_game - S_expr_self = 186, // expr_self - S_expr_anim = 187, // expr_anim - S_expr_level = 188, // expr_level - S_expr_animation = 189, // expr_animation - S_expr_animtree = 190, // expr_animtree - S_expr_identifier_nosize = 191, // expr_identifier_nosize - S_expr_identifier = 192, // expr_identifier - S_expr_path = 193, // expr_path - S_expr_istring = 194, // expr_istring - S_expr_string = 195, // expr_string - S_expr_vector = 196, // expr_vector - S_expr_float = 197, // expr_float - S_expr_integer = 198, // expr_integer - S_expr_false = 199, // expr_false - S_expr_true = 200 // expr_true + S_expr_tuple = 177, // expr_tuple + S_expr_tuple_arguments = 178, // expr_tuple_arguments + S_expr_tuple_types = 179, // expr_tuple_types + S_expr_array = 180, // expr_array + S_expr_field = 181, // expr_field + S_expr_size = 182, // expr_size + S_expr_paren = 183, // expr_paren + S_expr_object = 184, // expr_object + S_expr_thisthread = 185, // expr_thisthread + S_expr_empty_array = 186, // expr_empty_array + S_expr_undefined = 187, // expr_undefined + S_expr_game = 188, // expr_game + S_expr_self = 189, // expr_self + S_expr_anim = 190, // expr_anim + S_expr_level = 191, // expr_level + S_expr_animation = 192, // expr_animation + S_expr_animtree = 193, // expr_animtree + S_expr_identifier_nosize = 194, // expr_identifier_nosize + S_expr_identifier = 195, // expr_identifier + S_expr_path = 196, // expr_path + S_expr_istring = 197, // expr_istring + S_expr_string = 198, // expr_string + S_expr_vector = 199, // expr_vector + S_expr_float = 200, // expr_float + S_expr_integer = 201, // expr_integer + S_expr_false = 202, // expr_false + S_expr_true = 203 // expr_true }; }; @@ -1098,6 +1106,8 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (std::move (that.value)); break; @@ -1228,6 +1238,10 @@ namespace xsk { namespace gsc { namespace s4 { value.move< ast::expr_true::ptr > (std::move (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (std::move (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (std::move (that.value)); break; @@ -1909,6 +1923,20 @@ namespace xsk { namespace gsc { namespace s4 { {} #endif +#if 201103L <= YY_CPLUSPLUS + basic_symbol (typename Base::kind_type t, ast::expr_tuple::ptr&& v, location_type&& l) + : Base (t) + , value (std::move (v)) + , location (std::move (l)) + {} +#else + basic_symbol (typename Base::kind_type t, const ast::expr_tuple::ptr& v, const location_type& l) + : Base (t) + , value (v) + , location (l) + {} +#endif + #if 201103L <= YY_CPLUSPLUS basic_symbol (typename Base::kind_type t, ast::expr_undefined::ptr&& v, location_type&& l) : Base (t) @@ -2424,6 +2452,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.template destroy< ast::expr > (); break; @@ -2554,6 +2584,10 @@ switch (yykind) value.template destroy< ast::expr_true::ptr > (); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.template destroy< ast::expr_tuple::ptr > (); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.template destroy< ast::expr_undefined::ptr > (); break; @@ -4925,8 +4959,8 @@ switch (yykind) /// Constants. enum { - yylast_ = 2481, ///< Last index in yytable_. - yynnts_ = 86, ///< Number of nonterminal symbols. + yylast_ = 2542, ///< Last index in yytable_. + yynnts_ = 89, ///< Number of nonterminal symbols. yyfinal_ = 22 ///< Termination state number. }; @@ -4982,6 +5016,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.copy< ast::expr > (YY_MOVE (that.value)); break; @@ -5112,6 +5148,10 @@ switch (yykind) value.copy< ast::expr_true::ptr > (YY_MOVE (that.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.copy< ast::expr_tuple::ptr > (YY_MOVE (that.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.copy< ast::expr_undefined::ptr > (YY_MOVE (that.value)); break; @@ -5312,6 +5352,8 @@ switch (yykind) case symbol_kind::S_expr_ternary: // expr_ternary case symbol_kind::S_expr_binary: // expr_binary case symbol_kind::S_expr_primitive: // expr_primitive + case symbol_kind::S_expr_tuple: // expr_tuple + case symbol_kind::S_expr_tuple_types: // expr_tuple_types case symbol_kind::S_expr_object: // expr_object value.move< ast::expr > (YY_MOVE (s.value)); break; @@ -5442,6 +5484,10 @@ switch (yykind) value.move< ast::expr_true::ptr > (YY_MOVE (s.value)); break; + case symbol_kind::S_expr_tuple_arguments: // expr_tuple_arguments + value.move< ast::expr_tuple::ptr > (YY_MOVE (s.value)); + break; + case symbol_kind::S_expr_undefined: // expr_undefined value.move< ast::expr_undefined::ptr > (YY_MOVE (s.value)); break; @@ -5649,7 +5695,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s4 -#line 5653 "parser.hpp" +#line 5699 "parser.hpp" diff --git a/src/s4/xsk/resolver.cpp b/src/s4/xsk/resolver.cpp index 38701b61..ce90fa91 100644 --- a/src/s4/xsk/resolver.cpp +++ b/src/s4/xsk/resolver.cpp @@ -47,7 +47,7 @@ auto resolver::opcode_id(const std::string& name) -> std::uint8_t return itr->second; } - throw error(utils::string::va("Couldn't resolve opcode id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve opcode id for name '%s'!", name.data())); } auto resolver::opcode_name(std::uint8_t id) -> std::string @@ -59,7 +59,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); + throw error(utils::string::va("couldn't resolve opcode name for id '0x%hhX'!", id)); } auto resolver::function_id(const std::string& name) -> std::uint16_t @@ -76,7 +76,7 @@ auto resolver::function_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin function id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin function id for name '%s'!", name.data())); } auto resolver::function_name(std::uint16_t id) -> std::string @@ -105,7 +105,7 @@ auto resolver::method_id(const std::string& name) -> std::uint16_t return itr->second; } - throw error(utils::string::va("Couldn't resolve builtin method id for name '%s'!", name.data())); + throw error(utils::string::va("couldn't resolve builtin method id for name '%s'!", name.data())); } auto resolver::method_name(std::uint16_t id) -> std::string diff --git a/src/s4/xsk/s4.cpp b/src/s4/xsk/s4.cpp index 270ee73f..fac0b3d8 100644 --- a/src/s4/xsk/s4.cpp +++ b/src/s4/xsk/s4.cpp @@ -212,7 +212,7 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t case opcode::OP_GetVector: return 13; default: - throw error("Couldn't resolve instruction size for " + std::to_string(id)); + throw error("couldn't resolve instruction size for " + std::to_string(id)); } } diff --git a/src/utils/xsk/gsc/nodetree.hpp b/src/utils/xsk/gsc/nodetree.hpp index e83d6780..5ed2fae6 100644 --- a/src/utils/xsk/gsc/nodetree.hpp +++ b/src/utils/xsk/gsc/nodetree.hpp @@ -726,7 +726,7 @@ struct expr_tuple : public node using ptr = std::unique_ptr; std::vector list; - ast::expr temp; + expr temp; expr_tuple(); expr_tuple(const location& loc);