diff --git a/gen/h1/parser.ypp b/gen/h1/parser.ypp index 9ea826b5..7083d3f8 100644 --- a/gen/h1/parser.ypp +++ b/gen/h1/parser.ypp @@ -41,6 +41,14 @@ using namespace xsk::gsc; xsk::gsc::h1::parser::symbol_type H1lex(xsk::gsc::h1::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -283,7 +291,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -293,7 +301,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/h2/parser.ypp b/gen/h2/parser.ypp index 2ce95735..32b5ef5c 100644 --- a/gen/h2/parser.ypp +++ b/gen/h2/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::h2::parser::symbol_type H2lex(xsk::gsc::h2::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -281,7 +289,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -291,7 +299,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/iw5/parser.ypp b/gen/iw5/parser.ypp index 159af2cd..acc6f2ad 100644 --- a/gen/iw5/parser.ypp +++ b/gen/iw5/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::iw5::parser::symbol_type IW5lex(xsk::gsc::iw5::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -279,7 +287,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -289,7 +297,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/iw6/parser.ypp b/gen/iw6/parser.ypp index ed326058..9af9fcde 100644 --- a/gen/iw6/parser.ypp +++ b/gen/iw6/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::iw6::parser::symbol_type IW6lex(xsk::gsc::iw6::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -279,7 +287,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -289,7 +297,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/iw7/parser.ypp b/gen/iw7/parser.ypp index 72ea18d4..03e7c60c 100644 --- a/gen/iw7/parser.ypp +++ b/gen/iw7/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::iw7::parser::symbol_type IW7lex(xsk::gsc::iw7::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -279,7 +287,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -289,7 +297,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/iw8/parser.ypp b/gen/iw8/parser.ypp index 775f2290..2c516ab1 100644 --- a/gen/iw8/parser.ypp +++ b/gen/iw8/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::iw8::parser::symbol_type IW8lex(xsk::gsc::iw8::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -285,7 +293,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -295,7 +303,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/s1/parser.ypp b/gen/s1/parser.ypp index 44ca9b1f..0414d06f 100644 --- a/gen/s1/parser.ypp +++ b/gen/s1/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::s1::parser::symbol_type S1lex(xsk::gsc::s1::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -281,7 +289,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -291,7 +299,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/s2/parser.ypp b/gen/s2/parser.ypp index 6f4cde57..03458e59 100644 --- a/gen/s2/parser.ypp +++ b/gen/s2/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::s2::parser::symbol_type S2lex(xsk::gsc::s2::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -281,7 +289,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -291,7 +299,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/gen/s4/parser.ypp b/gen/s4/parser.ypp index a51657e6..9725a61b 100644 --- a/gen/s4/parser.ypp +++ b/gen/s4/parser.ypp @@ -39,6 +39,14 @@ using namespace xsk::gsc; xsk::gsc::s4::parser::symbol_type S4lex(xsk::gsc::s4::lexer& lexer); } +%token HSDEFINE "#define" +%token HSUNDEF "#undef" +%token HSIFDEF "#ifdef" +%token HSIFNDEF "#ifndef" +%token HSIF "#if" +%token HSELIF "#elif" +%token HSELSE "#else" +%token HSENDIF "#endif" %token DEVBEGIN "/#" %token DEVEND "#/" %token INLINE "#inline" @@ -285,7 +293,7 @@ declaration decl_usingtree : USINGTREE LPAREN expr_string RPAREN SEMICOLON - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($3)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($3)); } ; decl_constant @@ -295,7 +303,7 @@ decl_constant decl_thread : expr_identifier LPAREN expr_parameters RPAREN stmt_block - { lexer.restrict_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } + { lexer.ban_header(@$); $$ = std::make_unique(@$, std::move($1), std::move($3), std::move($5)); } ; stmt diff --git a/src/h1/xsk/lexer.cpp b/src/h1/xsk/lexer.cpp index 9d471e85..5f9018aa 100644 --- a/src/h1/xsk/lexer.cpp +++ b/src/h1/xsk/lexer.cpp @@ -16,57 +16,6 @@ xsk::gsc::h1::parser::symbol_type H1lex(xsk::gsc::h1::lexer& lexer) namespace xsk::gsc::h1 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_waitframe, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -129,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -140,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -151,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -164,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -172,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -193,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type if (header_top_ > 0) pop_header(); else - return h1::parser::make_H1EOF(loc_); + return parser::make_H1EOF(loc_); } reader_.advance(); @@ -211,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return h1::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return h1::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return h1::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -290,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type indev_ = false; reader_.advance(); - return h1::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -303,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return h1::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return h1::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -323,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::h1::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return h1::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return h1::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return h1::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return h1::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return h1::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return h1::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return h1::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return h1::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return h1::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return h1::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return h1::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return h1::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return h1::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return h1::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return h1::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return h1::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return h1::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return h1::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return h1::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return h1::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return h1::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return h1::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return h1::parser::make_OR(loc_); + return parser::make_OR(loc_); - return h1::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return h1::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return h1::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return h1::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return h1::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return h1::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return h1::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return h1::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return h1::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return h1::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return h1::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return h1::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return h1::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return h1::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return h1::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return h1::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return h1::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -496,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return h1::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return h1::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -533,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return h1::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return h1::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::H1UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return h1::parser::make_PATH(xsk::gsc::h1::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return h1::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return h1::parser::make_IDENTIFIER(xsk::gsc::h1::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return h1::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -621,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return h1::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return h1::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -655,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return h1::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -689,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return h1::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -723,176 +683,60 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return h1::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::h1::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return h1::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return h1::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return h1::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return h1::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return h1::parser::make_ENDON(loc_); - case keyword::KW_notify: - return h1::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return h1::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return h1::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return h1::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return h1::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_waitframe: - return h1::parser::make_WAITFRAME(loc_); - case keyword::KW_if: - return h1::parser::make_IF(loc_); - case keyword::KW_else: - return h1::parser::make_ELSE(loc_); - case keyword::KW_do: - return h1::parser::make_DO(loc_); - case keyword::KW_while: - return h1::parser::make_WHILE(loc_); - case keyword::KW_for: - return h1::parser::make_FOR(loc_); - case keyword::KW_foreach: - return h1::parser::make_FOREACH(loc_); - case keyword::KW_in: - return h1::parser::make_IN(loc_); - case keyword::KW_switch: - return h1::parser::make_SWITCH(loc_); - case keyword::KW_case: - return h1::parser::make_CASE(loc_); - case keyword::KW_default: - return h1::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return h1::parser::make_BREAK(loc_); - case keyword::KW_continue: - return h1::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return h1::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return h1::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return h1::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return h1::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return h1::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return h1::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return h1::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return h1::parser::make_CALL(loc_); - case keyword::KW_true: - return h1::parser::make_TRUE(loc_); - case keyword::KW_false: - return h1::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return h1::parser::make_UNDEFINED(loc_); - case keyword::KW_game: - return h1::parser::make_GAME(loc_); - case keyword::KW_self: - return h1::parser::make_SELF(loc_); - case keyword::KW_anim: - return h1::parser::make_ANIM(loc_); - case keyword::KW_level: - return h1::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "waitframe", keyword::KW_waitframe }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "waitframe", parser::token::WAITFRAME }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::h1 diff --git a/src/h1/xsk/lexer.hpp b/src/h1/xsk/lexer.hpp index 8615e3f0..d31fddef 100644 --- a/src/h1/xsk/lexer.hpp +++ b/src/h1/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::h1 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::h1::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::h1::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::h1 diff --git a/src/h1/xsk/parser.cpp b/src/h1/xsk/parser.cpp index e182be50..64594bc8 100644 --- a/src/h1/xsk/parser.cpp +++ b/src/h1/xsk/parser.cpp @@ -1984,1303 +1984,1303 @@ namespace xsk { namespace gsc { namespace h1 { switch (yyn) { case 2: // root: program -#line 248 "parser.ypp" +#line 256 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1990 "parser.cpp" break; case 3: // root: %empty -#line 249 "parser.ypp" +#line 257 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1996 "parser.cpp" break; case 4: // program: program inline -#line 254 "parser.ypp" +#line 262 "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 256 "parser.ypp" +#line 264 "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 258 "parser.ypp" +#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 > ()->declarations.push_back(std::move(yystack_[0].value.as < ast::decl > ())); } #line 2014 "parser.cpp" break; case 7: // program: inline -#line 260 "parser.ypp" +#line 268 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; case 8: // program: include -#line 262 "parser.ypp" +#line 270 "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 2026 "parser.cpp" break; case 9: // program: declaration -#line 264 "parser.ypp" +#line 272 "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 2032 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 268 "parser.ypp" +#line 276 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2038 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 273 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2044 "parser.cpp" break; case 12: // declaration: "/#" -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; case 13: // declaration: "#/" -#line 278 "parser.ypp" +#line 286 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2056 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 279 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2062 "parser.cpp" break; case 15: // declaration: decl_constant -#line 280 "parser.ypp" +#line 288 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2068 "parser.cpp" break; case 16: // declaration: decl_thread -#line 281 "parser.ypp" +#line 289 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2074 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 286 "parser.ypp" - { lexer.restrict_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 294 "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 2080 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 291 "parser.ypp" +#line 299 "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 2086 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 296 "parser.ypp" - { lexer.restrict_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 304 "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 2092 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2098 "parser.cpp" break; case 21: // stmt: stmt_block -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2104 "parser.cpp" break; case 22: // stmt: stmt_call -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2110 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2116 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2122 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2128 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2134 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2140 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2146 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2152 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2158 "parser.cpp" break; case 31: // stmt: stmt_if -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2164 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2170 "parser.cpp" break; case 33: // stmt: stmt_while -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2176 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2182 "parser.cpp" break; case 35: // stmt: stmt_for -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2188 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2194 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2200 "parser.cpp" break; case 38: // stmt: stmt_case -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2206 "parser.cpp" break; case 39: // stmt: stmt_default -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2212 "parser.cpp" break; case 40: // stmt: stmt_break -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2218 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 321 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2224 "parser.cpp" break; case 42: // stmt: stmt_return -#line 322 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2230 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 323 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2236 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 324 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2242 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 325 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2248 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 329 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2254 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 330 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2260 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 334 "parser.ypp" +#line 342 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2266 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 335 "parser.ypp" +#line 343 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2272 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 340 "parser.ypp" +#line 348 "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 2278 "parser.cpp" break; case 51: // stmt_list: stmt -#line 342 "parser.ypp" +#line 350 "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 2284 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 347 "parser.ypp" +#line 355 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2290 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 349 "parser.ypp" +#line 357 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2296 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 351 "parser.ypp" +#line 359 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2302 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 353 "parser.ypp" +#line 361 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2308 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 358 "parser.ypp" +#line 366 "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 2314 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 360 "parser.ypp" +#line 368 "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 2320 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 365 "parser.ypp" +#line 373 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2326 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 367 "parser.ypp" +#line 375 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 369 "parser.ypp" +#line 377 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 374 "parser.ypp" +#line 382 "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 2344 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 379 "parser.ypp" +#line 387 "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 2350 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 381 "parser.ypp" +#line 389 "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 2356 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 386 "parser.ypp" +#line 394 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2362 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 391 "parser.ypp" +#line 399 "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 2368 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 393 "parser.ypp" +#line 401 "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 2374 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 398 "parser.ypp" +#line 406 "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 2380 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 400 "parser.ypp" +#line 408 "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 2386 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 405 "parser.ypp" +#line 413 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2392 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 410 "parser.ypp" +#line 418 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2398 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 412 "parser.ypp" +#line 420 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2404 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 417 "parser.ypp" +#line 425 "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 2410 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 422 "parser.ypp" +#line 430 "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 2416 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 427 "parser.ypp" +#line 435 "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 2422 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 432 "parser.ypp" +#line 440 "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 2428 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 437 "parser.ypp" +#line 445 "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 2434 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 442 "parser.ypp" +#line 450 "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 2440 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 444 "parser.ypp" +#line 452 "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 2446 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 449 "parser.ypp" +#line 457 "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 2452 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 454 "parser.ypp" +#line 462 "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 2458 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 456 "parser.ypp" +#line 464 "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 2464 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 461 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2470 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 466 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2476 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 471 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2482 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 476 "parser.ypp" +#line 484 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2488 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 478 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 483 "parser.ypp" +#line 491 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2500 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 488 "parser.ypp" +#line 496 "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 2506 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 493 "parser.ypp" +#line 501 "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 2512 "parser.cpp" break; case 90: // expr: expr_ternary -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2518 "parser.cpp" break; case 91: // expr: expr_binary -#line 498 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2524 "parser.cpp" break; case 92: // expr: expr_primitive -#line 499 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2530 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 503 "parser.ypp" +#line 511 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2536 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 504 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2542 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 517 "parser.ypp" +#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 2572 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 519 "parser.ypp" +#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 2578 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 521 "parser.ypp" +#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 2584 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 523 "parser.ypp" +#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 2590 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 525 "parser.ypp" +#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 2596 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 527 "parser.ypp" +#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 2602 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 529 "parser.ypp" +#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 2608 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 534 "parser.ypp" +#line 542 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2614 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 536 "parser.ypp" +#line 544 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2620 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 541 "parser.ypp" +#line 549 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2626 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 543 "parser.ypp" +#line 551 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2632 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 548 "parser.ypp" +#line 556 "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 2638 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 553 "parser.ypp" +#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 2644 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2650 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().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 114: // expr_binary: expr "!=" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().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 115: // expr_binary: expr "<=" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().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 116: // expr_binary: expr ">=" expr -#line 563 "parser.ypp" +#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 2674 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 565 "parser.ypp" +#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 2680 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 567 "parser.ypp" +#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 2686 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 569 "parser.ypp" +#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 2692 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 571 "parser.ypp" +#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 2698 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 573 "parser.ypp" +#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 2704 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 575 "parser.ypp" +#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 2710 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 577 "parser.ypp" +#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 2716 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 579 "parser.ypp" +#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 2722 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 581 "parser.ypp" +#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 2728 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 583 "parser.ypp" +#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 2734 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 585 "parser.ypp" +#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 2740 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 587 "parser.ypp" +#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 2746 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2752 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2758 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2764 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2770 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2776 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2782 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2788 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2794 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2800 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2806 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2812 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2818 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2824 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2830 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2836 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2842 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 607 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2848 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 608 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2854 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 609 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2860 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 610 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2866 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2872 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 612 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2878 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 613 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2884 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 614 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2890 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 615 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2896 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2902 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 617 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2908 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 618 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2914 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 623 "parser.ypp" +#line 631 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2920 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 628 "parser.ypp" +#line 636 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2926 "parser.cpp" break; case 159: // expr_call: expr_function -#line 632 "parser.ypp" +#line 640 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2932 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 633 "parser.ypp" +#line 641 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2938 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 636 "parser.ypp" +#line 644 "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 2944 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 637 "parser.ypp" +#line 645 "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 2950 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 650 "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 2956 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 652 "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 2962 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 654 "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 2968 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 656 "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 2974 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 658 "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 2980 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 660 "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 2986 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 665 "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 2992 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 667 "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 2998 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 661 "parser.ypp" +#line 669 "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 3004 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 671 "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 3010 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 668 "parser.ypp" +#line 676 "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 3016 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 673 "parser.ypp" +#line 681 "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 3022 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 675 "parser.ypp" +#line 683 "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 3028 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 677 "parser.ypp" +#line 685 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3034 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 682 "parser.ypp" +#line 690 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3040 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 684 "parser.ypp" +#line 692 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3046 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 689 "parser.ypp" +#line 697 "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 3052 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 691 "parser.ypp" +#line 699 "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 3058 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3064 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 698 "parser.ypp" +#line 706 "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 3070 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 703 "parser.ypp" +#line 711 "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 3076 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 708 "parser.ypp" +#line 716 "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 3082 "parser.cpp" break; case 185: // expr_field: expr_object "field" -#line 710 "parser.ypp" +#line 718 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3088 "parser.cpp" break; case 186: // expr_size: expr_object ".size" -#line 715 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3094 "parser.cpp" break; case 187: // expr_paren: "(" expr ")" -#line 720 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3100 "parser.cpp" break; case 188: // expr_object: expr_call -#line 724 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3106 "parser.cpp" break; case 189: // expr_object: expr_method -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3112 "parser.cpp" break; case 190: // expr_object: expr_array -#line 726 "parser.ypp" +#line 734 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3118 "parser.cpp" break; case 191: // expr_object: expr_field -#line 727 "parser.ypp" +#line 735 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3124 "parser.cpp" break; case 192: // expr_object: expr_game -#line 728 "parser.ypp" +#line 736 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3130 "parser.cpp" break; case 193: // expr_object: expr_self -#line 729 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3136 "parser.cpp" break; case 194: // expr_object: expr_anim -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3142 "parser.cpp" break; case 195: // expr_object: expr_level -#line 731 "parser.ypp" +#line 739 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3148 "parser.cpp" break; case 196: // expr_object: expr_identifier -#line 732 "parser.ypp" +#line 740 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3154 "parser.cpp" break; case 197: // expr_thisthread: "thisthread" -#line 737 "parser.ypp" +#line 745 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3160 "parser.cpp" break; case 198: // expr_empty_array: "[" "]" -#line 742 "parser.ypp" +#line 750 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3166 "parser.cpp" break; case 199: // expr_undefined: "undefined" -#line 747 "parser.ypp" +#line 755 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3172 "parser.cpp" break; case 200: // expr_game: "game" -#line 752 "parser.ypp" +#line 760 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3178 "parser.cpp" break; case 201: // expr_self: "self" -#line 757 "parser.ypp" +#line 765 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3184 "parser.cpp" break; case 202: // expr_anim: "anim" -#line 762 "parser.ypp" +#line 770 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3190 "parser.cpp" break; case 203: // expr_level: "level" -#line 767 "parser.ypp" +#line 775 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3196 "parser.cpp" break; case 204: // expr_animation: "%" "identifier" -#line 772 "parser.ypp" +#line 780 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3202 "parser.cpp" break; case 205: // expr_animtree: "#animtree" -#line 777 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3208 "parser.cpp" break; case 206: // expr_identifier: "identifier" -#line 782 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3214 "parser.cpp" break; case 207: // expr_path: "path" -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3220 "parser.cpp" break; case 208: // expr_path: expr_identifier -#line 789 "parser.ypp" +#line 797 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3226 "parser.cpp" break; case 209: // expr_istring: "localized string" -#line 794 "parser.ypp" +#line 802 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3232 "parser.cpp" break; case 210: // expr_string: "string literal" -#line 799 "parser.ypp" +#line 807 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3238 "parser.cpp" break; case 211: // expr_color: "color" -#line 804 "parser.ypp" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3244 "parser.cpp" break; case 212: // expr_vector: "(" expr "," expr "," expr ")" -#line 809 "parser.ypp" +#line 817 "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 3250 "parser.cpp" break; case 213: // expr_float: "-" "float" -#line 814 "parser.ypp" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3256 "parser.cpp" break; case 214: // expr_float: "float" -#line 816 "parser.ypp" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3262 "parser.cpp" break; case 215: // expr_integer: "-" "integer" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3268 "parser.cpp" break; case 216: // expr_integer: "integer" -#line 823 "parser.ypp" +#line 831 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3274 "parser.cpp" break; case 217: // expr_false: "false" -#line 828 "parser.ypp" +#line 836 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; case 218: // expr_true: "true" -#line 833 "parser.ypp" +#line 841 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; @@ -3470,7 +3470,8 @@ namespace xsk { namespace gsc { namespace h1 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "waitframe", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", @@ -3773,50 +3774,50 @@ namespace xsk { namespace gsc { namespace h1 { const short parser::yypact_[] = { - 13, -267, -267, 8, 8, -11, -267, 27, 13, -267, - -267, -267, -267, -267, -267, -31, -267, -267, -16, -10, - -42, -267, -267, -267, -267, -38, 1203, -267, -267, -267, - 20, -21, -267, -267, -17, -5, -267, 29, -267, -267, - -267, -267, -267, -267, -267, 1203, 1073, -38, 1203, 1203, - 52, -2, -267, -267, -267, -267, 2007, -267, -267, -267, - -267, -267, 31, 354, -267, -267, -267, -267, 440, 813, - -267, -267, 943, -267, -267, -267, 1169, 1234, 1282, 1296, - -267, -267, 556, 49, -267, -267, -267, -267, -267, -267, - -267, -267, 43, 35, -38, 69, 79, 85, 93, 113, - 110, 119, 1333, 1073, -267, 2090, 118, 120, -267, -267, - -267, -267, -267, -267, -267, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, -267, 1268, -38, -267, -267, -267, - 126, 122, 1203, -38, -267, 787, -267, -267, 1203, 1203, - -38, 1203, 1203, -38, 1203, -267, 1203, 1069, 1203, -267, - 1972, 142, 142, 2121, 2131, 617, 617, 44, 44, 44, - 44, 2162, 2203, 2172, 73, 73, -267, -267, -267, 1777, - -267, -38, -8, -267, 128, 865, 1203, 129, -18, 132, - 1047, 136, 138, 143, 144, -64, 148, 135, 141, 1138, - 149, 153, 158, -267, 159, 123, 123, -267, -267, -267, - 917, -267, -267, -267, -267, -267, -267, -267, -267, -267, + 5, -267, -267, 49, 49, -28, -267, 26, 5, -267, + -267, -267, -267, -267, -267, -39, -267, -267, -34, -32, + -64, -267, -267, -267, -267, -61, 1195, -267, -267, -267, + 8, -26, -267, -267, -25, -13, -267, -3, -267, -267, + -267, -267, -267, -267, -267, 1195, 1065, -61, 1195, 1195, + -14, -55, -267, -267, -267, -267, 1999, -267, -267, -267, + -267, -267, 23, 346, -267, -267, -267, -267, 432, 805, + -267, -267, 935, -267, -267, -267, 1161, 1226, 1274, 1288, + -267, -267, 548, 17, -267, -267, -267, -267, -267, -267, + -267, -267, 3, 27, -61, 41, 31, 57, 42, 71, + 77, 45, 1325, 1065, -267, 2082, 83, 111, -267, -267, + -267, -267, -267, -267, -267, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, -267, 1260, -61, -267, -267, -267, + 117, 110, 1195, -61, -267, 779, -267, -267, 1195, 1195, + -61, 1195, 1195, -61, 1195, -267, 1195, 1061, 1195, -267, + 1964, 134, 134, 2113, 2123, 609, 609, 36, 36, 36, + 36, 2154, 2195, 2164, 65, 65, -267, -267, -267, 1769, + -267, -61, -16, -267, 122, 857, 1195, 118, -29, 124, + 1039, 130, 131, 135, 136, -5, 128, 133, 139, 1130, + 140, 145, 151, -267, 152, 115, 115, -267, -267, -267, + 909, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, - -267, -267, -267, -267, -267, 154, 155, 161, 165, 177, - -267, -267, 36, -267, -267, -267, -267, -22, 1817, 7, - 188, 1857, 9, 190, 1897, 1936, 186, 2090, 1203, -267, - 128, -267, 1203, -267, 995, 2042, -267, 192, -267, 1203, - 219, 1203, 542, -38, 1203, 150, 194, 196, -267, -267, - -267, -267, 2077, -267, 1203, 1203, 1203, -267, -267, 185, - 185, -267, -267, -267, -267, -267, -267, -267, 201, 206, - 207, 209, -267, -267, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 205, -267, 1203, 208, -267, - 1203, 210, 1203, 211, 2090, 11, -267, -267, 202, 1499, - 217, 1533, 213, -267, -267, -267, 677, 1, 1567, -267, - -267, -267, 17, 38, 1069, 1203, 1203, 1203, 1203, 2090, - 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, - 218, 45, 221, 46, 224, 1601, 1203, -267, -267, 1047, - 1203, 1047, 1203, 1203, -38, 35, 223, 225, 1635, 1377, - 1421, 1465, 1203, -267, 1203, -267, 1203, -267, 55, 264, - 1669, -267, 2090, 231, 1703, 241, -267, -267, -267, 232, - 233, 1203, 234, 1203, 237, 1203, 74, 90, 99, -267, - 1047, 238, 542, 1047, 1203, -267, -267, 248, -267, 249, - -267, 255, -267, -267, -267, -267, -267, 256, -267, 1737, - 251, 253, 254, 1047, 1047, -267, -267, -267, -267, -267 + -267, -267, -267, -267, -267, 147, 153, 157, 169, 170, + -267, -267, 28, -267, -267, -267, -267, -31, 1809, -2, + 155, 1849, -1, 182, 1889, 1928, 178, 2082, 1195, -267, + 122, -267, 1195, -267, 987, 2034, -267, 184, -267, 1195, + 211, 1195, 534, -61, 1195, 141, 185, 186, -267, -267, + -267, -267, 2069, -267, 1195, 1195, 1195, -267, -267, 177, + 177, -267, -267, -267, -267, -267, -267, -267, 197, 198, + 199, 201, -267, -267, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 200, -267, 1195, 202, -267, + 1195, 204, 1195, 203, 2082, 1, -267, -267, 192, 1491, + 210, 1525, 194, -267, -267, -267, 669, -8, 1559, -267, + -267, -267, 9, 38, 1061, 1195, 1195, 1195, 1195, 2082, + 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, + 213, 47, 215, 66, 216, 1593, 1195, -267, -267, 1039, + 1195, 1039, 1195, 1195, -61, 27, 217, 219, 1627, 1369, + 1413, 1457, 1195, -267, 1195, -267, 1195, -267, 82, 238, + 1661, -267, 2082, 223, 1695, 247, -267, -267, -267, 224, + 225, 1195, 226, 1195, 229, 1195, 91, 104, 114, -267, + 1039, 230, 534, 1039, 1195, -267, -267, 240, -267, 241, + -267, 248, -267, -267, -267, -267, -267, 249, -267, 1729, + 243, 244, 245, 1039, 1039, -267, -267, -267, -267, -267 }; const unsigned char @@ -3871,8 +3872,8 @@ namespace xsk { namespace gsc { namespace h1 { const short parser::yypgoto_[] = { - -267, -267, -267, 294, 298, 301, -267, -267, -267, -72, - -267, -91, 146, -83, -267, -267, -267, -267, -267, -267, + -267, -267, -267, 292, 300, 301, -267, -267, -267, -72, + -267, -91, 144, -81, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 195, -267, -266, -260, -258, -267, -267, -267, -267, -267, -130, -12, @@ -3901,38 +3902,38 @@ namespace xsk { namespace gsc { namespace h1 { { 15, 107, 146, 17, 17, 138, 333, 139, 15, 18, 19, 30, 334, 25, 335, 238, 1, 2, 3, 4, - 5, 275, 142, 373, 93, 32, 267, 21, 29, 94, - -208, 95, 55, 20, 96, 99, 268, 261, 27, 26, - 97, 100, 158, 98, 28, 298, 299, 108, 300, 301, - 29, 374, 316, 6, 319, 238, 367, 158, 107, 158, - 238, 158, 376, -188, -188, 92, -188, 158, 34, 35, - -188, 37, 140, 16, 6, 287, 287, 101, 141, -188, - 238, 145, -188, 377, 135, 16, 6, 136, 158, 113, - 383, 385, 302, 303, 147, 158, 158, 144, 16, 6, - 409, 143, 116, 117, 6, 158, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 148, 270, 422, - -188, -188, -188, 149, 158, 137, 16, 6, 129, 130, - 131, 132, 133, 239, 238, 423, 180, 150, 292, 240, - 158, 151, 287, 184, 424, 247, 333, 111, 112, 158, - 250, 141, 334, 253, 335, 34, 35, 152, 37, 131, - 132, 133, 153, 41, 42, 43, 44, 154, 158, 159, - 142, 204, 262, 239, 181, 138, 269, 139, 239, 240, - 271, 260, 272, 266, 240, 247, 276, 273, 274, 279, - 247, 141, 292, 288, 288, 280, 141, 284, 239, 240, - 240, 278, 285, 283, 240, 247, 247, 286, 293, 294, - 247, 141, 141, 16, 6, 295, 141, 34, 35, 296, + 5, 142, 373, 267, 20, 32, 21, 93, 27, -208, + 28, 95, 94, 268, 96, 99, 29, 261, 6, 26, + 97, 100, 158, 98, 113, 298, 299, 108, 300, 301, + 374, 316, 319, 101, 367, 238, 158, 158, 107, 158, + 238, 92, 376, -188, -188, 144, -188, 158, 34, 35, + -188, 37, 140, 16, 6, 287, 287, 143, 141, -188, + 238, 145, -188, 149, 135, 16, 6, 136, 275, 111, + 112, 377, 302, 303, 147, 29, 158, 148, 151, 55, + 383, 154, 116, 117, 6, 158, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 150, 270, 385, + -188, -188, -188, 152, 158, 137, 16, 6, 129, 130, + 131, 132, 133, 239, 238, 409, 180, 153, 292, 240, + 158, 158, 287, 184, 422, 247, 333, 16, 6, 158, + 250, 141, 334, 253, 335, 34, 35, 423, 37, 131, + 132, 133, 158, 41, 42, 43, 44, 424, 159, 142, + 181, 204, 158, 239, 262, 138, 269, 139, 239, 240, + 266, 260, 271, 272, 240, 247, 276, 273, 274, 278, + 247, 141, 292, 288, 288, 279, 141, 284, 239, 240, + 240, 280, 283, 285, 240, 247, 247, 317, 286, 293, + 247, 141, 141, 16, 6, 294, 141, 34, 35, 295, 37, 56, 138, 138, 139, 139, 129, 130, 131, 132, - 133, 297, 317, 135, 320, 323, 136, 328, 330, 238, - 102, 238, 140, 109, 110, 345, 112, 339, 141, 340, - 346, 347, 239, 348, 360, 366, 368, 362, 240, 364, - 288, 370, 382, 414, 247, 384, 240, 372, 386, 138, - 141, 139, 247, 337, 137, 16, 6, 397, 141, 398, - 238, 410, 287, 238, 396, 412, 415, 416, 418, 140, + 133, 296, 297, 135, 320, 323, 136, 328, 330, 238, + 102, 238, 140, 109, 110, 112, 339, 340, 141, 345, + 346, 347, 239, 348, 368, 366, 372, 360, 240, 362, + 288, 364, 370, 410, 247, 382, 240, 384, 386, 138, + 141, 139, 247, 337, 137, 16, 6, 414, 141, 397, + 238, 398, 287, 238, 396, 412, 415, 416, 418, 140, 140, 420, 426, 430, 431, 141, 141, 389, 157, 391, - 432, 433, 22, 238, 238, 435, 23, 436, 437, 24, + 22, 432, 433, 238, 238, 435, 436, 437, 23, 24, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 427, - 179, 264, 277, 0, 0, 0, 140, 0, 425, 0, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 264, + 179, 427, 277, 0, 0, 0, 140, 0, 425, 0, 0, 428, 141, 248, 0, 0, 251, 0, 0, 254, 0, 255, 0, 257, 0, 0, 417, 239, 419, 239, 421, 438, 439, 240, 0, 240, 0, 0, 0, 247, @@ -4135,311 +4136,311 @@ namespace xsk { namespace gsc { namespace h1 { parser::yycheck_[] = { 0, 46, 93, 3, 4, 72, 272, 72, 8, 3, - 4, 20, 272, 44, 272, 145, 3, 4, 5, 6, - 7, 85, 44, 22, 45, 25, 44, 0, 92, 50, - 52, 48, 96, 44, 34, 35, 54, 45, 54, 70, - 34, 35, 50, 48, 54, 9, 10, 47, 12, 13, - 92, 50, 45, 91, 45, 185, 45, 50, 103, 50, - 190, 50, 45, 32, 33, 45, 35, 50, 32, 33, - 39, 35, 72, 90, 91, 205, 206, 48, 72, 48, - 210, 46, 51, 45, 48, 90, 91, 51, 50, 91, - 45, 45, 56, 57, 94, 50, 50, 54, 90, 91, - 45, 52, 58, 59, 91, 50, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 190, 45, - 89, 90, 91, 44, 50, 89, 90, 91, 84, 85, - 86, 87, 88, 145, 264, 45, 136, 52, 210, 145, - 50, 48, 272, 143, 45, 145, 412, 95, 96, 50, - 150, 145, 412, 153, 412, 32, 33, 44, 35, 86, - 87, 88, 52, 40, 41, 42, 43, 48, 50, 49, - 44, 48, 44, 185, 52, 242, 44, 242, 190, 185, - 44, 181, 44, 54, 190, 185, 195, 44, 44, 54, - 190, 185, 264, 205, 206, 54, 190, 44, 210, 205, - 206, 53, 44, 54, 210, 205, 206, 48, 54, 54, - 210, 205, 206, 90, 91, 54, 210, 32, 33, 54, - 35, 26, 289, 290, 289, 290, 84, 85, 86, 87, - 88, 54, 44, 48, 44, 49, 51, 45, 19, 369, - 45, 371, 242, 48, 49, 44, 96, 53, 242, 53, - 44, 44, 264, 44, 49, 44, 54, 49, 264, 49, - 272, 44, 44, 22, 264, 44, 272, 54, 44, 336, - 264, 336, 272, 273, 89, 90, 91, 54, 272, 54, - 410, 17, 412, 413, 375, 54, 54, 54, 54, 289, - 290, 54, 54, 45, 45, 289, 290, 369, 103, 371, - 45, 45, 8, 433, 434, 54, 8, 54, 54, 8, + 4, 20, 272, 52, 272, 145, 11, 12, 13, 14, + 15, 52, 30, 52, 52, 25, 0, 53, 62, 60, + 62, 56, 58, 62, 34, 35, 100, 53, 99, 78, + 34, 35, 58, 56, 99, 17, 18, 47, 20, 21, + 58, 53, 53, 56, 53, 185, 58, 58, 103, 58, + 190, 53, 53, 40, 41, 62, 43, 58, 40, 41, + 47, 43, 72, 98, 99, 205, 206, 60, 72, 56, + 210, 54, 59, 52, 56, 98, 99, 59, 93, 103, + 104, 53, 64, 65, 94, 100, 58, 56, 56, 104, + 53, 56, 66, 67, 99, 58, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 60, 190, 53, + 97, 98, 99, 52, 58, 97, 98, 99, 92, 93, + 94, 95, 96, 145, 264, 53, 136, 60, 210, 145, + 58, 58, 272, 143, 53, 145, 412, 98, 99, 58, + 150, 145, 412, 153, 412, 40, 41, 53, 43, 94, + 95, 96, 58, 48, 49, 50, 51, 53, 57, 52, + 60, 56, 58, 185, 52, 242, 52, 242, 190, 185, + 62, 181, 52, 52, 190, 185, 195, 52, 52, 61, + 190, 185, 264, 205, 206, 62, 190, 52, 210, 205, + 206, 62, 62, 52, 210, 205, 206, 52, 56, 62, + 210, 205, 206, 98, 99, 62, 210, 40, 41, 62, + 43, 26, 289, 290, 289, 290, 92, 93, 94, 95, + 96, 62, 62, 56, 52, 57, 59, 53, 27, 369, + 45, 371, 242, 48, 49, 104, 61, 61, 242, 52, + 52, 52, 264, 52, 62, 52, 62, 57, 264, 57, + 272, 57, 52, 25, 264, 52, 272, 52, 52, 336, + 264, 336, 272, 273, 97, 98, 99, 30, 272, 62, + 410, 62, 412, 413, 375, 62, 62, 62, 62, 289, + 290, 62, 62, 53, 53, 289, 290, 369, 103, 371, + 8, 53, 53, 433, 434, 62, 62, 62, 8, 8, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 412, - 135, 185, 195, -1, -1, -1, 336, -1, 410, -1, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 185, + 135, 412, 195, -1, -1, -1, 336, -1, 410, -1, -1, 413, 336, 148, -1, -1, 151, -1, -1, 154, -1, 156, -1, 158, -1, -1, 401, 369, 403, 371, 405, 433, 434, 369, -1, 371, -1, -1, -1, 369, -1, 371, -1, -1, 374, 369, -1, 371, -1, -1, - -1, 186, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 145, -1, 39, 199, -1, -1, 145, 410, -1, - 412, 413, 48, -1, 410, 51, 412, 413, -1, -1, + -1, 186, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 145, -1, 47, 199, -1, -1, 145, 410, -1, + 412, 413, 56, -1, 410, 59, 412, 413, -1, -1, 410, -1, 412, 413, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, 145, -1, 433, 434, -1, -1, 185, -1, 433, 434, -1, 190, 185, -1, 433, - 434, -1, 190, 89, 90, 91, -1, -1, -1, -1, + 434, -1, 190, 97, 98, 99, -1, -1, -1, -1, -1, 205, 206, 258, -1, -1, 210, 205, 206, -1, -1, -1, 210, -1, 269, 185, 271, -1, -1, 274, - 190, -1, 32, 33, 145, 35, -1, -1, -1, 39, - -1, 286, 142, -1, -1, 205, 206, -1, 48, 149, - 210, 51, 152, 145, -1, -1, -1, -1, -1, 304, + 190, -1, 40, 41, 145, 43, -1, -1, -1, 47, + -1, 286, 142, -1, -1, 205, 206, -1, 56, 149, + 210, 59, 152, 145, -1, -1, -1, -1, -1, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 264, 145, -1, -1, 185, -1, 264, 322, 272, 190, - -1, -1, -1, -1, 272, -1, -1, -1, -1, 89, - 90, 91, -1, 185, 205, 206, -1, -1, 190, 210, + -1, -1, -1, -1, 272, -1, -1, -1, -1, 97, + 98, 99, -1, 185, 205, 206, -1, -1, 190, 210, 345, 346, 347, 348, 264, -1, -1, -1, -1, -1, -1, 185, 272, 205, 206, -1, 190, -1, 210, -1, -1, -1, -1, -1, -1, 370, -1, 372, 373, -1, - -1, 205, 206, -1, 32, 33, 210, 35, -1, -1, - -1, -1, 40, 41, 42, 43, -1, -1, 32, 33, - 48, 35, -1, 264, -1, 39, -1, -1, 56, 57, - 44, 272, 262, -1, 48, -1, -1, 51, 52, 414, + -1, 205, 206, -1, 40, 41, 210, 43, -1, -1, + -1, -1, 48, 49, 50, 51, -1, -1, 40, 41, + 56, 43, -1, 264, -1, 47, -1, -1, 64, 65, + 52, 272, 262, -1, 56, -1, -1, 59, 60, 414, -1, -1, 264, -1, -1, 369, -1, 371, -1, -1, 272, 369, -1, 371, 284, 285, -1, -1, -1, -1, - 264, -1, 90, 91, -1, -1, -1, -1, 272, -1, - -1, -1, -1, -1, -1, 89, 90, 91, -1, 369, + 264, -1, 98, 99, -1, -1, -1, -1, 272, -1, + -1, -1, -1, -1, -1, 97, 98, 99, -1, 369, -1, 371, -1, -1, -1, -1, 410, 317, 412, 413, 320, -1, 410, -1, 412, 413, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 58, 59, -1, -1, 433, - 434, 64, 65, 66, 67, 433, 434, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, -1, -1, 433, + 434, 72, 73, 74, 75, 433, 434, -1, -1, -1, 410, -1, 412, 413, -1, -1, -1, -1, 369, -1, - 371, 84, 85, 86, 87, 88, 366, -1, -1, 32, - 33, -1, 35, 433, 434, -1, -1, 369, -1, 371, - -1, -1, 382, -1, 384, 48, 386, -1, 51, -1, - -1, -1, -1, 56, 57, 369, -1, 371, -1, 410, - -1, 412, 413, -1, -1, -1, -1, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 410, -1, - 412, 413, 433, 434, -1, -1, 89, 90, 91, -1, + 371, 92, 93, 94, 95, 96, 366, -1, -1, 40, + 41, -1, 43, 433, 434, -1, -1, 369, -1, 371, + -1, -1, 382, -1, 384, 56, 386, -1, 59, -1, + -1, -1, -1, 64, 65, 369, -1, 371, -1, 410, + -1, 412, 413, -1, -1, -1, -1, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 410, -1, + 412, 413, 433, 434, -1, -1, 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, -1, -1, -1, -1, -1, - 3, -1, -1, -1, -1, -1, -1, -1, 11, 433, - 434, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, -1, -1, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 8, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, -1, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, 49, -1, - -1, 48, 49, -1, 55, 52, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 90, 91, -1, - -1, 68, 69, -1, -1, -1, 8, -1, -1, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, -1, -1, 48, -1, -1, -1, - 52, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, 32, 33, -1, 35, -1, 68, 69, 39, -1, - -1, 8, -1, -1, -1, -1, -1, 48, -1, -1, - 51, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, - -1, 48, -1, -1, -1, 52, -1, -1, 89, 90, - 91, -1, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 68, 69, 39, -1, -1, 8, -1, -1, -1, - -1, -1, 48, -1, -1, 51, -1, -1, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, 32, 33, 48, 35, -1, -1, - 52, 39, -1, 89, 90, 91, -1, -1, 32, 33, - 48, 35, -1, 51, -1, 39, 68, 69, -1, -1, - -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, -1, -1, -1, -1, -1, - -1, 89, 90, 91, -1, -1, -1, -1, 45, -1, - -1, -1, -1, 50, -1, 89, 90, 91, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 45, -1, -1, -1, -1, 50, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 45, -1, -1, -1, - -1, 50, -1, -1, -1, -1, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 11, -1, -1, -1, -1, -1, -1, -1, 19, 433, + 434, 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, -1, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, -1, 43, -1, -1, 98, 99, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, 98, 99, 48, 49, 50, + 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, 57, -1, + -1, 56, 57, -1, 63, 60, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 98, 99, -1, + -1, 76, 77, -1, -1, -1, 16, -1, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, -1, -1, -1, + -1, 40, 41, -1, 43, -1, 76, 77, 47, -1, + -1, 16, -1, -1, -1, -1, -1, 56, -1, -1, + 59, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, -1, -1, + -1, 56, -1, -1, -1, 60, -1, -1, 97, 98, + 99, -1, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 76, 77, 47, -1, -1, 16, -1, -1, -1, + -1, -1, 56, -1, -1, 59, -1, -1, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, 40, 41, 56, 43, -1, -1, + 60, 47, -1, 97, 98, 99, -1, -1, 40, 41, + 56, 43, -1, 59, -1, 47, 76, 77, -1, -1, + -1, -1, -1, -1, 56, -1, -1, 59, -1, -1, + -1, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, 97, 98, 99, -1, -1, -1, -1, 53, -1, + -1, -1, -1, 58, -1, 97, 98, 99, 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, -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, 81, 82, 83, 84, 85, 86, 87, 88, - 45, -1, -1, -1, -1, 50, -1, -1, -1, -1, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 45, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -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, 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, - 45, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 50, -1, -1, -1, - -1, 55, -1, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 53, -1, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 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, 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, 61, -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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 54, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 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, 62, 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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 55, -1, -1, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 81, 82, - 83, 84, 85, 86, 87, 88, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, 58, - 59, -1, 61, 62, 63, 64, 65, 66, 67, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, -1, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, 82, -1, 84, 85, 86, 87, - 88, 58, 59, -1, -1, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 84, 85, 86, - 87, 88 + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 63, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, + 91, 92, 93, 94, 95, 96, -1, -1, -1, -1, + -1, 89, 90, 91, 92, 93, 94, 95, 96, 66, + 67, -1, 69, 70, 71, 72, 73, 74, 75, 66, + 67, -1, -1, 70, 71, 72, 73, 74, 75, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 66, 67, -1, -1, 70, 71, 72, 73, 74, 75, + 66, 67, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, + 95, 96 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 91, 107, 108, 109, - 110, 111, 112, 113, 114, 177, 90, 177, 178, 178, - 44, 0, 109, 110, 111, 44, 70, 54, 54, 92, - 180, 159, 177, 8, 32, 33, 34, 35, 36, 37, - 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 93, 94, 95, 96, 144, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 45, 45, 50, 48, 177, 178, 48, 177, - 178, 48, 144, 48, 49, 144, 160, 161, 177, 144, - 144, 95, 96, 91, 54, 55, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, - 85, 86, 87, 88, 39, 48, 51, 89, 156, 157, - 177, 178, 44, 52, 54, 46, 117, 177, 48, 44, - 52, 48, 44, 52, 48, 45, 50, 144, 50, 49, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 177, 52, 160, 161, 177, 3, 11, 14, 15, 16, - 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 47, 48, 56, 57, 115, 116, 117, - 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 146, 147, 148, 154, 155, - 163, 164, 167, 171, 172, 173, 174, 177, 144, 160, - 177, 144, 160, 177, 144, 144, 49, 144, 53, 49, - 177, 45, 44, 4, 118, 144, 54, 44, 54, 44, - 115, 44, 44, 44, 44, 85, 180, 184, 53, 54, - 54, 54, 144, 54, 44, 44, 48, 154, 155, 167, - 167, 47, 115, 54, 54, 54, 54, 54, 9, 10, - 12, 13, 56, 57, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 49, 45, 44, 49, 45, - 44, 49, 50, 49, 144, 160, 4, 54, 45, 144, - 19, 144, 119, 146, 147, 148, 167, 177, 144, 53, - 53, 54, 160, 160, 144, 44, 44, 44, 44, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 49, 160, 49, 160, 49, 144, 44, 45, 54, 45, - 44, 45, 54, 22, 50, 45, 45, 45, 144, 144, - 144, 144, 44, 45, 44, 45, 44, 45, 160, 115, - 144, 115, 144, 145, 144, 177, 117, 54, 54, 45, - 45, 50, 45, 50, 45, 50, 160, 160, 160, 45, - 17, 45, 54, 45, 22, 54, 54, 161, 54, 161, - 54, 161, 45, 45, 45, 115, 54, 119, 115, 144, - 45, 45, 45, 45, 45, 54, 54, 54, 115, 115 + 0, 11, 12, 13, 14, 15, 99, 115, 116, 117, + 118, 119, 120, 121, 122, 185, 98, 185, 186, 186, + 52, 0, 117, 118, 119, 52, 78, 62, 62, 100, + 188, 167, 185, 16, 40, 41, 42, 43, 44, 45, + 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, + 93, 96, 101, 102, 103, 104, 152, 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, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 53, 53, 58, 56, 185, 186, 56, 185, + 186, 56, 152, 56, 57, 152, 168, 169, 185, 152, + 152, 103, 104, 99, 62, 63, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, + 93, 94, 95, 96, 47, 56, 59, 97, 164, 165, + 185, 186, 52, 60, 62, 54, 125, 185, 56, 52, + 60, 56, 52, 60, 56, 53, 58, 152, 58, 57, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 185, 60, 168, 169, 185, 11, 19, 22, 23, 24, + 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 55, 56, 64, 65, 123, 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, 151, 154, 155, 156, 162, 163, + 171, 172, 175, 179, 180, 181, 182, 185, 152, 168, + 185, 152, 168, 185, 152, 152, 57, 152, 61, 57, + 185, 53, 52, 12, 126, 152, 62, 52, 62, 52, + 123, 52, 52, 52, 52, 93, 188, 192, 61, 62, + 62, 62, 152, 62, 52, 52, 56, 162, 163, 175, + 175, 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, 152, 168, 12, 62, 53, 152, + 27, 152, 127, 154, 155, 156, 175, 185, 152, 61, + 61, 62, 168, 168, 152, 52, 52, 52, 52, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 57, 168, 57, 168, 57, 152, 52, 53, 62, 53, + 52, 53, 62, 30, 58, 53, 53, 53, 152, 152, + 152, 152, 52, 53, 52, 53, 52, 53, 168, 123, + 152, 123, 152, 153, 152, 185, 125, 62, 62, 53, + 53, 58, 53, 58, 53, 58, 168, 168, 168, 53, + 25, 53, 62, 53, 30, 62, 62, 169, 62, 169, + 62, 169, 53, 53, 53, 123, 62, 127, 123, 152, + 53, 53, 53, 53, 53, 62, 62, 62, 123, 123 }; const unsigned char parser::yyr1_[] = { - 0, 106, 107, 107, 108, 108, 108, 108, 108, 108, - 109, 110, 111, 111, 111, 111, 111, 112, 113, 114, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 116, 116, 117, 117, - 118, 118, 119, 119, 119, 119, 120, 120, 121, 121, - 121, 122, 123, 123, 124, 125, 125, 126, 126, 127, - 128, 128, 129, 130, 131, 132, 133, 134, 134, 135, - 136, 136, 137, 138, 139, 140, 140, 141, 142, 143, - 144, 144, 144, 145, 145, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 147, 147, 148, 148, - 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 152, 153, 154, - 154, 155, 155, 156, 156, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 159, 159, 159, 160, 160, 161, - 161, 162, 162, 163, 164, 164, 165, 166, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 178, 179, - 180, 181, 182, 183, 183, 184, 184, 185, 186 + 0, 114, 115, 115, 116, 116, 116, 116, 116, 116, + 117, 118, 119, 119, 119, 119, 119, 120, 121, 122, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 124, 124, 125, 125, + 126, 126, 127, 127, 127, 127, 128, 128, 129, 129, + 129, 130, 131, 131, 132, 133, 133, 134, 134, 135, + 136, 136, 137, 138, 139, 140, 141, 142, 142, 143, + 144, 144, 145, 146, 147, 148, 148, 149, 150, 151, + 152, 152, 152, 153, 153, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 155, 155, 156, 156, + 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 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, 174, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 186, 187, + 188, 189, 190, 191, 191, 192, 192, 193, 194 }; const signed char @@ -4476,28 +4477,28 @@ namespace xsk { namespace gsc { namespace h1 { const short parser::yyrline_[] = { - 0, 248, 248, 249, 253, 255, 257, 259, 261, 263, - 268, 272, 277, 278, 279, 280, 281, 285, 290, 295, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 329, 330, 334, 335, - 339, 341, 346, 348, 350, 353, 357, 359, 364, 366, - 368, 373, 378, 380, 385, 390, 392, 397, 399, 404, - 409, 411, 416, 421, 426, 431, 436, 441, 443, 448, - 453, 455, 460, 465, 470, 475, 477, 482, 487, 492, - 497, 498, 499, 503, 504, 508, 510, 512, 514, 516, - 518, 520, 522, 524, 526, 528, 533, 535, 540, 542, - 547, 552, 554, 556, 558, 560, 562, 564, 566, 568, - 570, 572, 574, 576, 578, 580, 582, 584, 586, 591, - 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, - 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, - 612, 613, 614, 615, 616, 617, 618, 622, 627, 632, - 633, 636, 637, 641, 643, 645, 647, 649, 651, 656, - 658, 660, 662, 667, 672, 674, 677, 681, 684, 688, - 690, 695, 697, 702, 707, 709, 714, 719, 724, 725, - 726, 727, 728, 729, 730, 731, 732, 736, 741, 746, - 751, 756, 761, 766, 771, 776, 781, 786, 788, 793, - 798, 803, 808, 813, 815, 820, 822, 827, 832 + 0, 256, 256, 257, 261, 263, 265, 267, 269, 271, + 276, 280, 285, 286, 287, 288, 289, 293, 298, 303, + 308, 309, 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, 343, + 347, 349, 354, 356, 358, 361, 365, 367, 372, 374, + 376, 381, 386, 388, 393, 398, 400, 405, 407, 412, + 417, 419, 424, 429, 434, 439, 444, 449, 451, 456, + 461, 463, 468, 473, 478, 483, 485, 490, 495, 500, + 505, 506, 507, 511, 512, 516, 518, 520, 522, 524, + 526, 528, 530, 532, 534, 536, 541, 543, 548, 550, + 555, 560, 562, 564, 566, 568, 570, 572, 574, 576, + 578, 580, 582, 584, 586, 588, 590, 592, 594, 599, + 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, + 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, + 620, 621, 622, 623, 624, 625, 626, 630, 635, 640, + 641, 644, 645, 649, 651, 653, 655, 657, 659, 664, + 666, 668, 670, 675, 680, 682, 685, 689, 692, 696, + 698, 703, 705, 710, 715, 717, 722, 727, 732, 733, + 734, 735, 736, 737, 738, 739, 740, 744, 749, 754, + 759, 764, 769, 774, 779, 784, 789, 794, 796, 801, + 806, 811, 816, 821, 823, 828, 830, 835, 840 }; void @@ -4530,9 +4531,9 @@ namespace xsk { namespace gsc { namespace h1 { #line 13 "parser.ypp" } } } // xsk::gsc::h1 -#line 4534 "parser.cpp" +#line 4535 "parser.cpp" -#line 836 "parser.ypp" +#line 844 "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 22ec3cb4..b291f270 100644 --- a/src/h1/xsk/parser.hpp +++ b/src/h1/xsk/parser.hpp @@ -679,109 +679,117 @@ namespace xsk { namespace gsc { namespace h1 { H1EOF = 0, // "end of file" H1error = 1, // error H1UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - WAITFRAME = 15, // "waitframe" - IF = 16, // "if" - ELSE = 17, // "else" - DO = 18, // "do" - WHILE = 19, // "while" - FOR = 20, // "for" - FOREACH = 21, // "foreach" - IN = 22, // "in" - SWITCH = 23, // "switch" - CASE = 24, // "case" - DEFAULT = 25, // "default" - BREAK = 26, // "break" - CONTINUE = 27, // "continue" - RETURN = 28, // "return" - BREAKPOINT = 29, // "breakpoint" - PROFBEGIN = 30, // "prof_begin" - PROFEND = 31, // "prof_end" - THREAD = 32, // "thread" - CHILDTHREAD = 33, // "childthread" - THISTHREAD = 34, // "thisthread" - CALL = 35, // "call" - TRUE = 36, // "true" - FALSE = 37, // "false" - UNDEFINED = 38, // "undefined" - SIZE = 39, // ".size" - GAME = 40, // "game" - SELF = 41, // "self" - ANIM = 42, // "anim" - LEVEL = 43, // "level" - LPAREN = 44, // "(" - RPAREN = 45, // ")" - LBRACE = 46, // "{" - RBRACE = 47, // "}" - LBRACKET = 48, // "[" - RBRACKET = 49, // "]" - COMMA = 50, // "," - DOT = 51, // "." - DOUBLECOLON = 52, // "::" - COLON = 53, // ":" - SEMICOLON = 54, // ";" - QMARK = 55, // "?" - INCREMENT = 56, // "++" - DECREMENT = 57, // "--" - LSHIFT = 58, // "<<" - RSHIFT = 59, // ">>" - OR = 60, // "||" - AND = 61, // "&&" - EQUALITY = 62, // "==" - INEQUALITY = 63, // "!=" - LESS_EQUAL = 64, // "<=" - GREATER_EQUAL = 65, // ">=" - LESS = 66, // "<" - GREATER = 67, // ">" - NOT = 68, // "!" - COMPLEMENT = 69, // "~" - ASSIGN = 70, // "=" - ASSIGN_ADD = 71, // "+=" - ASSIGN_SUB = 72, // "-=" - ASSIGN_MUL = 73, // "*=" - ASSIGN_DIV = 74, // "/=" - ASSIGN_MOD = 75, // "%=" - ASSIGN_BW_OR = 76, // "|=" - ASSIGN_BW_AND = 77, // "&=" - ASSIGN_BW_EXOR = 78, // "^=" - ASSIGN_RSHIFT = 79, // ">>=" - ASSIGN_LSHIFT = 80, // "<<=" - BITWISE_OR = 81, // "|" - BITWISE_AND = 82, // "&" - BITWISE_EXOR = 83, // "^" - ADD = 84, // "+" - SUB = 85, // "-" - MUL = 86, // "*" - DIV = 87, // "/" - MOD = 88, // "%" - FIELD = 89, // "field" - PATH = 90, // "path" - IDENTIFIER = 91, // "identifier" - STRING = 92, // "string literal" - ISTRING = 93, // "localized string" - COLOR = 94, // "color" - FLOAT = 95, // "float" - INTEGER = 96, // "integer" - ADD_ARRAY = 97, // ADD_ARRAY - THEN = 98, // THEN - TERN = 99, // TERN - NEG = 100, // NEG - ANIMREF = 101, // ANIMREF - PREINC = 102, // PREINC - PREDEC = 103, // PREDEC - POSTINC = 104, // POSTINC - POSTDEC = 105 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + WAITFRAME = 23, // "waitframe" + IF = 24, // "if" + ELSE = 25, // "else" + DO = 26, // "do" + WHILE = 27, // "while" + FOR = 28, // "for" + FOREACH = 29, // "foreach" + IN = 30, // "in" + SWITCH = 31, // "switch" + CASE = 32, // "case" + DEFAULT = 33, // "default" + BREAK = 34, // "break" + CONTINUE = 35, // "continue" + RETURN = 36, // "return" + BREAKPOINT = 37, // "breakpoint" + PROFBEGIN = 38, // "prof_begin" + PROFEND = 39, // "prof_end" + THREAD = 40, // "thread" + CHILDTHREAD = 41, // "childthread" + THISTHREAD = 42, // "thisthread" + CALL = 43, // "call" + TRUE = 44, // "true" + FALSE = 45, // "false" + UNDEFINED = 46, // "undefined" + SIZE = 47, // ".size" + GAME = 48, // "game" + SELF = 49, // "self" + ANIM = 50, // "anim" + LEVEL = 51, // "level" + LPAREN = 52, // "(" + RPAREN = 53, // ")" + LBRACE = 54, // "{" + RBRACE = 55, // "}" + LBRACKET = 56, // "[" + RBRACKET = 57, // "]" + COMMA = 58, // "," + DOT = 59, // "." + DOUBLECOLON = 60, // "::" + COLON = 61, // ":" + SEMICOLON = 62, // ";" + QMARK = 63, // "?" + INCREMENT = 64, // "++" + DECREMENT = 65, // "--" + LSHIFT = 66, // "<<" + RSHIFT = 67, // ">>" + OR = 68, // "||" + AND = 69, // "&&" + EQUALITY = 70, // "==" + INEQUALITY = 71, // "!=" + LESS_EQUAL = 72, // "<=" + GREATER_EQUAL = 73, // ">=" + LESS = 74, // "<" + GREATER = 75, // ">" + NOT = 76, // "!" + COMPLEMENT = 77, // "~" + ASSIGN = 78, // "=" + ASSIGN_ADD = 79, // "+=" + ASSIGN_SUB = 80, // "-=" + ASSIGN_MUL = 81, // "*=" + ASSIGN_DIV = 82, // "/=" + ASSIGN_MOD = 83, // "%=" + ASSIGN_BW_OR = 84, // "|=" + ASSIGN_BW_AND = 85, // "&=" + ASSIGN_BW_EXOR = 86, // "^=" + ASSIGN_RSHIFT = 87, // ">>=" + ASSIGN_LSHIFT = 88, // "<<=" + BITWISE_OR = 89, // "|" + BITWISE_AND = 90, // "&" + BITWISE_EXOR = 91, // "^" + ADD = 92, // "+" + SUB = 93, // "-" + MUL = 94, // "*" + DIV = 95, // "/" + MOD = 96, // "%" + FIELD = 97, // "field" + PATH = 98, // "path" + IDENTIFIER = 99, // "identifier" + STRING = 100, // "string literal" + ISTRING = 101, // "localized string" + COLOR = 102, // "color" + FLOAT = 103, // "float" + INTEGER = 104, // "integer" + ADD_ARRAY = 105, // ADD_ARRAY + THEN = 106, // THEN + TERN = 107, // TERN + NEG = 108, // NEG + ANIMREF = 109, // ANIMREF + PREINC = 110, // PREINC + PREDEC = 111, // PREDEC + POSTINC = 112, // POSTINC + POSTDEC = 113 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -798,195 +806,203 @@ namespace xsk { namespace gsc { namespace h1 { { enum symbol_kind_type { - YYNTOKENS = 106, ///< Number of tokens. + YYNTOKENS = 114, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_WAITFRAME = 15, // "waitframe" - S_IF = 16, // "if" - S_ELSE = 17, // "else" - S_DO = 18, // "do" - S_WHILE = 19, // "while" - S_FOR = 20, // "for" - S_FOREACH = 21, // "foreach" - S_IN = 22, // "in" - S_SWITCH = 23, // "switch" - S_CASE = 24, // "case" - S_DEFAULT = 25, // "default" - S_BREAK = 26, // "break" - S_CONTINUE = 27, // "continue" - S_RETURN = 28, // "return" - S_BREAKPOINT = 29, // "breakpoint" - S_PROFBEGIN = 30, // "prof_begin" - S_PROFEND = 31, // "prof_end" - S_THREAD = 32, // "thread" - S_CHILDTHREAD = 33, // "childthread" - S_THISTHREAD = 34, // "thisthread" - S_CALL = 35, // "call" - S_TRUE = 36, // "true" - S_FALSE = 37, // "false" - S_UNDEFINED = 38, // "undefined" - S_SIZE = 39, // ".size" - S_GAME = 40, // "game" - S_SELF = 41, // "self" - S_ANIM = 42, // "anim" - S_LEVEL = 43, // "level" - S_LPAREN = 44, // "(" - S_RPAREN = 45, // ")" - S_LBRACE = 46, // "{" - S_RBRACE = 47, // "}" - S_LBRACKET = 48, // "[" - S_RBRACKET = 49, // "]" - S_COMMA = 50, // "," - S_DOT = 51, // "." - S_DOUBLECOLON = 52, // "::" - S_COLON = 53, // ":" - S_SEMICOLON = 54, // ";" - S_QMARK = 55, // "?" - S_INCREMENT = 56, // "++" - S_DECREMENT = 57, // "--" - S_LSHIFT = 58, // "<<" - S_RSHIFT = 59, // ">>" - S_OR = 60, // "||" - S_AND = 61, // "&&" - S_EQUALITY = 62, // "==" - S_INEQUALITY = 63, // "!=" - S_LESS_EQUAL = 64, // "<=" - S_GREATER_EQUAL = 65, // ">=" - S_LESS = 66, // "<" - S_GREATER = 67, // ">" - S_NOT = 68, // "!" - S_COMPLEMENT = 69, // "~" - S_ASSIGN = 70, // "=" - S_ASSIGN_ADD = 71, // "+=" - S_ASSIGN_SUB = 72, // "-=" - S_ASSIGN_MUL = 73, // "*=" - S_ASSIGN_DIV = 74, // "/=" - S_ASSIGN_MOD = 75, // "%=" - S_ASSIGN_BW_OR = 76, // "|=" - S_ASSIGN_BW_AND = 77, // "&=" - S_ASSIGN_BW_EXOR = 78, // "^=" - S_ASSIGN_RSHIFT = 79, // ">>=" - S_ASSIGN_LSHIFT = 80, // "<<=" - S_BITWISE_OR = 81, // "|" - S_BITWISE_AND = 82, // "&" - S_BITWISE_EXOR = 83, // "^" - S_ADD = 84, // "+" - S_SUB = 85, // "-" - S_MUL = 86, // "*" - S_DIV = 87, // "/" - S_MOD = 88, // "%" - S_FIELD = 89, // "field" - S_PATH = 90, // "path" - S_IDENTIFIER = 91, // "identifier" - S_STRING = 92, // "string literal" - S_ISTRING = 93, // "localized string" - S_COLOR = 94, // "color" - S_FLOAT = 95, // "float" - S_INTEGER = 96, // "integer" - S_ADD_ARRAY = 97, // ADD_ARRAY - S_THEN = 98, // THEN - S_TERN = 99, // TERN - S_NEG = 100, // NEG - S_ANIMREF = 101, // ANIMREF - S_PREINC = 102, // PREINC - S_PREDEC = 103, // PREDEC - S_POSTINC = 104, // POSTINC - S_POSTDEC = 105, // POSTDEC - S_YYACCEPT = 106, // $accept - S_root = 107, // root - S_program = 108, // program - S_inline = 109, // inline - S_include = 110, // include - S_declaration = 111, // declaration - S_decl_usingtree = 112, // decl_usingtree - S_decl_constant = 113, // decl_constant - S_decl_thread = 114, // decl_thread - S_stmt = 115, // stmt - S_stmt_dev = 116, // stmt_dev - S_stmt_block = 117, // stmt_block - S_stmt_list = 118, // stmt_list - S_stmt_expr = 119, // stmt_expr - S_stmt_call = 120, // stmt_call - S_stmt_assign = 121, // stmt_assign - S_stmt_endon = 122, // stmt_endon - S_stmt_notify = 123, // stmt_notify - S_stmt_wait = 124, // stmt_wait - S_stmt_waittill = 125, // stmt_waittill - S_stmt_waittillmatch = 126, // stmt_waittillmatch - S_stmt_waittillframeend = 127, // stmt_waittillframeend - S_stmt_waitframe = 128, // stmt_waitframe - S_stmt_if = 129, // stmt_if - S_stmt_ifelse = 130, // stmt_ifelse - S_stmt_while = 131, // stmt_while - S_stmt_dowhile = 132, // stmt_dowhile - S_stmt_for = 133, // stmt_for - S_stmt_foreach = 134, // stmt_foreach - S_stmt_switch = 135, // stmt_switch - S_stmt_case = 136, // stmt_case - S_stmt_default = 137, // stmt_default - S_stmt_break = 138, // stmt_break - S_stmt_continue = 139, // stmt_continue - S_stmt_return = 140, // stmt_return - S_stmt_breakpoint = 141, // stmt_breakpoint - S_stmt_prof_begin = 142, // stmt_prof_begin - S_stmt_prof_end = 143, // stmt_prof_end - S_expr = 144, // expr - S_expr_or_empty = 145, // expr_or_empty - S_expr_assign = 146, // expr_assign - S_expr_increment = 147, // expr_increment - S_expr_decrement = 148, // expr_decrement - S_expr_ternary = 149, // expr_ternary - S_expr_binary = 150, // expr_binary - S_expr_primitive = 151, // expr_primitive - S_expr_complement = 152, // expr_complement - S_expr_not = 153, // expr_not - S_expr_call = 154, // expr_call - S_expr_method = 155, // expr_method - S_expr_function = 156, // expr_function - S_expr_pointer = 157, // expr_pointer - S_expr_add_array = 158, // expr_add_array - S_expr_parameters = 159, // expr_parameters - S_expr_arguments = 160, // expr_arguments - S_expr_arguments_no_empty = 161, // expr_arguments_no_empty - S_expr_reference = 162, // expr_reference - S_expr_array = 163, // expr_array - S_expr_field = 164, // expr_field - S_expr_size = 165, // expr_size - S_expr_paren = 166, // expr_paren - S_expr_object = 167, // expr_object - S_expr_thisthread = 168, // expr_thisthread - S_expr_empty_array = 169, // expr_empty_array - S_expr_undefined = 170, // expr_undefined - S_expr_game = 171, // expr_game - S_expr_self = 172, // expr_self - S_expr_anim = 173, // expr_anim - S_expr_level = 174, // expr_level - S_expr_animation = 175, // expr_animation - S_expr_animtree = 176, // expr_animtree - S_expr_identifier = 177, // expr_identifier - S_expr_path = 178, // expr_path - S_expr_istring = 179, // expr_istring - S_expr_string = 180, // expr_string - S_expr_color = 181, // expr_color - S_expr_vector = 182, // expr_vector - S_expr_float = 183, // expr_float - S_expr_integer = 184, // expr_integer - S_expr_false = 185, // expr_false - S_expr_true = 186 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_WAITFRAME = 23, // "waitframe" + S_IF = 24, // "if" + S_ELSE = 25, // "else" + S_DO = 26, // "do" + S_WHILE = 27, // "while" + S_FOR = 28, // "for" + S_FOREACH = 29, // "foreach" + S_IN = 30, // "in" + S_SWITCH = 31, // "switch" + S_CASE = 32, // "case" + S_DEFAULT = 33, // "default" + S_BREAK = 34, // "break" + S_CONTINUE = 35, // "continue" + S_RETURN = 36, // "return" + S_BREAKPOINT = 37, // "breakpoint" + S_PROFBEGIN = 38, // "prof_begin" + S_PROFEND = 39, // "prof_end" + S_THREAD = 40, // "thread" + S_CHILDTHREAD = 41, // "childthread" + S_THISTHREAD = 42, // "thisthread" + S_CALL = 43, // "call" + S_TRUE = 44, // "true" + S_FALSE = 45, // "false" + S_UNDEFINED = 46, // "undefined" + S_SIZE = 47, // ".size" + S_GAME = 48, // "game" + S_SELF = 49, // "self" + S_ANIM = 50, // "anim" + S_LEVEL = 51, // "level" + S_LPAREN = 52, // "(" + S_RPAREN = 53, // ")" + S_LBRACE = 54, // "{" + S_RBRACE = 55, // "}" + S_LBRACKET = 56, // "[" + S_RBRACKET = 57, // "]" + S_COMMA = 58, // "," + S_DOT = 59, // "." + S_DOUBLECOLON = 60, // "::" + S_COLON = 61, // ":" + S_SEMICOLON = 62, // ";" + S_QMARK = 63, // "?" + S_INCREMENT = 64, // "++" + S_DECREMENT = 65, // "--" + S_LSHIFT = 66, // "<<" + S_RSHIFT = 67, // ">>" + S_OR = 68, // "||" + S_AND = 69, // "&&" + S_EQUALITY = 70, // "==" + S_INEQUALITY = 71, // "!=" + S_LESS_EQUAL = 72, // "<=" + S_GREATER_EQUAL = 73, // ">=" + S_LESS = 74, // "<" + S_GREATER = 75, // ">" + S_NOT = 76, // "!" + S_COMPLEMENT = 77, // "~" + S_ASSIGN = 78, // "=" + S_ASSIGN_ADD = 79, // "+=" + S_ASSIGN_SUB = 80, // "-=" + S_ASSIGN_MUL = 81, // "*=" + S_ASSIGN_DIV = 82, // "/=" + S_ASSIGN_MOD = 83, // "%=" + S_ASSIGN_BW_OR = 84, // "|=" + S_ASSIGN_BW_AND = 85, // "&=" + S_ASSIGN_BW_EXOR = 86, // "^=" + S_ASSIGN_RSHIFT = 87, // ">>=" + S_ASSIGN_LSHIFT = 88, // "<<=" + S_BITWISE_OR = 89, // "|" + S_BITWISE_AND = 90, // "&" + S_BITWISE_EXOR = 91, // "^" + S_ADD = 92, // "+" + S_SUB = 93, // "-" + S_MUL = 94, // "*" + S_DIV = 95, // "/" + S_MOD = 96, // "%" + S_FIELD = 97, // "field" + S_PATH = 98, // "path" + S_IDENTIFIER = 99, // "identifier" + S_STRING = 100, // "string literal" + S_ISTRING = 101, // "localized string" + S_COLOR = 102, // "color" + S_FLOAT = 103, // "float" + S_INTEGER = 104, // "integer" + S_ADD_ARRAY = 105, // ADD_ARRAY + S_THEN = 106, // THEN + S_TERN = 107, // TERN + S_NEG = 108, // NEG + S_ANIMREF = 109, // ANIMREF + S_PREINC = 110, // PREINC + S_PREDEC = 111, // PREDEC + S_POSTINC = 112, // POSTINC + S_POSTDEC = 113, // POSTDEC + S_YYACCEPT = 114, // $accept + S_root = 115, // root + S_program = 116, // program + S_inline = 117, // inline + S_include = 118, // include + S_declaration = 119, // declaration + S_decl_usingtree = 120, // decl_usingtree + S_decl_constant = 121, // decl_constant + S_decl_thread = 122, // decl_thread + S_stmt = 123, // stmt + S_stmt_dev = 124, // stmt_dev + S_stmt_block = 125, // stmt_block + S_stmt_list = 126, // stmt_list + S_stmt_expr = 127, // stmt_expr + S_stmt_call = 128, // stmt_call + S_stmt_assign = 129, // stmt_assign + S_stmt_endon = 130, // stmt_endon + S_stmt_notify = 131, // stmt_notify + S_stmt_wait = 132, // stmt_wait + S_stmt_waittill = 133, // stmt_waittill + S_stmt_waittillmatch = 134, // stmt_waittillmatch + S_stmt_waittillframeend = 135, // stmt_waittillframeend + S_stmt_waitframe = 136, // stmt_waitframe + S_stmt_if = 137, // stmt_if + S_stmt_ifelse = 138, // stmt_ifelse + S_stmt_while = 139, // stmt_while + S_stmt_dowhile = 140, // stmt_dowhile + S_stmt_for = 141, // stmt_for + S_stmt_foreach = 142, // stmt_foreach + S_stmt_switch = 143, // stmt_switch + S_stmt_case = 144, // stmt_case + S_stmt_default = 145, // stmt_default + S_stmt_break = 146, // stmt_break + S_stmt_continue = 147, // stmt_continue + S_stmt_return = 148, // stmt_return + S_stmt_breakpoint = 149, // stmt_breakpoint + S_stmt_prof_begin = 150, // stmt_prof_begin + S_stmt_prof_end = 151, // stmt_prof_end + S_expr = 152, // expr + S_expr_or_empty = 153, // expr_or_empty + S_expr_assign = 154, // expr_assign + S_expr_increment = 155, // expr_increment + S_expr_decrement = 156, // expr_decrement + S_expr_ternary = 157, // expr_ternary + S_expr_binary = 158, // expr_binary + S_expr_primitive = 159, // expr_primitive + S_expr_complement = 160, // expr_complement + S_expr_not = 161, // expr_not + S_expr_call = 162, // expr_call + S_expr_method = 163, // expr_method + S_expr_function = 164, // expr_function + S_expr_pointer = 165, // expr_pointer + S_expr_add_array = 166, // expr_add_array + S_expr_parameters = 167, // expr_parameters + 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 = 185, // expr_identifier + S_expr_path = 186, // expr_path + S_expr_istring = 187, // expr_istring + S_expr_string = 188, // expr_string + S_expr_color = 189, // expr_color + 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 }; }; @@ -2781,6 +2797,126 @@ switch (yykind) return symbol_type (token::H1UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5364,7 +5500,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::h1 -#line 5368 "parser.hpp" +#line 5504 "parser.hpp" diff --git a/src/h2/xsk/lexer.cpp b/src/h2/xsk/lexer.cpp index b8f1521e..e71428f7 100644 --- a/src/h2/xsk/lexer.cpp +++ b/src/h2/xsk/lexer.cpp @@ -16,58 +16,6 @@ xsk::gsc::h2::parser::symbol_type H2lex(xsk::gsc::h2::lexer& lexer) namespace xsk::gsc::h2 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_waitframe, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -130,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -141,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -152,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -165,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -173,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -194,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type if (header_top_ > 0) pop_header(); else - return h2::parser::make_H2EOF(loc_); + return parser::make_H2EOF(loc_); } reader_.advance(); @@ -212,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return h2::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return h2::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return h2::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -291,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type indev_ = false; reader_.advance(); - return h2::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -304,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return h2::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return h2::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -324,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::h2::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return h2::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return h2::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return h2::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return h2::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return h2::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return h2::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return h2::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return h2::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return h2::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return h2::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return h2::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return h2::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return h2::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return h2::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return h2::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return h2::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return h2::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return h2::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return h2::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return h2::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return h2::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return h2::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return h2::parser::make_OR(loc_); + return parser::make_OR(loc_); - return h2::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return h2::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return h2::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return h2::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return h2::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return h2::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return h2::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return h2::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return h2::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return h2::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return h2::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return h2::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return h2::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return h2::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return h2::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return h2::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return h2::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -497,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return h2::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return h2::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -534,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return h2::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return h2::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::H2UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return h2::parser::make_PATH(xsk::gsc::h2::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return h2::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return h2::parser::make_IDENTIFIER(xsk::gsc::h2::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return h2::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -622,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return h2::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return h2::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -656,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return h2::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -690,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return h2::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -724,179 +683,60 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return h2::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::h2::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return h2::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return h2::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return h2::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return h2::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return h2::parser::make_ENDON(loc_); - case keyword::KW_notify: - return h2::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return h2::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return h2::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return h2::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return h2::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_waitframe: - return h2::parser::make_WAITFRAME(loc_); - case keyword::KW_if: - return h2::parser::make_IF(loc_); - case keyword::KW_else: - return h2::parser::make_ELSE(loc_); - case keyword::KW_do: - return h2::parser::make_DO(loc_); - case keyword::KW_while: - return h2::parser::make_WHILE(loc_); - case keyword::KW_for: - return h2::parser::make_FOR(loc_); - case keyword::KW_foreach: - return h2::parser::make_FOREACH(loc_); - case keyword::KW_in: - return h2::parser::make_IN(loc_); - case keyword::KW_switch: - return h2::parser::make_SWITCH(loc_); - case keyword::KW_case: - return h2::parser::make_CASE(loc_); - case keyword::KW_default: - return h2::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return h2::parser::make_BREAK(loc_); - case keyword::KW_continue: - return h2::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return h2::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return h2::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return h2::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return h2::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return h2::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return h2::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return h2::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return h2::parser::make_CALL(loc_); - case keyword::KW_true: - return h2::parser::make_TRUE(loc_); - case keyword::KW_false: - return h2::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return h2::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return h2::parser::make_SIZE(loc_); - case keyword::KW_game: - return h2::parser::make_GAME(loc_); - case keyword::KW_self: - return h2::parser::make_SELF(loc_); - case keyword::KW_anim: - return h2::parser::make_ANIM(loc_); - case keyword::KW_level: - return h2::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "waitframe", keyword::KW_waitframe }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "waitframe", parser::token::WAITFRAME }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::h2 diff --git a/src/h2/xsk/lexer.hpp b/src/h2/xsk/lexer.hpp index f7f147c3..1c386d53 100644 --- a/src/h2/xsk/lexer.hpp +++ b/src/h2/xsk/lexer.hpp @@ -8,8 +8,6 @@ namespace xsk::gsc::h2 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -51,26 +49,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::h2::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::h2::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::h2 diff --git a/src/h2/xsk/parser.cpp b/src/h2/xsk/parser.cpp index 4d499484..b4b6c6f9 100644 --- a/src/h2/xsk/parser.cpp +++ b/src/h2/xsk/parser.cpp @@ -1984,1303 +1984,1303 @@ namespace xsk { namespace gsc { namespace h2 { switch (yyn) { case 2: // root: program -#line 246 "parser.ypp" +#line 254 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1990 "parser.cpp" break; case 3: // root: %empty -#line 247 "parser.ypp" +#line 255 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1996 "parser.cpp" break; case 4: // program: program inline -#line 252 "parser.ypp" +#line 260 "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 254 "parser.ypp" +#line 262 "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 256 "parser.ypp" +#line 264 "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 258 "parser.ypp" +#line 266 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; case 8: // program: include -#line 260 "parser.ypp" +#line 268 "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 2026 "parser.cpp" break; case 9: // program: declaration -#line 262 "parser.ypp" +#line 270 "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 2032 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 266 "parser.ypp" +#line 274 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2038 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 271 "parser.ypp" +#line 279 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2044 "parser.cpp" break; case 12: // declaration: "/#" -#line 275 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; case 13: // declaration: "#/" -#line 276 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2056 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2062 "parser.cpp" break; case 15: // declaration: decl_constant -#line 278 "parser.ypp" +#line 286 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2068 "parser.cpp" break; case 16: // declaration: decl_thread -#line 279 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2074 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 284 "parser.ypp" - { lexer.restrict_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 292 "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 2080 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 289 "parser.ypp" +#line 297 "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 2086 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 294 "parser.ypp" - { lexer.restrict_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 302 "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 2092 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 298 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2098 "parser.cpp" break; case 21: // stmt: stmt_block -#line 299 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2104 "parser.cpp" break; case 22: // stmt: stmt_call -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2110 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2116 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2122 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2128 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2134 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2140 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2146 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2152 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2158 "parser.cpp" break; case 31: // stmt: stmt_if -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2164 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2170 "parser.cpp" break; case 33: // stmt: stmt_while -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2176 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2182 "parser.cpp" break; case 35: // stmt: stmt_for -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2188 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2194 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2200 "parser.cpp" break; case 38: // stmt: stmt_case -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2206 "parser.cpp" break; case 39: // stmt: stmt_default -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2212 "parser.cpp" break; case 40: // stmt: stmt_break -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2218 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2224 "parser.cpp" break; case 42: // stmt: stmt_return -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2230 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 321 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2236 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 322 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2242 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 323 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2248 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 327 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2254 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 328 "parser.ypp" +#line 336 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2260 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 332 "parser.ypp" +#line 340 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2266 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 333 "parser.ypp" +#line 341 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2272 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 338 "parser.ypp" +#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 2278 "parser.cpp" break; case 51: // stmt_list: stmt -#line 340 "parser.ypp" +#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 2284 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 345 "parser.ypp" +#line 353 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2290 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 347 "parser.ypp" +#line 355 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2296 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 349 "parser.ypp" +#line 357 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2302 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 351 "parser.ypp" +#line 359 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2308 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 356 "parser.ypp" +#line 364 "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 2314 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 358 "parser.ypp" +#line 366 "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 2320 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 363 "parser.ypp" +#line 371 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2326 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 365 "parser.ypp" +#line 373 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 367 "parser.ypp" +#line 375 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 372 "parser.ypp" +#line 380 "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 2344 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 377 "parser.ypp" +#line 385 "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 2350 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 379 "parser.ypp" +#line 387 "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 2356 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 384 "parser.ypp" +#line 392 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2362 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 389 "parser.ypp" +#line 397 "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 2368 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 391 "parser.ypp" +#line 399 "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 2374 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 396 "parser.ypp" +#line 404 "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 2380 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 398 "parser.ypp" +#line 406 "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 2386 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 403 "parser.ypp" +#line 411 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2392 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 408 "parser.ypp" +#line 416 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2398 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 410 "parser.ypp" +#line 418 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2404 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 415 "parser.ypp" +#line 423 "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 2410 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 420 "parser.ypp" +#line 428 "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 2416 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 425 "parser.ypp" +#line 433 "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 2422 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 430 "parser.ypp" +#line 438 "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 2428 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 435 "parser.ypp" +#line 443 "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 2434 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 440 "parser.ypp" +#line 448 "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 2440 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 442 "parser.ypp" +#line 450 "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 2446 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 447 "parser.ypp" +#line 455 "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 2452 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 452 "parser.ypp" +#line 460 "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 2458 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 454 "parser.ypp" +#line 462 "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 2464 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 459 "parser.ypp" +#line 467 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2470 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 464 "parser.ypp" +#line 472 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2476 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 469 "parser.ypp" +#line 477 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2482 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 474 "parser.ypp" +#line 482 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2488 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 476 "parser.ypp" +#line 484 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 481 "parser.ypp" +#line 489 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2500 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 486 "parser.ypp" +#line 494 "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 2506 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 491 "parser.ypp" +#line 499 "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 2512 "parser.cpp" break; case 90: // expr: expr_ternary -#line 495 "parser.ypp" +#line 503 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2518 "parser.cpp" break; case 91: // expr: expr_binary -#line 496 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2524 "parser.cpp" break; case 92: // expr: expr_primitive -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2530 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2536 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 502 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2542 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 507 "parser.ypp" +#line 515 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2572 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 517 "parser.ypp" +#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 519 "parser.ypp" +#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 521 "parser.ypp" +#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 523 "parser.ypp" +#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 525 "parser.ypp" +#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 527 "parser.ypp" +#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 532 "parser.ypp" +#line 540 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2614 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 534 "parser.ypp" +#line 542 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2620 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 539 "parser.ypp" +#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); } #line 2626 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 541 "parser.ypp" +#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); } #line 2632 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 546 "parser.ypp" +#line 554 "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 2638 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 551 "parser.ypp" +#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 2644 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 553 "parser.ypp" +#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 2650 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().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 114: // expr_binary: expr "!=" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().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 115: // expr_binary: expr "<=" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().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 116: // expr_binary: expr ">=" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().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 117: // expr_binary: expr "<" expr -#line 563 "parser.ypp" +#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 565 "parser.ypp" +#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 567 "parser.ypp" +#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 569 "parser.ypp" +#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 571 "parser.ypp" +#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 573 "parser.ypp" +#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 575 "parser.ypp" +#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 577 "parser.ypp" +#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 579 "parser.ypp" +#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 581 "parser.ypp" +#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 583 "parser.ypp" +#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 585 "parser.ypp" +#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 589 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2752 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 590 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2758 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2764 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2770 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2776 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2782 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2788 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2794 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2800 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2806 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2812 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2818 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2824 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2830 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2836 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2842 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2848 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2854 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 607 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2860 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 608 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2866 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 609 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2872 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 610 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2878 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2884 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 612 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2890 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 613 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2896 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 614 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2902 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 615 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2908 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2914 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2920 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 626 "parser.ypp" +#line 634 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2926 "parser.cpp" break; case 159: // expr_call: expr_function -#line 630 "parser.ypp" +#line 638 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2932 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 631 "parser.ypp" +#line 639 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2938 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 634 "parser.ypp" +#line 642 "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 2944 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 635 "parser.ypp" +#line 643 "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 2950 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 648 "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 2956 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 650 "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 2962 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 652 "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 2968 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 654 "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 2974 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 656 "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 2980 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 658 "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 2986 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 655 "parser.ypp" +#line 663 "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 2992 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 665 "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 2998 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 667 "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 3004 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 661 "parser.ypp" +#line 669 "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 3010 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 666 "parser.ypp" +#line 674 "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 3016 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 671 "parser.ypp" +#line 679 "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 3022 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 673 "parser.ypp" +#line 681 "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 3028 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 675 "parser.ypp" +#line 683 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3034 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 680 "parser.ypp" +#line 688 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3040 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 682 "parser.ypp" +#line 690 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3046 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 687 "parser.ypp" +#line 695 "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 3052 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 689 "parser.ypp" +#line 697 "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 3058 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 694 "parser.ypp" +#line 702 "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 3064 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3070 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 701 "parser.ypp" +#line 709 "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 3076 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 706 "parser.ypp" +#line 714 "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 3082 "parser.cpp" break; case 185: // expr_field: expr_object "field" -#line 708 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3088 "parser.cpp" break; case 186: // expr_size: expr_object ".size" -#line 713 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3094 "parser.cpp" break; case 187: // expr_paren: "(" expr ")" -#line 718 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3100 "parser.cpp" break; case 188: // expr_object: expr_call -#line 722 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3106 "parser.cpp" break; case 189: // expr_object: expr_method -#line 723 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3112 "parser.cpp" break; case 190: // expr_object: expr_array -#line 724 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3118 "parser.cpp" break; case 191: // expr_object: expr_field -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3124 "parser.cpp" break; case 192: // expr_object: expr_game -#line 726 "parser.ypp" +#line 734 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3130 "parser.cpp" break; case 193: // expr_object: expr_self -#line 727 "parser.ypp" +#line 735 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3136 "parser.cpp" break; case 194: // expr_object: expr_anim -#line 728 "parser.ypp" +#line 736 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3142 "parser.cpp" break; case 195: // expr_object: expr_level -#line 729 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3148 "parser.cpp" break; case 196: // expr_object: expr_identifier -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3154 "parser.cpp" break; case 197: // expr_thisthread: "thisthread" -#line 735 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3160 "parser.cpp" break; case 198: // expr_empty_array: "[" "]" -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3166 "parser.cpp" break; case 199: // expr_undefined: "undefined" -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3172 "parser.cpp" break; case 200: // expr_game: "game" -#line 750 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3178 "parser.cpp" break; case 201: // expr_self: "self" -#line 755 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3184 "parser.cpp" break; case 202: // expr_anim: "anim" -#line 760 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3190 "parser.cpp" break; case 203: // expr_level: "level" -#line 765 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3196 "parser.cpp" break; case 204: // expr_animation: "%" "identifier" -#line 770 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3202 "parser.cpp" break; case 205: // expr_animtree: "#animtree" -#line 775 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3208 "parser.cpp" break; case 206: // expr_identifier: "identifier" -#line 780 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3214 "parser.cpp" break; case 207: // expr_path: "path" -#line 785 "parser.ypp" +#line 793 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3220 "parser.cpp" break; case 208: // expr_path: expr_identifier -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3226 "parser.cpp" break; case 209: // expr_istring: "localized string" -#line 792 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3232 "parser.cpp" break; case 210: // expr_string: "string literal" -#line 797 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3238 "parser.cpp" break; case 211: // expr_color: "color" -#line 802 "parser.ypp" +#line 810 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3244 "parser.cpp" break; case 212: // expr_vector: "(" expr "," expr "," expr ")" -#line 807 "parser.ypp" +#line 815 "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 3250 "parser.cpp" break; case 213: // expr_float: "-" "float" -#line 812 "parser.ypp" +#line 820 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3256 "parser.cpp" break; case 214: // expr_float: "float" -#line 814 "parser.ypp" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3262 "parser.cpp" break; case 215: // expr_integer: "-" "integer" -#line 819 "parser.ypp" +#line 827 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3268 "parser.cpp" break; case 216: // expr_integer: "integer" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3274 "parser.cpp" break; case 217: // expr_false: "false" -#line 826 "parser.ypp" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; case 218: // expr_true: "true" -#line 831 "parser.ypp" +#line 839 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; @@ -3470,7 +3470,8 @@ namespace xsk { namespace gsc { namespace h2 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "waitframe", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", @@ -3773,50 +3774,50 @@ namespace xsk { namespace gsc { namespace h2 { const short parser::yypact_[] = { - 13, -267, -267, 8, 8, -11, -267, 27, 13, -267, - -267, -267, -267, -267, -267, -31, -267, -267, -16, -10, - -42, -267, -267, -267, -267, -38, 1203, -267, -267, -267, - 20, -21, -267, -267, -17, -5, -267, 29, -267, -267, - -267, -267, -267, -267, -267, 1203, 1073, -38, 1203, 1203, - 52, -2, -267, -267, -267, -267, 2007, -267, -267, -267, - -267, -267, 31, 354, -267, -267, -267, -267, 440, 813, - -267, -267, 943, -267, -267, -267, 1169, 1234, 1282, 1296, - -267, -267, 556, 49, -267, -267, -267, -267, -267, -267, - -267, -267, 43, 35, -38, 69, 79, 85, 93, 113, - 110, 119, 1333, 1073, -267, 2090, 118, 120, -267, -267, - -267, -267, -267, -267, -267, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, -267, 1268, -38, -267, -267, -267, - 126, 122, 1203, -38, -267, 787, -267, -267, 1203, 1203, - -38, 1203, 1203, -38, 1203, -267, 1203, 1069, 1203, -267, - 1972, 142, 142, 2121, 2131, 617, 617, 44, 44, 44, - 44, 2162, 2203, 2172, 73, 73, -267, -267, -267, 1777, - -267, -38, -8, -267, 128, 865, 1203, 129, -18, 132, - 1047, 136, 138, 143, 144, -64, 148, 135, 141, 1138, - 149, 153, 158, -267, 159, 123, 123, -267, -267, -267, - 917, -267, -267, -267, -267, -267, -267, -267, -267, -267, + 5, -267, -267, 49, 49, -28, -267, 26, 5, -267, + -267, -267, -267, -267, -267, -39, -267, -267, -34, -32, + -64, -267, -267, -267, -267, -61, 1195, -267, -267, -267, + 8, -26, -267, -267, -25, -13, -267, -3, -267, -267, + -267, -267, -267, -267, -267, 1195, 1065, -61, 1195, 1195, + -14, -55, -267, -267, -267, -267, 1999, -267, -267, -267, + -267, -267, 23, 346, -267, -267, -267, -267, 432, 805, + -267, -267, 935, -267, -267, -267, 1161, 1226, 1274, 1288, + -267, -267, 548, 17, -267, -267, -267, -267, -267, -267, + -267, -267, 3, 27, -61, 41, 31, 57, 42, 71, + 77, 45, 1325, 1065, -267, 2082, 83, 111, -267, -267, + -267, -267, -267, -267, -267, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, -267, 1260, -61, -267, -267, -267, + 117, 110, 1195, -61, -267, 779, -267, -267, 1195, 1195, + -61, 1195, 1195, -61, 1195, -267, 1195, 1061, 1195, -267, + 1964, 134, 134, 2113, 2123, 609, 609, 36, 36, 36, + 36, 2154, 2195, 2164, 65, 65, -267, -267, -267, 1769, + -267, -61, -16, -267, 122, 857, 1195, 118, -29, 124, + 1039, 130, 131, 135, 136, -5, 128, 133, 139, 1130, + 140, 145, 151, -267, 152, 115, 115, -267, -267, -267, + 909, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, - -267, -267, -267, -267, -267, 154, 155, 161, 165, 177, - -267, -267, 36, -267, -267, -267, -267, -22, 1817, 7, - 188, 1857, 9, 190, 1897, 1936, 186, 2090, 1203, -267, - 128, -267, 1203, -267, 995, 2042, -267, 192, -267, 1203, - 219, 1203, 542, -38, 1203, 150, 194, 196, -267, -267, - -267, -267, 2077, -267, 1203, 1203, 1203, -267, -267, 185, - 185, -267, -267, -267, -267, -267, -267, -267, 201, 206, - 207, 209, -267, -267, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 205, -267, 1203, 208, -267, - 1203, 210, 1203, 211, 2090, 11, -267, -267, 202, 1499, - 217, 1533, 213, -267, -267, -267, 677, 1, 1567, -267, - -267, -267, 17, 38, 1069, 1203, 1203, 1203, 1203, 2090, - 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, - 218, 45, 221, 46, 224, 1601, 1203, -267, -267, 1047, - 1203, 1047, 1203, 1203, -38, 35, 223, 225, 1635, 1377, - 1421, 1465, 1203, -267, 1203, -267, 1203, -267, 55, 264, - 1669, -267, 2090, 231, 1703, 241, -267, -267, -267, 232, - 233, 1203, 234, 1203, 237, 1203, 74, 90, 99, -267, - 1047, 238, 542, 1047, 1203, -267, -267, 248, -267, 249, - -267, 255, -267, -267, -267, -267, -267, 256, -267, 1737, - 251, 253, 254, 1047, 1047, -267, -267, -267, -267, -267 + -267, -267, -267, -267, -267, 147, 153, 157, 169, 170, + -267, -267, 28, -267, -267, -267, -267, -31, 1809, -2, + 155, 1849, -1, 182, 1889, 1928, 178, 2082, 1195, -267, + 122, -267, 1195, -267, 987, 2034, -267, 184, -267, 1195, + 211, 1195, 534, -61, 1195, 141, 185, 186, -267, -267, + -267, -267, 2069, -267, 1195, 1195, 1195, -267, -267, 177, + 177, -267, -267, -267, -267, -267, -267, -267, 197, 198, + 199, 201, -267, -267, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 200, -267, 1195, 202, -267, + 1195, 204, 1195, 203, 2082, 1, -267, -267, 192, 1491, + 210, 1525, 194, -267, -267, -267, 669, -8, 1559, -267, + -267, -267, 9, 38, 1061, 1195, 1195, 1195, 1195, 2082, + 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, + 213, 47, 215, 66, 216, 1593, 1195, -267, -267, 1039, + 1195, 1039, 1195, 1195, -61, 27, 217, 219, 1627, 1369, + 1413, 1457, 1195, -267, 1195, -267, 1195, -267, 82, 238, + 1661, -267, 2082, 223, 1695, 247, -267, -267, -267, 224, + 225, 1195, 226, 1195, 229, 1195, 91, 104, 114, -267, + 1039, 230, 534, 1039, 1195, -267, -267, 240, -267, 241, + -267, 248, -267, -267, -267, -267, -267, 249, -267, 1729, + 243, 244, 245, 1039, 1039, -267, -267, -267, -267, -267 }; const unsigned char @@ -3871,8 +3872,8 @@ namespace xsk { namespace gsc { namespace h2 { const short parser::yypgoto_[] = { - -267, -267, -267, 294, 298, 301, -267, -267, -267, -72, - -267, -91, 146, -83, -267, -267, -267, -267, -267, -267, + -267, -267, -267, 292, 300, 301, -267, -267, -267, -72, + -267, -91, 144, -81, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 195, -267, -266, -260, -258, -267, -267, -267, -267, -267, -130, -12, @@ -3901,38 +3902,38 @@ namespace xsk { namespace gsc { namespace h2 { { 15, 107, 146, 17, 17, 138, 333, 139, 15, 18, 19, 30, 334, 25, 335, 238, 1, 2, 3, 4, - 5, 275, 142, 373, 93, 32, 267, 21, 29, 94, - -208, 95, 55, 20, 96, 99, 268, 261, 27, 26, - 97, 100, 158, 98, 28, 298, 299, 108, 300, 301, - 29, 374, 316, 6, 319, 238, 367, 158, 107, 158, - 238, 158, 376, -188, -188, 92, -188, 158, 34, 35, - -188, 37, 140, 16, 6, 287, 287, 101, 141, -188, - 238, 145, -188, 377, 135, 16, 6, 136, 158, 113, - 383, 385, 302, 303, 147, 158, 158, 144, 16, 6, - 409, 143, 116, 117, 6, 158, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 148, 270, 422, - -188, -188, -188, 149, 158, 137, 16, 6, 129, 130, - 131, 132, 133, 239, 238, 423, 180, 150, 292, 240, - 158, 151, 287, 184, 424, 247, 333, 111, 112, 158, - 250, 141, 334, 253, 335, 34, 35, 152, 37, 131, - 132, 133, 153, 41, 42, 43, 44, 154, 158, 159, - 142, 204, 262, 239, 181, 138, 269, 139, 239, 240, - 271, 260, 272, 266, 240, 247, 276, 273, 274, 279, - 247, 141, 292, 288, 288, 280, 141, 284, 239, 240, - 240, 278, 285, 283, 240, 247, 247, 286, 293, 294, - 247, 141, 141, 16, 6, 295, 141, 34, 35, 296, + 5, 142, 373, 267, 20, 32, 21, 93, 27, -208, + 28, 95, 94, 268, 96, 99, 29, 261, 6, 26, + 97, 100, 158, 98, 113, 298, 299, 108, 300, 301, + 374, 316, 319, 101, 367, 238, 158, 158, 107, 158, + 238, 92, 376, -188, -188, 144, -188, 158, 34, 35, + -188, 37, 140, 16, 6, 287, 287, 143, 141, -188, + 238, 145, -188, 149, 135, 16, 6, 136, 275, 111, + 112, 377, 302, 303, 147, 29, 158, 148, 151, 55, + 383, 154, 116, 117, 6, 158, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 150, 270, 385, + -188, -188, -188, 152, 158, 137, 16, 6, 129, 130, + 131, 132, 133, 239, 238, 409, 180, 153, 292, 240, + 158, 158, 287, 184, 422, 247, 333, 16, 6, 158, + 250, 141, 334, 253, 335, 34, 35, 423, 37, 131, + 132, 133, 158, 41, 42, 43, 44, 424, 159, 142, + 181, 204, 158, 239, 262, 138, 269, 139, 239, 240, + 266, 260, 271, 272, 240, 247, 276, 273, 274, 278, + 247, 141, 292, 288, 288, 279, 141, 284, 239, 240, + 240, 280, 283, 285, 240, 247, 247, 317, 286, 293, + 247, 141, 141, 16, 6, 294, 141, 34, 35, 295, 37, 56, 138, 138, 139, 139, 129, 130, 131, 132, - 133, 297, 317, 135, 320, 323, 136, 328, 330, 238, - 102, 238, 140, 109, 110, 345, 112, 339, 141, 340, - 346, 347, 239, 348, 360, 366, 368, 362, 240, 364, - 288, 370, 382, 414, 247, 384, 240, 372, 386, 138, - 141, 139, 247, 337, 137, 16, 6, 397, 141, 398, - 238, 410, 287, 238, 396, 412, 415, 416, 418, 140, + 133, 296, 297, 135, 320, 323, 136, 328, 330, 238, + 102, 238, 140, 109, 110, 112, 339, 340, 141, 345, + 346, 347, 239, 348, 368, 366, 372, 360, 240, 362, + 288, 364, 370, 410, 247, 382, 240, 384, 386, 138, + 141, 139, 247, 337, 137, 16, 6, 414, 141, 397, + 238, 398, 287, 238, 396, 412, 415, 416, 418, 140, 140, 420, 426, 430, 431, 141, 141, 389, 157, 391, - 432, 433, 22, 238, 238, 435, 23, 436, 437, 24, + 22, 432, 433, 238, 238, 435, 436, 437, 23, 24, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 427, - 179, 264, 277, 0, 0, 0, 140, 0, 425, 0, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 264, + 179, 427, 277, 0, 0, 0, 140, 0, 425, 0, 0, 428, 141, 248, 0, 0, 251, 0, 0, 254, 0, 255, 0, 257, 0, 0, 417, 239, 419, 239, 421, 438, 439, 240, 0, 240, 0, 0, 0, 247, @@ -4135,311 +4136,311 @@ namespace xsk { namespace gsc { namespace h2 { parser::yycheck_[] = { 0, 46, 93, 3, 4, 72, 272, 72, 8, 3, - 4, 20, 272, 44, 272, 145, 3, 4, 5, 6, - 7, 85, 44, 22, 45, 25, 44, 0, 92, 50, - 52, 48, 96, 44, 34, 35, 54, 45, 54, 70, - 34, 35, 50, 48, 54, 9, 10, 47, 12, 13, - 92, 50, 45, 91, 45, 185, 45, 50, 103, 50, - 190, 50, 45, 32, 33, 45, 35, 50, 32, 33, - 39, 35, 72, 90, 91, 205, 206, 48, 72, 48, - 210, 46, 51, 45, 48, 90, 91, 51, 50, 91, - 45, 45, 56, 57, 94, 50, 50, 54, 90, 91, - 45, 52, 58, 59, 91, 50, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 190, 45, - 89, 90, 91, 44, 50, 89, 90, 91, 84, 85, - 86, 87, 88, 145, 264, 45, 136, 52, 210, 145, - 50, 48, 272, 143, 45, 145, 412, 95, 96, 50, - 150, 145, 412, 153, 412, 32, 33, 44, 35, 86, - 87, 88, 52, 40, 41, 42, 43, 48, 50, 49, - 44, 48, 44, 185, 52, 242, 44, 242, 190, 185, - 44, 181, 44, 54, 190, 185, 195, 44, 44, 54, - 190, 185, 264, 205, 206, 54, 190, 44, 210, 205, - 206, 53, 44, 54, 210, 205, 206, 48, 54, 54, - 210, 205, 206, 90, 91, 54, 210, 32, 33, 54, - 35, 26, 289, 290, 289, 290, 84, 85, 86, 87, - 88, 54, 44, 48, 44, 49, 51, 45, 19, 369, - 45, 371, 242, 48, 49, 44, 96, 53, 242, 53, - 44, 44, 264, 44, 49, 44, 54, 49, 264, 49, - 272, 44, 44, 22, 264, 44, 272, 54, 44, 336, - 264, 336, 272, 273, 89, 90, 91, 54, 272, 54, - 410, 17, 412, 413, 375, 54, 54, 54, 54, 289, - 290, 54, 54, 45, 45, 289, 290, 369, 103, 371, - 45, 45, 8, 433, 434, 54, 8, 54, 54, 8, + 4, 20, 272, 52, 272, 145, 11, 12, 13, 14, + 15, 52, 30, 52, 52, 25, 0, 53, 62, 60, + 62, 56, 58, 62, 34, 35, 100, 53, 99, 78, + 34, 35, 58, 56, 99, 17, 18, 47, 20, 21, + 58, 53, 53, 56, 53, 185, 58, 58, 103, 58, + 190, 53, 53, 40, 41, 62, 43, 58, 40, 41, + 47, 43, 72, 98, 99, 205, 206, 60, 72, 56, + 210, 54, 59, 52, 56, 98, 99, 59, 93, 103, + 104, 53, 64, 65, 94, 100, 58, 56, 56, 104, + 53, 56, 66, 67, 99, 58, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 60, 190, 53, + 97, 98, 99, 52, 58, 97, 98, 99, 92, 93, + 94, 95, 96, 145, 264, 53, 136, 60, 210, 145, + 58, 58, 272, 143, 53, 145, 412, 98, 99, 58, + 150, 145, 412, 153, 412, 40, 41, 53, 43, 94, + 95, 96, 58, 48, 49, 50, 51, 53, 57, 52, + 60, 56, 58, 185, 52, 242, 52, 242, 190, 185, + 62, 181, 52, 52, 190, 185, 195, 52, 52, 61, + 190, 185, 264, 205, 206, 62, 190, 52, 210, 205, + 206, 62, 62, 52, 210, 205, 206, 52, 56, 62, + 210, 205, 206, 98, 99, 62, 210, 40, 41, 62, + 43, 26, 289, 290, 289, 290, 92, 93, 94, 95, + 96, 62, 62, 56, 52, 57, 59, 53, 27, 369, + 45, 371, 242, 48, 49, 104, 61, 61, 242, 52, + 52, 52, 264, 52, 62, 52, 62, 57, 264, 57, + 272, 57, 52, 25, 264, 52, 272, 52, 52, 336, + 264, 336, 272, 273, 97, 98, 99, 30, 272, 62, + 410, 62, 412, 413, 375, 62, 62, 62, 62, 289, + 290, 62, 62, 53, 53, 289, 290, 369, 103, 371, + 8, 53, 53, 433, 434, 62, 62, 62, 8, 8, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 412, - 135, 185, 195, -1, -1, -1, 336, -1, 410, -1, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 185, + 135, 412, 195, -1, -1, -1, 336, -1, 410, -1, -1, 413, 336, 148, -1, -1, 151, -1, -1, 154, -1, 156, -1, 158, -1, -1, 401, 369, 403, 371, 405, 433, 434, 369, -1, 371, -1, -1, -1, 369, -1, 371, -1, -1, 374, 369, -1, 371, -1, -1, - -1, 186, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 145, -1, 39, 199, -1, -1, 145, 410, -1, - 412, 413, 48, -1, 410, 51, 412, 413, -1, -1, + -1, 186, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 145, -1, 47, 199, -1, -1, 145, 410, -1, + 412, 413, 56, -1, 410, 59, 412, 413, -1, -1, 410, -1, 412, 413, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, 145, -1, 433, 434, -1, -1, 185, -1, 433, 434, -1, 190, 185, -1, 433, - 434, -1, 190, 89, 90, 91, -1, -1, -1, -1, + 434, -1, 190, 97, 98, 99, -1, -1, -1, -1, -1, 205, 206, 258, -1, -1, 210, 205, 206, -1, -1, -1, 210, -1, 269, 185, 271, -1, -1, 274, - 190, -1, 32, 33, 145, 35, -1, -1, -1, 39, - -1, 286, 142, -1, -1, 205, 206, -1, 48, 149, - 210, 51, 152, 145, -1, -1, -1, -1, -1, 304, + 190, -1, 40, 41, 145, 43, -1, -1, -1, 47, + -1, 286, 142, -1, -1, 205, 206, -1, 56, 149, + 210, 59, 152, 145, -1, -1, -1, -1, -1, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 264, 145, -1, -1, 185, -1, 264, 322, 272, 190, - -1, -1, -1, -1, 272, -1, -1, -1, -1, 89, - 90, 91, -1, 185, 205, 206, -1, -1, 190, 210, + -1, -1, -1, -1, 272, -1, -1, -1, -1, 97, + 98, 99, -1, 185, 205, 206, -1, -1, 190, 210, 345, 346, 347, 348, 264, -1, -1, -1, -1, -1, -1, 185, 272, 205, 206, -1, 190, -1, 210, -1, -1, -1, -1, -1, -1, 370, -1, 372, 373, -1, - -1, 205, 206, -1, 32, 33, 210, 35, -1, -1, - -1, -1, 40, 41, 42, 43, -1, -1, 32, 33, - 48, 35, -1, 264, -1, 39, -1, -1, 56, 57, - 44, 272, 262, -1, 48, -1, -1, 51, 52, 414, + -1, 205, 206, -1, 40, 41, 210, 43, -1, -1, + -1, -1, 48, 49, 50, 51, -1, -1, 40, 41, + 56, 43, -1, 264, -1, 47, -1, -1, 64, 65, + 52, 272, 262, -1, 56, -1, -1, 59, 60, 414, -1, -1, 264, -1, -1, 369, -1, 371, -1, -1, 272, 369, -1, 371, 284, 285, -1, -1, -1, -1, - 264, -1, 90, 91, -1, -1, -1, -1, 272, -1, - -1, -1, -1, -1, -1, 89, 90, 91, -1, 369, + 264, -1, 98, 99, -1, -1, -1, -1, 272, -1, + -1, -1, -1, -1, -1, 97, 98, 99, -1, 369, -1, 371, -1, -1, -1, -1, 410, 317, 412, 413, 320, -1, 410, -1, 412, 413, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 58, 59, -1, -1, 433, - 434, 64, 65, 66, 67, 433, 434, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, -1, -1, 433, + 434, 72, 73, 74, 75, 433, 434, -1, -1, -1, 410, -1, 412, 413, -1, -1, -1, -1, 369, -1, - 371, 84, 85, 86, 87, 88, 366, -1, -1, 32, - 33, -1, 35, 433, 434, -1, -1, 369, -1, 371, - -1, -1, 382, -1, 384, 48, 386, -1, 51, -1, - -1, -1, -1, 56, 57, 369, -1, 371, -1, 410, - -1, 412, 413, -1, -1, -1, -1, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 410, -1, - 412, 413, 433, 434, -1, -1, 89, 90, 91, -1, + 371, 92, 93, 94, 95, 96, 366, -1, -1, 40, + 41, -1, 43, 433, 434, -1, -1, 369, -1, 371, + -1, -1, 382, -1, 384, 56, 386, -1, 59, -1, + -1, -1, -1, 64, 65, 369, -1, 371, -1, 410, + -1, 412, 413, -1, -1, -1, -1, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 410, -1, + 412, 413, 433, 434, -1, -1, 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, -1, -1, -1, -1, -1, - 3, -1, -1, -1, -1, -1, -1, -1, 11, 433, - 434, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, -1, -1, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 8, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, -1, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, 49, -1, - -1, 48, 49, -1, 55, 52, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 90, 91, -1, - -1, 68, 69, -1, -1, -1, 8, -1, -1, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, -1, -1, 48, -1, -1, -1, - 52, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, 32, 33, -1, 35, -1, 68, 69, 39, -1, - -1, 8, -1, -1, -1, -1, -1, 48, -1, -1, - 51, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, - -1, 48, -1, -1, -1, 52, -1, -1, 89, 90, - 91, -1, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 68, 69, 39, -1, -1, 8, -1, -1, -1, - -1, -1, 48, -1, -1, 51, -1, -1, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, 32, 33, 48, 35, -1, -1, - 52, 39, -1, 89, 90, 91, -1, -1, 32, 33, - 48, 35, -1, 51, -1, 39, 68, 69, -1, -1, - -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, -1, -1, -1, -1, -1, - -1, 89, 90, 91, -1, -1, -1, -1, 45, -1, - -1, -1, -1, 50, -1, 89, 90, 91, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 45, -1, -1, -1, -1, 50, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 45, -1, -1, -1, - -1, 50, -1, -1, -1, -1, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 11, -1, -1, -1, -1, -1, -1, -1, 19, 433, + 434, 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, -1, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, -1, 43, -1, -1, 98, 99, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, 98, 99, 48, 49, 50, + 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, 57, -1, + -1, 56, 57, -1, 63, 60, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 98, 99, -1, + -1, 76, 77, -1, -1, -1, 16, -1, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, -1, -1, -1, + -1, 40, 41, -1, 43, -1, 76, 77, 47, -1, + -1, 16, -1, -1, -1, -1, -1, 56, -1, -1, + 59, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, -1, -1, + -1, 56, -1, -1, -1, 60, -1, -1, 97, 98, + 99, -1, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 76, 77, 47, -1, -1, 16, -1, -1, -1, + -1, -1, 56, -1, -1, 59, -1, -1, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, 40, 41, 56, 43, -1, -1, + 60, 47, -1, 97, 98, 99, -1, -1, 40, 41, + 56, 43, -1, 59, -1, 47, 76, 77, -1, -1, + -1, -1, -1, -1, 56, -1, -1, 59, -1, -1, + -1, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, 97, 98, 99, -1, -1, -1, -1, 53, -1, + -1, -1, -1, 58, -1, 97, 98, 99, 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, -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, 81, 82, 83, 84, 85, 86, 87, 88, - 45, -1, -1, -1, -1, 50, -1, -1, -1, -1, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 45, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -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, 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, - 45, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 50, -1, -1, -1, - -1, 55, -1, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 53, -1, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 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, 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, 61, -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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 54, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 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, 62, 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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 55, -1, -1, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 81, 82, - 83, 84, 85, 86, 87, 88, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, 58, - 59, -1, 61, 62, 63, 64, 65, 66, 67, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, -1, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, 82, -1, 84, 85, 86, 87, - 88, 58, 59, -1, -1, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 84, 85, 86, - 87, 88 + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 63, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, + 91, 92, 93, 94, 95, 96, -1, -1, -1, -1, + -1, 89, 90, 91, 92, 93, 94, 95, 96, 66, + 67, -1, 69, 70, 71, 72, 73, 74, 75, 66, + 67, -1, -1, 70, 71, 72, 73, 74, 75, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 66, 67, -1, -1, 70, 71, 72, 73, 74, 75, + 66, 67, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, + 95, 96 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 91, 107, 108, 109, - 110, 111, 112, 113, 114, 177, 90, 177, 178, 178, - 44, 0, 109, 110, 111, 44, 70, 54, 54, 92, - 180, 159, 177, 8, 32, 33, 34, 35, 36, 37, - 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 93, 94, 95, 96, 144, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 45, 45, 50, 48, 177, 178, 48, 177, - 178, 48, 144, 48, 49, 144, 160, 161, 177, 144, - 144, 95, 96, 91, 54, 55, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, - 85, 86, 87, 88, 39, 48, 51, 89, 156, 157, - 177, 178, 44, 52, 54, 46, 117, 177, 48, 44, - 52, 48, 44, 52, 48, 45, 50, 144, 50, 49, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 177, 52, 160, 161, 177, 3, 11, 14, 15, 16, - 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 47, 48, 56, 57, 115, 116, 117, - 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 146, 147, 148, 154, 155, - 163, 164, 167, 171, 172, 173, 174, 177, 144, 160, - 177, 144, 160, 177, 144, 144, 49, 144, 53, 49, - 177, 45, 44, 4, 118, 144, 54, 44, 54, 44, - 115, 44, 44, 44, 44, 85, 180, 184, 53, 54, - 54, 54, 144, 54, 44, 44, 48, 154, 155, 167, - 167, 47, 115, 54, 54, 54, 54, 54, 9, 10, - 12, 13, 56, 57, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 49, 45, 44, 49, 45, - 44, 49, 50, 49, 144, 160, 4, 54, 45, 144, - 19, 144, 119, 146, 147, 148, 167, 177, 144, 53, - 53, 54, 160, 160, 144, 44, 44, 44, 44, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 49, 160, 49, 160, 49, 144, 44, 45, 54, 45, - 44, 45, 54, 22, 50, 45, 45, 45, 144, 144, - 144, 144, 44, 45, 44, 45, 44, 45, 160, 115, - 144, 115, 144, 145, 144, 177, 117, 54, 54, 45, - 45, 50, 45, 50, 45, 50, 160, 160, 160, 45, - 17, 45, 54, 45, 22, 54, 54, 161, 54, 161, - 54, 161, 45, 45, 45, 115, 54, 119, 115, 144, - 45, 45, 45, 45, 45, 54, 54, 54, 115, 115 + 0, 11, 12, 13, 14, 15, 99, 115, 116, 117, + 118, 119, 120, 121, 122, 185, 98, 185, 186, 186, + 52, 0, 117, 118, 119, 52, 78, 62, 62, 100, + 188, 167, 185, 16, 40, 41, 42, 43, 44, 45, + 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, + 93, 96, 101, 102, 103, 104, 152, 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, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 53, 53, 58, 56, 185, 186, 56, 185, + 186, 56, 152, 56, 57, 152, 168, 169, 185, 152, + 152, 103, 104, 99, 62, 63, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, + 93, 94, 95, 96, 47, 56, 59, 97, 164, 165, + 185, 186, 52, 60, 62, 54, 125, 185, 56, 52, + 60, 56, 52, 60, 56, 53, 58, 152, 58, 57, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 185, 60, 168, 169, 185, 11, 19, 22, 23, 24, + 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 55, 56, 64, 65, 123, 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, 151, 154, 155, 156, 162, 163, + 171, 172, 175, 179, 180, 181, 182, 185, 152, 168, + 185, 152, 168, 185, 152, 152, 57, 152, 61, 57, + 185, 53, 52, 12, 126, 152, 62, 52, 62, 52, + 123, 52, 52, 52, 52, 93, 188, 192, 61, 62, + 62, 62, 152, 62, 52, 52, 56, 162, 163, 175, + 175, 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, 152, 168, 12, 62, 53, 152, + 27, 152, 127, 154, 155, 156, 175, 185, 152, 61, + 61, 62, 168, 168, 152, 52, 52, 52, 52, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 57, 168, 57, 168, 57, 152, 52, 53, 62, 53, + 52, 53, 62, 30, 58, 53, 53, 53, 152, 152, + 152, 152, 52, 53, 52, 53, 52, 53, 168, 123, + 152, 123, 152, 153, 152, 185, 125, 62, 62, 53, + 53, 58, 53, 58, 53, 58, 168, 168, 168, 53, + 25, 53, 62, 53, 30, 62, 62, 169, 62, 169, + 62, 169, 53, 53, 53, 123, 62, 127, 123, 152, + 53, 53, 53, 53, 53, 62, 62, 62, 123, 123 }; const unsigned char parser::yyr1_[] = { - 0, 106, 107, 107, 108, 108, 108, 108, 108, 108, - 109, 110, 111, 111, 111, 111, 111, 112, 113, 114, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 116, 116, 117, 117, - 118, 118, 119, 119, 119, 119, 120, 120, 121, 121, - 121, 122, 123, 123, 124, 125, 125, 126, 126, 127, - 128, 128, 129, 130, 131, 132, 133, 134, 134, 135, - 136, 136, 137, 138, 139, 140, 140, 141, 142, 143, - 144, 144, 144, 145, 145, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 147, 147, 148, 148, - 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 152, 153, 154, - 154, 155, 155, 156, 156, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 159, 159, 159, 160, 160, 161, - 161, 162, 162, 163, 164, 164, 165, 166, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 178, 179, - 180, 181, 182, 183, 183, 184, 184, 185, 186 + 0, 114, 115, 115, 116, 116, 116, 116, 116, 116, + 117, 118, 119, 119, 119, 119, 119, 120, 121, 122, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 124, 124, 125, 125, + 126, 126, 127, 127, 127, 127, 128, 128, 129, 129, + 129, 130, 131, 131, 132, 133, 133, 134, 134, 135, + 136, 136, 137, 138, 139, 140, 141, 142, 142, 143, + 144, 144, 145, 146, 147, 148, 148, 149, 150, 151, + 152, 152, 152, 153, 153, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 155, 155, 156, 156, + 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 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, 174, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 186, 187, + 188, 189, 190, 191, 191, 192, 192, 193, 194 }; const signed char @@ -4476,28 +4477,28 @@ namespace xsk { namespace gsc { namespace h2 { const short parser::yyrline_[] = { - 0, 246, 246, 247, 251, 253, 255, 257, 259, 261, - 266, 270, 275, 276, 277, 278, 279, 283, 288, 293, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 327, 328, 332, 333, - 337, 339, 344, 346, 348, 351, 355, 357, 362, 364, - 366, 371, 376, 378, 383, 388, 390, 395, 397, 402, - 407, 409, 414, 419, 424, 429, 434, 439, 441, 446, - 451, 453, 458, 463, 468, 473, 475, 480, 485, 490, - 495, 496, 497, 501, 502, 506, 508, 510, 512, 514, - 516, 518, 520, 522, 524, 526, 531, 533, 538, 540, - 545, 550, 552, 554, 556, 558, 560, 562, 564, 566, - 568, 570, 572, 574, 576, 578, 580, 582, 584, 589, - 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, - 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, - 610, 611, 612, 613, 614, 615, 616, 620, 625, 630, - 631, 634, 635, 639, 641, 643, 645, 647, 649, 654, - 656, 658, 660, 665, 670, 672, 675, 679, 682, 686, - 688, 693, 695, 700, 705, 707, 712, 717, 722, 723, - 724, 725, 726, 727, 728, 729, 730, 734, 739, 744, - 749, 754, 759, 764, 769, 774, 779, 784, 786, 791, - 796, 801, 806, 811, 813, 818, 820, 825, 830 + 0, 254, 254, 255, 259, 261, 263, 265, 267, 269, + 274, 278, 283, 284, 285, 286, 287, 291, 296, 301, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 335, 336, 340, 341, + 345, 347, 352, 354, 356, 359, 363, 365, 370, 372, + 374, 379, 384, 386, 391, 396, 398, 403, 405, 410, + 415, 417, 422, 427, 432, 437, 442, 447, 449, 454, + 459, 461, 466, 471, 476, 481, 483, 488, 493, 498, + 503, 504, 505, 509, 510, 514, 516, 518, 520, 522, + 524, 526, 528, 530, 532, 534, 539, 541, 546, 548, + 553, 558, 560, 562, 564, 566, 568, 570, 572, 574, + 576, 578, 580, 582, 584, 586, 588, 590, 592, 597, + 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, + 618, 619, 620, 621, 622, 623, 624, 628, 633, 638, + 639, 642, 643, 647, 649, 651, 653, 655, 657, 662, + 664, 666, 668, 673, 678, 680, 683, 687, 690, 694, + 696, 701, 703, 708, 713, 715, 720, 725, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 792, 794, 799, + 804, 809, 814, 819, 821, 826, 828, 833, 838 }; void @@ -4530,9 +4531,9 @@ namespace xsk { namespace gsc { namespace h2 { #line 13 "parser.ypp" } } } // xsk::gsc::h2 -#line 4534 "parser.cpp" +#line 4535 "parser.cpp" -#line 834 "parser.ypp" +#line 842 "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 2806a383..ad697b98 100644 --- a/src/h2/xsk/parser.hpp +++ b/src/h2/xsk/parser.hpp @@ -677,109 +677,117 @@ namespace xsk { namespace gsc { namespace h2 { H2EOF = 0, // "end of file" H2error = 1, // error H2UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - WAITFRAME = 15, // "waitframe" - IF = 16, // "if" - ELSE = 17, // "else" - DO = 18, // "do" - WHILE = 19, // "while" - FOR = 20, // "for" - FOREACH = 21, // "foreach" - IN = 22, // "in" - SWITCH = 23, // "switch" - CASE = 24, // "case" - DEFAULT = 25, // "default" - BREAK = 26, // "break" - CONTINUE = 27, // "continue" - RETURN = 28, // "return" - BREAKPOINT = 29, // "breakpoint" - PROFBEGIN = 30, // "prof_begin" - PROFEND = 31, // "prof_end" - THREAD = 32, // "thread" - CHILDTHREAD = 33, // "childthread" - THISTHREAD = 34, // "thisthread" - CALL = 35, // "call" - TRUE = 36, // "true" - FALSE = 37, // "false" - UNDEFINED = 38, // "undefined" - SIZE = 39, // ".size" - GAME = 40, // "game" - SELF = 41, // "self" - ANIM = 42, // "anim" - LEVEL = 43, // "level" - LPAREN = 44, // "(" - RPAREN = 45, // ")" - LBRACE = 46, // "{" - RBRACE = 47, // "}" - LBRACKET = 48, // "[" - RBRACKET = 49, // "]" - COMMA = 50, // "," - DOT = 51, // "." - DOUBLECOLON = 52, // "::" - COLON = 53, // ":" - SEMICOLON = 54, // ";" - QMARK = 55, // "?" - INCREMENT = 56, // "++" - DECREMENT = 57, // "--" - LSHIFT = 58, // "<<" - RSHIFT = 59, // ">>" - OR = 60, // "||" - AND = 61, // "&&" - EQUALITY = 62, // "==" - INEQUALITY = 63, // "!=" - LESS_EQUAL = 64, // "<=" - GREATER_EQUAL = 65, // ">=" - LESS = 66, // "<" - GREATER = 67, // ">" - NOT = 68, // "!" - COMPLEMENT = 69, // "~" - ASSIGN = 70, // "=" - ASSIGN_ADD = 71, // "+=" - ASSIGN_SUB = 72, // "-=" - ASSIGN_MUL = 73, // "*=" - ASSIGN_DIV = 74, // "/=" - ASSIGN_MOD = 75, // "%=" - ASSIGN_BW_OR = 76, // "|=" - ASSIGN_BW_AND = 77, // "&=" - ASSIGN_BW_EXOR = 78, // "^=" - ASSIGN_RSHIFT = 79, // ">>=" - ASSIGN_LSHIFT = 80, // "<<=" - BITWISE_OR = 81, // "|" - BITWISE_AND = 82, // "&" - BITWISE_EXOR = 83, // "^" - ADD = 84, // "+" - SUB = 85, // "-" - MUL = 86, // "*" - DIV = 87, // "/" - MOD = 88, // "%" - FIELD = 89, // "field" - PATH = 90, // "path" - IDENTIFIER = 91, // "identifier" - STRING = 92, // "string literal" - ISTRING = 93, // "localized string" - COLOR = 94, // "color" - FLOAT = 95, // "float" - INTEGER = 96, // "integer" - ADD_ARRAY = 97, // ADD_ARRAY - THEN = 98, // THEN - TERN = 99, // TERN - NEG = 100, // NEG - ANIMREF = 101, // ANIMREF - PREINC = 102, // PREINC - PREDEC = 103, // PREDEC - POSTINC = 104, // POSTINC - POSTDEC = 105 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + WAITFRAME = 23, // "waitframe" + IF = 24, // "if" + ELSE = 25, // "else" + DO = 26, // "do" + WHILE = 27, // "while" + FOR = 28, // "for" + FOREACH = 29, // "foreach" + IN = 30, // "in" + SWITCH = 31, // "switch" + CASE = 32, // "case" + DEFAULT = 33, // "default" + BREAK = 34, // "break" + CONTINUE = 35, // "continue" + RETURN = 36, // "return" + BREAKPOINT = 37, // "breakpoint" + PROFBEGIN = 38, // "prof_begin" + PROFEND = 39, // "prof_end" + THREAD = 40, // "thread" + CHILDTHREAD = 41, // "childthread" + THISTHREAD = 42, // "thisthread" + CALL = 43, // "call" + TRUE = 44, // "true" + FALSE = 45, // "false" + UNDEFINED = 46, // "undefined" + SIZE = 47, // ".size" + GAME = 48, // "game" + SELF = 49, // "self" + ANIM = 50, // "anim" + LEVEL = 51, // "level" + LPAREN = 52, // "(" + RPAREN = 53, // ")" + LBRACE = 54, // "{" + RBRACE = 55, // "}" + LBRACKET = 56, // "[" + RBRACKET = 57, // "]" + COMMA = 58, // "," + DOT = 59, // "." + DOUBLECOLON = 60, // "::" + COLON = 61, // ":" + SEMICOLON = 62, // ";" + QMARK = 63, // "?" + INCREMENT = 64, // "++" + DECREMENT = 65, // "--" + LSHIFT = 66, // "<<" + RSHIFT = 67, // ">>" + OR = 68, // "||" + AND = 69, // "&&" + EQUALITY = 70, // "==" + INEQUALITY = 71, // "!=" + LESS_EQUAL = 72, // "<=" + GREATER_EQUAL = 73, // ">=" + LESS = 74, // "<" + GREATER = 75, // ">" + NOT = 76, // "!" + COMPLEMENT = 77, // "~" + ASSIGN = 78, // "=" + ASSIGN_ADD = 79, // "+=" + ASSIGN_SUB = 80, // "-=" + ASSIGN_MUL = 81, // "*=" + ASSIGN_DIV = 82, // "/=" + ASSIGN_MOD = 83, // "%=" + ASSIGN_BW_OR = 84, // "|=" + ASSIGN_BW_AND = 85, // "&=" + ASSIGN_BW_EXOR = 86, // "^=" + ASSIGN_RSHIFT = 87, // ">>=" + ASSIGN_LSHIFT = 88, // "<<=" + BITWISE_OR = 89, // "|" + BITWISE_AND = 90, // "&" + BITWISE_EXOR = 91, // "^" + ADD = 92, // "+" + SUB = 93, // "-" + MUL = 94, // "*" + DIV = 95, // "/" + MOD = 96, // "%" + FIELD = 97, // "field" + PATH = 98, // "path" + IDENTIFIER = 99, // "identifier" + STRING = 100, // "string literal" + ISTRING = 101, // "localized string" + COLOR = 102, // "color" + FLOAT = 103, // "float" + INTEGER = 104, // "integer" + ADD_ARRAY = 105, // ADD_ARRAY + THEN = 106, // THEN + TERN = 107, // TERN + NEG = 108, // NEG + ANIMREF = 109, // ANIMREF + PREINC = 110, // PREINC + PREDEC = 111, // PREDEC + POSTINC = 112, // POSTINC + POSTDEC = 113 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -796,195 +804,203 @@ namespace xsk { namespace gsc { namespace h2 { { enum symbol_kind_type { - YYNTOKENS = 106, ///< Number of tokens. + YYNTOKENS = 114, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_WAITFRAME = 15, // "waitframe" - S_IF = 16, // "if" - S_ELSE = 17, // "else" - S_DO = 18, // "do" - S_WHILE = 19, // "while" - S_FOR = 20, // "for" - S_FOREACH = 21, // "foreach" - S_IN = 22, // "in" - S_SWITCH = 23, // "switch" - S_CASE = 24, // "case" - S_DEFAULT = 25, // "default" - S_BREAK = 26, // "break" - S_CONTINUE = 27, // "continue" - S_RETURN = 28, // "return" - S_BREAKPOINT = 29, // "breakpoint" - S_PROFBEGIN = 30, // "prof_begin" - S_PROFEND = 31, // "prof_end" - S_THREAD = 32, // "thread" - S_CHILDTHREAD = 33, // "childthread" - S_THISTHREAD = 34, // "thisthread" - S_CALL = 35, // "call" - S_TRUE = 36, // "true" - S_FALSE = 37, // "false" - S_UNDEFINED = 38, // "undefined" - S_SIZE = 39, // ".size" - S_GAME = 40, // "game" - S_SELF = 41, // "self" - S_ANIM = 42, // "anim" - S_LEVEL = 43, // "level" - S_LPAREN = 44, // "(" - S_RPAREN = 45, // ")" - S_LBRACE = 46, // "{" - S_RBRACE = 47, // "}" - S_LBRACKET = 48, // "[" - S_RBRACKET = 49, // "]" - S_COMMA = 50, // "," - S_DOT = 51, // "." - S_DOUBLECOLON = 52, // "::" - S_COLON = 53, // ":" - S_SEMICOLON = 54, // ";" - S_QMARK = 55, // "?" - S_INCREMENT = 56, // "++" - S_DECREMENT = 57, // "--" - S_LSHIFT = 58, // "<<" - S_RSHIFT = 59, // ">>" - S_OR = 60, // "||" - S_AND = 61, // "&&" - S_EQUALITY = 62, // "==" - S_INEQUALITY = 63, // "!=" - S_LESS_EQUAL = 64, // "<=" - S_GREATER_EQUAL = 65, // ">=" - S_LESS = 66, // "<" - S_GREATER = 67, // ">" - S_NOT = 68, // "!" - S_COMPLEMENT = 69, // "~" - S_ASSIGN = 70, // "=" - S_ASSIGN_ADD = 71, // "+=" - S_ASSIGN_SUB = 72, // "-=" - S_ASSIGN_MUL = 73, // "*=" - S_ASSIGN_DIV = 74, // "/=" - S_ASSIGN_MOD = 75, // "%=" - S_ASSIGN_BW_OR = 76, // "|=" - S_ASSIGN_BW_AND = 77, // "&=" - S_ASSIGN_BW_EXOR = 78, // "^=" - S_ASSIGN_RSHIFT = 79, // ">>=" - S_ASSIGN_LSHIFT = 80, // "<<=" - S_BITWISE_OR = 81, // "|" - S_BITWISE_AND = 82, // "&" - S_BITWISE_EXOR = 83, // "^" - S_ADD = 84, // "+" - S_SUB = 85, // "-" - S_MUL = 86, // "*" - S_DIV = 87, // "/" - S_MOD = 88, // "%" - S_FIELD = 89, // "field" - S_PATH = 90, // "path" - S_IDENTIFIER = 91, // "identifier" - S_STRING = 92, // "string literal" - S_ISTRING = 93, // "localized string" - S_COLOR = 94, // "color" - S_FLOAT = 95, // "float" - S_INTEGER = 96, // "integer" - S_ADD_ARRAY = 97, // ADD_ARRAY - S_THEN = 98, // THEN - S_TERN = 99, // TERN - S_NEG = 100, // NEG - S_ANIMREF = 101, // ANIMREF - S_PREINC = 102, // PREINC - S_PREDEC = 103, // PREDEC - S_POSTINC = 104, // POSTINC - S_POSTDEC = 105, // POSTDEC - S_YYACCEPT = 106, // $accept - S_root = 107, // root - S_program = 108, // program - S_inline = 109, // inline - S_include = 110, // include - S_declaration = 111, // declaration - S_decl_usingtree = 112, // decl_usingtree - S_decl_constant = 113, // decl_constant - S_decl_thread = 114, // decl_thread - S_stmt = 115, // stmt - S_stmt_dev = 116, // stmt_dev - S_stmt_block = 117, // stmt_block - S_stmt_list = 118, // stmt_list - S_stmt_expr = 119, // stmt_expr - S_stmt_call = 120, // stmt_call - S_stmt_assign = 121, // stmt_assign - S_stmt_endon = 122, // stmt_endon - S_stmt_notify = 123, // stmt_notify - S_stmt_wait = 124, // stmt_wait - S_stmt_waittill = 125, // stmt_waittill - S_stmt_waittillmatch = 126, // stmt_waittillmatch - S_stmt_waittillframeend = 127, // stmt_waittillframeend - S_stmt_waitframe = 128, // stmt_waitframe - S_stmt_if = 129, // stmt_if - S_stmt_ifelse = 130, // stmt_ifelse - S_stmt_while = 131, // stmt_while - S_stmt_dowhile = 132, // stmt_dowhile - S_stmt_for = 133, // stmt_for - S_stmt_foreach = 134, // stmt_foreach - S_stmt_switch = 135, // stmt_switch - S_stmt_case = 136, // stmt_case - S_stmt_default = 137, // stmt_default - S_stmt_break = 138, // stmt_break - S_stmt_continue = 139, // stmt_continue - S_stmt_return = 140, // stmt_return - S_stmt_breakpoint = 141, // stmt_breakpoint - S_stmt_prof_begin = 142, // stmt_prof_begin - S_stmt_prof_end = 143, // stmt_prof_end - S_expr = 144, // expr - S_expr_or_empty = 145, // expr_or_empty - S_expr_assign = 146, // expr_assign - S_expr_increment = 147, // expr_increment - S_expr_decrement = 148, // expr_decrement - S_expr_ternary = 149, // expr_ternary - S_expr_binary = 150, // expr_binary - S_expr_primitive = 151, // expr_primitive - S_expr_complement = 152, // expr_complement - S_expr_not = 153, // expr_not - S_expr_call = 154, // expr_call - S_expr_method = 155, // expr_method - S_expr_function = 156, // expr_function - S_expr_pointer = 157, // expr_pointer - S_expr_add_array = 158, // expr_add_array - S_expr_parameters = 159, // expr_parameters - S_expr_arguments = 160, // expr_arguments - S_expr_arguments_no_empty = 161, // expr_arguments_no_empty - S_expr_reference = 162, // expr_reference - S_expr_array = 163, // expr_array - S_expr_field = 164, // expr_field - S_expr_size = 165, // expr_size - S_expr_paren = 166, // expr_paren - S_expr_object = 167, // expr_object - S_expr_thisthread = 168, // expr_thisthread - S_expr_empty_array = 169, // expr_empty_array - S_expr_undefined = 170, // expr_undefined - S_expr_game = 171, // expr_game - S_expr_self = 172, // expr_self - S_expr_anim = 173, // expr_anim - S_expr_level = 174, // expr_level - S_expr_animation = 175, // expr_animation - S_expr_animtree = 176, // expr_animtree - S_expr_identifier = 177, // expr_identifier - S_expr_path = 178, // expr_path - S_expr_istring = 179, // expr_istring - S_expr_string = 180, // expr_string - S_expr_color = 181, // expr_color - S_expr_vector = 182, // expr_vector - S_expr_float = 183, // expr_float - S_expr_integer = 184, // expr_integer - S_expr_false = 185, // expr_false - S_expr_true = 186 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_WAITFRAME = 23, // "waitframe" + S_IF = 24, // "if" + S_ELSE = 25, // "else" + S_DO = 26, // "do" + S_WHILE = 27, // "while" + S_FOR = 28, // "for" + S_FOREACH = 29, // "foreach" + S_IN = 30, // "in" + S_SWITCH = 31, // "switch" + S_CASE = 32, // "case" + S_DEFAULT = 33, // "default" + S_BREAK = 34, // "break" + S_CONTINUE = 35, // "continue" + S_RETURN = 36, // "return" + S_BREAKPOINT = 37, // "breakpoint" + S_PROFBEGIN = 38, // "prof_begin" + S_PROFEND = 39, // "prof_end" + S_THREAD = 40, // "thread" + S_CHILDTHREAD = 41, // "childthread" + S_THISTHREAD = 42, // "thisthread" + S_CALL = 43, // "call" + S_TRUE = 44, // "true" + S_FALSE = 45, // "false" + S_UNDEFINED = 46, // "undefined" + S_SIZE = 47, // ".size" + S_GAME = 48, // "game" + S_SELF = 49, // "self" + S_ANIM = 50, // "anim" + S_LEVEL = 51, // "level" + S_LPAREN = 52, // "(" + S_RPAREN = 53, // ")" + S_LBRACE = 54, // "{" + S_RBRACE = 55, // "}" + S_LBRACKET = 56, // "[" + S_RBRACKET = 57, // "]" + S_COMMA = 58, // "," + S_DOT = 59, // "." + S_DOUBLECOLON = 60, // "::" + S_COLON = 61, // ":" + S_SEMICOLON = 62, // ";" + S_QMARK = 63, // "?" + S_INCREMENT = 64, // "++" + S_DECREMENT = 65, // "--" + S_LSHIFT = 66, // "<<" + S_RSHIFT = 67, // ">>" + S_OR = 68, // "||" + S_AND = 69, // "&&" + S_EQUALITY = 70, // "==" + S_INEQUALITY = 71, // "!=" + S_LESS_EQUAL = 72, // "<=" + S_GREATER_EQUAL = 73, // ">=" + S_LESS = 74, // "<" + S_GREATER = 75, // ">" + S_NOT = 76, // "!" + S_COMPLEMENT = 77, // "~" + S_ASSIGN = 78, // "=" + S_ASSIGN_ADD = 79, // "+=" + S_ASSIGN_SUB = 80, // "-=" + S_ASSIGN_MUL = 81, // "*=" + S_ASSIGN_DIV = 82, // "/=" + S_ASSIGN_MOD = 83, // "%=" + S_ASSIGN_BW_OR = 84, // "|=" + S_ASSIGN_BW_AND = 85, // "&=" + S_ASSIGN_BW_EXOR = 86, // "^=" + S_ASSIGN_RSHIFT = 87, // ">>=" + S_ASSIGN_LSHIFT = 88, // "<<=" + S_BITWISE_OR = 89, // "|" + S_BITWISE_AND = 90, // "&" + S_BITWISE_EXOR = 91, // "^" + S_ADD = 92, // "+" + S_SUB = 93, // "-" + S_MUL = 94, // "*" + S_DIV = 95, // "/" + S_MOD = 96, // "%" + S_FIELD = 97, // "field" + S_PATH = 98, // "path" + S_IDENTIFIER = 99, // "identifier" + S_STRING = 100, // "string literal" + S_ISTRING = 101, // "localized string" + S_COLOR = 102, // "color" + S_FLOAT = 103, // "float" + S_INTEGER = 104, // "integer" + S_ADD_ARRAY = 105, // ADD_ARRAY + S_THEN = 106, // THEN + S_TERN = 107, // TERN + S_NEG = 108, // NEG + S_ANIMREF = 109, // ANIMREF + S_PREINC = 110, // PREINC + S_PREDEC = 111, // PREDEC + S_POSTINC = 112, // POSTINC + S_POSTDEC = 113, // POSTDEC + S_YYACCEPT = 114, // $accept + S_root = 115, // root + S_program = 116, // program + S_inline = 117, // inline + S_include = 118, // include + S_declaration = 119, // declaration + S_decl_usingtree = 120, // decl_usingtree + S_decl_constant = 121, // decl_constant + S_decl_thread = 122, // decl_thread + S_stmt = 123, // stmt + S_stmt_dev = 124, // stmt_dev + S_stmt_block = 125, // stmt_block + S_stmt_list = 126, // stmt_list + S_stmt_expr = 127, // stmt_expr + S_stmt_call = 128, // stmt_call + S_stmt_assign = 129, // stmt_assign + S_stmt_endon = 130, // stmt_endon + S_stmt_notify = 131, // stmt_notify + S_stmt_wait = 132, // stmt_wait + S_stmt_waittill = 133, // stmt_waittill + S_stmt_waittillmatch = 134, // stmt_waittillmatch + S_stmt_waittillframeend = 135, // stmt_waittillframeend + S_stmt_waitframe = 136, // stmt_waitframe + S_stmt_if = 137, // stmt_if + S_stmt_ifelse = 138, // stmt_ifelse + S_stmt_while = 139, // stmt_while + S_stmt_dowhile = 140, // stmt_dowhile + S_stmt_for = 141, // stmt_for + S_stmt_foreach = 142, // stmt_foreach + S_stmt_switch = 143, // stmt_switch + S_stmt_case = 144, // stmt_case + S_stmt_default = 145, // stmt_default + S_stmt_break = 146, // stmt_break + S_stmt_continue = 147, // stmt_continue + S_stmt_return = 148, // stmt_return + S_stmt_breakpoint = 149, // stmt_breakpoint + S_stmt_prof_begin = 150, // stmt_prof_begin + S_stmt_prof_end = 151, // stmt_prof_end + S_expr = 152, // expr + S_expr_or_empty = 153, // expr_or_empty + S_expr_assign = 154, // expr_assign + S_expr_increment = 155, // expr_increment + S_expr_decrement = 156, // expr_decrement + S_expr_ternary = 157, // expr_ternary + S_expr_binary = 158, // expr_binary + S_expr_primitive = 159, // expr_primitive + S_expr_complement = 160, // expr_complement + S_expr_not = 161, // expr_not + S_expr_call = 162, // expr_call + S_expr_method = 163, // expr_method + S_expr_function = 164, // expr_function + S_expr_pointer = 165, // expr_pointer + S_expr_add_array = 166, // expr_add_array + S_expr_parameters = 167, // expr_parameters + 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 = 185, // expr_identifier + S_expr_path = 186, // expr_path + S_expr_istring = 187, // expr_istring + S_expr_string = 188, // expr_string + S_expr_color = 189, // expr_color + 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 }; }; @@ -2779,6 +2795,126 @@ switch (yykind) return symbol_type (token::H2UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5362,7 +5498,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::h2 -#line 5366 "parser.hpp" +#line 5502 "parser.hpp" diff --git a/src/iw5/xsk/lexer.cpp b/src/iw5/xsk/lexer.cpp index 86294451..ec43dd4f 100644 --- a/src/iw5/xsk/lexer.cpp +++ b/src/iw5/xsk/lexer.cpp @@ -16,57 +16,6 @@ xsk::gsc::iw5::parser::symbol_type IW5lex(xsk::gsc::iw5::lexer& lexer) namespace xsk::gsc::iw5 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -129,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -140,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -151,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -164,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -172,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -193,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type if (header_top_ > 0) pop_header(); else - return iw5::parser::make_IW5EOF(loc_); + return parser::make_IW5EOF(loc_); } reader_.advance(); @@ -211,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return iw5::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return iw5::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return iw5::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -290,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type indev_ = false; reader_.advance(); - return iw5::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -303,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return iw5::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return iw5::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -323,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::iw5::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return iw5::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return iw5::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return iw5::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return iw5::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return iw5::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return iw5::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return iw5::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return iw5::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return iw5::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return iw5::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return iw5::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return iw5::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return iw5::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return iw5::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return iw5::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return iw5::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return iw5::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return iw5::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return iw5::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return iw5::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return iw5::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return iw5::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return iw5::parser::make_OR(loc_); + return parser::make_OR(loc_); - return iw5::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return iw5::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return iw5::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return iw5::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return iw5::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return iw5::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return iw5::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return iw5::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return iw5::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return iw5::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return iw5::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return iw5::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return iw5::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return iw5::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return iw5::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return iw5::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return iw5::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -496,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return iw5::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return iw5::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -533,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return iw5::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return iw5::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::IW5UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return iw5::parser::make_PATH(xsk::gsc::iw5::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw5::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return iw5::parser::make_IDENTIFIER(xsk::gsc::iw5::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw5::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -621,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return iw5::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return iw5::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -655,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return iw5::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -689,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return iw5::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -723,176 +683,59 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return iw5::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::iw5::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return iw5::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return iw5::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return iw5::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return iw5::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return iw5::parser::make_ENDON(loc_); - case keyword::KW_notify: - return iw5::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return iw5::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return iw5::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return iw5::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return iw5::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_if: - return iw5::parser::make_IF(loc_); - case keyword::KW_else: - return iw5::parser::make_ELSE(loc_); - case keyword::KW_do: - return iw5::parser::make_DO(loc_); - case keyword::KW_while: - return iw5::parser::make_WHILE(loc_); - case keyword::KW_for: - return iw5::parser::make_FOR(loc_); - case keyword::KW_foreach: - return iw5::parser::make_FOREACH(loc_); - case keyword::KW_in: - return iw5::parser::make_IN(loc_); - case keyword::KW_switch: - return iw5::parser::make_SWITCH(loc_); - case keyword::KW_case: - return iw5::parser::make_CASE(loc_); - case keyword::KW_default: - return iw5::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return iw5::parser::make_BREAK(loc_); - case keyword::KW_continue: - return iw5::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return iw5::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return iw5::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return iw5::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return iw5::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return iw5::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return iw5::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return iw5::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return iw5::parser::make_CALL(loc_); - case keyword::KW_true: - return iw5::parser::make_TRUE(loc_); - case keyword::KW_false: - return iw5::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return iw5::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return iw5::parser::make_SIZE(loc_); - case keyword::KW_game: - return iw5::parser::make_GAME(loc_); - case keyword::KW_self: - return iw5::parser::make_SELF(loc_); - case keyword::KW_anim: - return iw5::parser::make_ANIM(loc_); - case keyword::KW_level: - return iw5::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::iw5 diff --git a/src/iw5/xsk/lexer.hpp b/src/iw5/xsk/lexer.hpp index f56ac16b..901b358d 100644 --- a/src/iw5/xsk/lexer.hpp +++ b/src/iw5/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::iw5 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::iw5::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::iw5::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::iw5 diff --git a/src/iw5/xsk/parser.cpp b/src/iw5/xsk/parser.cpp index 07005ac1..7a2dfdcf 100644 --- a/src/iw5/xsk/parser.cpp +++ b/src/iw5/xsk/parser.cpp @@ -1964,1285 +1964,1285 @@ namespace xsk { namespace gsc { namespace iw5 { switch (yyn) { case 2: // root: program -#line 244 "parser.ypp" +#line 252 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1970 "parser.cpp" break; case 3: // root: %empty -#line 245 "parser.ypp" +#line 253 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1976 "parser.cpp" break; case 4: // program: program inline -#line 250 "parser.ypp" +#line 258 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 1982 "parser.cpp" break; case 5: // program: program include -#line 252 "parser.ypp" +#line 260 "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 1988 "parser.cpp" break; case 6: // program: program declaration -#line 254 "parser.ypp" +#line 262 "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 1994 "parser.cpp" break; case 7: // program: inline -#line 256 "parser.ypp" +#line 264 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2000 "parser.cpp" break; case 8: // program: include -#line 258 "parser.ypp" +#line 266 "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 2006 "parser.cpp" break; case 9: // program: declaration -#line 260 "parser.ypp" +#line 268 "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 2012 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 264 "parser.ypp" +#line 272 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2018 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 269 "parser.ypp" +#line 277 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2024 "parser.cpp" break; case 12: // declaration: "/#" -#line 273 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2030 "parser.cpp" break; case 13: // declaration: "#/" -#line 274 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2036 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 275 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2042 "parser.cpp" break; case 15: // declaration: decl_constant -#line 276 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2048 "parser.cpp" break; case 16: // declaration: decl_thread -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2054 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 282 "parser.ypp" - { lexer.restrict_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 290 "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 2060 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 287 "parser.ypp" +#line 295 "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 2066 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 292 "parser.ypp" - { lexer.restrict_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 300 "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 2072 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 296 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2078 "parser.cpp" break; case 21: // stmt: stmt_block -#line 297 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2084 "parser.cpp" break; case 22: // stmt: stmt_call -#line 298 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2090 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 299 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2096 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2102 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2108 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2114 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2120 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2126 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2132 "parser.cpp" break; case 30: // stmt: stmt_if -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2138 "parser.cpp" break; case 31: // stmt: stmt_ifelse -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2144 "parser.cpp" break; case 32: // stmt: stmt_while -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2150 "parser.cpp" break; case 33: // stmt: stmt_dowhile -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2156 "parser.cpp" break; case 34: // stmt: stmt_for -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2162 "parser.cpp" break; case 35: // stmt: stmt_foreach -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2168 "parser.cpp" break; case 36: // stmt: stmt_switch -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2174 "parser.cpp" break; case 37: // stmt: stmt_case -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2180 "parser.cpp" break; case 38: // stmt: stmt_default -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2186 "parser.cpp" break; case 39: // stmt: stmt_break -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2192 "parser.cpp" break; case 40: // stmt: stmt_continue -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2198 "parser.cpp" break; case 41: // stmt: stmt_return -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2204 "parser.cpp" break; case 42: // stmt: stmt_breakpoint -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2210 "parser.cpp" break; case 43: // stmt: stmt_prof_begin -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2216 "parser.cpp" break; case 44: // stmt: stmt_prof_end -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2222 "parser.cpp" break; case 45: // stmt_dev: "/#" stmt_list "#/" -#line 324 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2228 "parser.cpp" break; case 46: // stmt_dev: "/#" "#/" -#line 325 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2234 "parser.cpp" break; case 47: // stmt_block: "{" stmt_list "}" -#line 329 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2240 "parser.cpp" break; case 48: // stmt_block: "{" "}" -#line 330 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2246 "parser.cpp" break; case 49: // stmt_list: stmt_list stmt -#line 335 "parser.ypp" +#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 > ())); } #line 2252 "parser.cpp" break; case 50: // stmt_list: stmt -#line 337 "parser.ypp" +#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 > ())); } #line 2258 "parser.cpp" break; case 51: // stmt_expr: expr_assign -#line 342 "parser.ypp" +#line 350 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2264 "parser.cpp" break; case 52: // stmt_expr: expr_increment -#line 344 "parser.ypp" +#line 352 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2270 "parser.cpp" break; case 53: // stmt_expr: expr_decrement -#line 346 "parser.ypp" +#line 354 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2276 "parser.cpp" break; case 54: // stmt_expr: %empty -#line 348 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2282 "parser.cpp" break; case 55: // stmt_call: expr_call ";" -#line 353 "parser.ypp" +#line 361 "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 2288 "parser.cpp" break; case 56: // stmt_call: expr_method ";" -#line 355 "parser.ypp" +#line 363 "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 2294 "parser.cpp" break; case 57: // stmt_assign: expr_assign ";" -#line 360 "parser.ypp" +#line 368 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2300 "parser.cpp" break; case 58: // stmt_assign: expr_increment ";" -#line 362 "parser.ypp" +#line 370 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2306 "parser.cpp" break; case 59: // stmt_assign: expr_decrement ";" -#line 364 "parser.ypp" +#line 372 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2312 "parser.cpp" break; case 60: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 369 "parser.ypp" +#line 377 "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 2318 "parser.cpp" break; case 61: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 374 "parser.ypp" +#line 382 "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 2324 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 376 "parser.ypp" +#line 384 "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 2330 "parser.cpp" break; case 63: // stmt_wait: "wait" expr ";" -#line 381 "parser.ypp" +#line 389 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2336 "parser.cpp" break; case 64: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 386 "parser.ypp" +#line 394 "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 2342 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 388 "parser.ypp" +#line 396 "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 2348 "parser.cpp" break; case 66: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 393 "parser.ypp" +#line 401 "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 2354 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 395 "parser.ypp" +#line 403 "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 2360 "parser.cpp" break; case 68: // stmt_waittillframeend: "waittillframeend" ";" -#line 400 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2366 "parser.cpp" break; case 69: // stmt_if: "if" "(" expr ")" stmt -#line 405 "parser.ypp" +#line 413 "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 2372 "parser.cpp" break; case 70: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 410 "parser.ypp" +#line 418 "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 2378 "parser.cpp" break; case 71: // stmt_while: "while" "(" expr ")" stmt -#line 415 "parser.ypp" +#line 423 "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 2384 "parser.cpp" break; case 72: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 420 "parser.ypp" +#line 428 "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 2390 "parser.cpp" break; case 73: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 425 "parser.ypp" +#line 433 "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 2396 "parser.cpp" break; case 74: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 430 "parser.ypp" +#line 438 "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 2402 "parser.cpp" break; case 75: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 432 "parser.ypp" +#line 440 "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 2408 "parser.cpp" break; case 76: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 437 "parser.ypp" +#line 445 "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 2414 "parser.cpp" break; case 77: // stmt_case: "case" expr_integer ":" -#line 442 "parser.ypp" +#line 450 "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 2420 "parser.cpp" break; case 78: // stmt_case: "case" expr_string ":" -#line 444 "parser.ypp" +#line 452 "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 2426 "parser.cpp" break; case 79: // stmt_default: "default" ":" -#line 449 "parser.ypp" +#line 457 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2432 "parser.cpp" break; case 80: // stmt_break: "break" ";" -#line 454 "parser.ypp" +#line 462 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2438 "parser.cpp" break; case 81: // stmt_continue: "continue" ";" -#line 459 "parser.ypp" +#line 467 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2444 "parser.cpp" break; case 82: // stmt_return: "return" expr ";" -#line 464 "parser.ypp" +#line 472 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2450 "parser.cpp" break; case 83: // stmt_return: "return" ";" -#line 466 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2456 "parser.cpp" break; case 84: // stmt_breakpoint: "breakpoint" ";" -#line 471 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2462 "parser.cpp" break; case 85: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 476 "parser.ypp" +#line 484 "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 2468 "parser.cpp" break; case 86: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 481 "parser.ypp" +#line 489 "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 2474 "parser.cpp" break; case 87: // expr: expr_ternary -#line 485 "parser.ypp" +#line 493 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2480 "parser.cpp" break; case 88: // expr: expr_binary -#line 486 "parser.ypp" +#line 494 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2486 "parser.cpp" break; case 89: // expr: expr_primitive -#line 487 "parser.ypp" +#line 495 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2492 "parser.cpp" break; case 90: // expr_or_empty: expr -#line 491 "parser.ypp" +#line 499 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2498 "parser.cpp" break; case 91: // expr_or_empty: %empty -#line 492 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2504 "parser.cpp" break; case 92: // expr_assign: expr_object "=" expr -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2510 "parser.cpp" break; case 93: // expr_assign: expr_object "|=" expr -#line 499 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2516 "parser.cpp" break; case 94: // expr_assign: expr_object "&=" expr -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2522 "parser.cpp" break; case 95: // expr_assign: expr_object "^=" expr -#line 503 "parser.ypp" +#line 511 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2528 "parser.cpp" break; case 96: // expr_assign: expr_object "<<=" expr -#line 505 "parser.ypp" +#line 513 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2534 "parser.cpp" break; case 97: // expr_assign: expr_object ">>=" expr -#line 507 "parser.ypp" +#line 515 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2540 "parser.cpp" break; case 98: // expr_assign: expr_object "+=" expr -#line 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2546 "parser.cpp" break; case 99: // expr_assign: expr_object "-=" expr -#line 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2552 "parser.cpp" break; case 100: // expr_assign: expr_object "*=" expr -#line 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2558 "parser.cpp" break; case 101: // expr_assign: expr_object "/=" expr -#line 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2564 "parser.cpp" break; case 102: // expr_assign: expr_object "%=" expr -#line 517 "parser.ypp" +#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 2570 "parser.cpp" break; case 103: // expr_increment: "++" expr_object -#line 522 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2576 "parser.cpp" break; case 104: // expr_increment: expr_object "++" -#line 524 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2582 "parser.cpp" break; case 105: // expr_decrement: "--" expr_object -#line 529 "parser.ypp" +#line 537 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2588 "parser.cpp" break; case 106: // expr_decrement: expr_object "--" -#line 531 "parser.ypp" +#line 539 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2594 "parser.cpp" break; case 107: // expr_ternary: expr "?" expr ":" expr -#line 536 "parser.ypp" +#line 544 "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 2600 "parser.cpp" break; case 108: // expr_binary: expr "||" expr -#line 541 "parser.ypp" +#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 2606 "parser.cpp" break; case 109: // expr_binary: expr "&&" expr -#line 543 "parser.ypp" +#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 2612 "parser.cpp" break; case 110: // expr_binary: expr "==" expr -#line 545 "parser.ypp" +#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 2618 "parser.cpp" break; case 111: // expr_binary: expr "!=" expr -#line 547 "parser.ypp" +#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 2624 "parser.cpp" break; case 112: // expr_binary: expr "<=" expr -#line 549 "parser.ypp" +#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 2630 "parser.cpp" break; case 113: // expr_binary: expr ">=" expr -#line 551 "parser.ypp" +#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 2636 "parser.cpp" break; case 114: // expr_binary: expr "<" expr -#line 553 "parser.ypp" +#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 2642 "parser.cpp" break; case 115: // expr_binary: expr ">" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2648 "parser.cpp" break; case 116: // expr_binary: expr "|" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2654 "parser.cpp" break; case 117: // expr_binary: expr "&" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2660 "parser.cpp" break; case 118: // expr_binary: expr "^" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2666 "parser.cpp" break; case 119: // expr_binary: expr "<<" expr -#line 563 "parser.ypp" +#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 2672 "parser.cpp" break; case 120: // expr_binary: expr ">>" expr -#line 565 "parser.ypp" +#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 2678 "parser.cpp" break; case 121: // expr_binary: expr "+" expr -#line 567 "parser.ypp" +#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 2684 "parser.cpp" break; case 122: // expr_binary: expr "-" expr -#line 569 "parser.ypp" +#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 2690 "parser.cpp" break; case 123: // expr_binary: expr "*" expr -#line 571 "parser.ypp" +#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 2696 "parser.cpp" break; case 124: // expr_binary: expr "/" expr -#line 573 "parser.ypp" +#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 2702 "parser.cpp" break; case 125: // expr_binary: expr "%" expr -#line 575 "parser.ypp" +#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 2708 "parser.cpp" break; case 126: // expr_primitive: expr_complement -#line 579 "parser.ypp" +#line 587 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2714 "parser.cpp" break; case 127: // expr_primitive: expr_not -#line 580 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2720 "parser.cpp" break; case 128: // expr_primitive: expr_call -#line 581 "parser.ypp" +#line 589 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2726 "parser.cpp" break; case 129: // expr_primitive: expr_method -#line 582 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2732 "parser.cpp" break; case 130: // expr_primitive: expr_add_array -#line 583 "parser.ypp" +#line 591 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2738 "parser.cpp" break; case 131: // expr_primitive: expr_reference -#line 584 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2744 "parser.cpp" break; case 132: // expr_primitive: expr_array -#line 585 "parser.ypp" +#line 593 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2750 "parser.cpp" break; case 133: // expr_primitive: expr_field -#line 586 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2756 "parser.cpp" break; case 134: // expr_primitive: expr_size -#line 587 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2762 "parser.cpp" break; case 135: // expr_primitive: expr_paren -#line 588 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2768 "parser.cpp" break; case 136: // expr_primitive: expr_thisthread -#line 589 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2774 "parser.cpp" break; case 137: // expr_primitive: expr_empty_array -#line 590 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2780 "parser.cpp" break; case 138: // expr_primitive: expr_undefined -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2786 "parser.cpp" break; case 139: // expr_primitive: expr_game -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2792 "parser.cpp" break; case 140: // expr_primitive: expr_self -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2798 "parser.cpp" break; case 141: // expr_primitive: expr_anim -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2804 "parser.cpp" break; case 142: // expr_primitive: expr_level -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2810 "parser.cpp" break; case 143: // expr_primitive: expr_animation -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2816 "parser.cpp" break; case 144: // expr_primitive: expr_animtree -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2822 "parser.cpp" break; case 145: // expr_primitive: expr_identifier -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2828 "parser.cpp" break; case 146: // expr_primitive: expr_istring -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2834 "parser.cpp" break; case 147: // expr_primitive: expr_string -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2840 "parser.cpp" break; case 148: // expr_primitive: expr_color -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2846 "parser.cpp" break; case 149: // expr_primitive: expr_vector -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2852 "parser.cpp" break; case 150: // expr_primitive: expr_float -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2858 "parser.cpp" break; case 151: // expr_primitive: expr_integer -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2864 "parser.cpp" break; case 152: // expr_primitive: expr_false -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2870 "parser.cpp" break; case 153: // expr_primitive: expr_true -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2876 "parser.cpp" break; case 154: // expr_complement: "~" expr -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2882 "parser.cpp" break; case 155: // expr_not: "!" expr -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2888 "parser.cpp" break; case 156: // expr_call: expr_function -#line 620 "parser.ypp" +#line 628 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2894 "parser.cpp" break; case 157: // expr_call: expr_pointer -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2900 "parser.cpp" break; case 158: // expr_method: expr_object expr_function -#line 624 "parser.ypp" +#line 632 "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 2906 "parser.cpp" break; case 159: // expr_method: expr_object expr_pointer -#line 625 "parser.ypp" +#line 633 "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 2912 "parser.cpp" break; case 160: // expr_function: expr_identifier "(" expr_arguments ")" -#line 630 "parser.ypp" +#line 638 "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 2918 "parser.cpp" break; case 161: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 632 "parser.ypp" +#line 640 "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 2924 "parser.cpp" break; case 162: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 634 "parser.ypp" +#line 642 "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 2930 "parser.cpp" break; case 163: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 636 "parser.ypp" +#line 644 "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 2936 "parser.cpp" break; case 164: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 638 "parser.ypp" +#line 646 "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 2942 "parser.cpp" break; case 165: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 648 "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 2948 "parser.cpp" break; case 166: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 645 "parser.ypp" +#line 653 "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 2954 "parser.cpp" break; case 167: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 647 "parser.ypp" +#line 655 "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 2960 "parser.cpp" break; case 168: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 649 "parser.ypp" +#line 657 "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 2966 "parser.cpp" break; case 169: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 651 "parser.ypp" +#line 659 "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 2972 "parser.cpp" break; case 170: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 656 "parser.ypp" +#line 664 "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 2978 "parser.cpp" break; case 171: // expr_parameters: expr_parameters "," expr_identifier -#line 661 "parser.ypp" +#line 669 "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 2984 "parser.cpp" break; case 172: // expr_parameters: expr_identifier -#line 663 "parser.ypp" +#line 671 "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 2990 "parser.cpp" break; case 173: // expr_parameters: %empty -#line 665 "parser.ypp" +#line 673 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 2996 "parser.cpp" break; case 174: // expr_arguments: expr_arguments_no_empty -#line 670 "parser.ypp" +#line 678 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3002 "parser.cpp" break; case 175: // expr_arguments: %empty -#line 672 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3008 "parser.cpp" break; case 176: // expr_arguments_no_empty: expr_arguments "," expr -#line 677 "parser.ypp" +#line 685 "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 3014 "parser.cpp" break; case 177: // expr_arguments_no_empty: expr -#line 679 "parser.ypp" +#line 687 "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 3020 "parser.cpp" break; case 178: // expr_reference: "::" expr_identifier -#line 684 "parser.ypp" +#line 692 "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 3026 "parser.cpp" break; case 179: // expr_reference: expr_path "::" expr_identifier -#line 686 "parser.ypp" +#line 694 "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 3032 "parser.cpp" break; case 180: // expr_array: expr_object "[" expr "]" -#line 691 "parser.ypp" +#line 699 "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 3038 "parser.cpp" break; case 181: // expr_field: expr_object "." expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3044 "parser.cpp" break; case 182: // expr_field: expr_object "field" -#line 698 "parser.ypp" +#line 706 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3050 "parser.cpp" break; case 183: // expr_size: expr_object ".size" -#line 703 "parser.ypp" +#line 711 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3056 "parser.cpp" break; case 184: // expr_paren: "(" expr ")" -#line 708 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3062 "parser.cpp" break; case 185: // expr_object: expr_call -#line 712 "parser.ypp" +#line 720 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3068 "parser.cpp" break; case 186: // expr_object: expr_method -#line 713 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3074 "parser.cpp" break; case 187: // expr_object: expr_array -#line 714 "parser.ypp" +#line 722 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3080 "parser.cpp" break; case 188: // expr_object: expr_field -#line 715 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3086 "parser.cpp" break; case 189: // expr_object: expr_game -#line 716 "parser.ypp" +#line 724 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3092 "parser.cpp" break; case 190: // expr_object: expr_self -#line 717 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3098 "parser.cpp" break; case 191: // expr_object: expr_anim -#line 718 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3104 "parser.cpp" break; case 192: // expr_object: expr_level -#line 719 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3110 "parser.cpp" break; case 193: // expr_object: expr_identifier -#line 720 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3116 "parser.cpp" break; case 194: // expr_thisthread: "thisthread" -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3122 "parser.cpp" break; case 195: // expr_empty_array: "[" "]" -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3128 "parser.cpp" break; case 196: // expr_undefined: "undefined" -#line 735 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3134 "parser.cpp" break; case 197: // expr_game: "game" -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3140 "parser.cpp" break; case 198: // expr_self: "self" -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3146 "parser.cpp" break; case 199: // expr_anim: "anim" -#line 750 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3152 "parser.cpp" break; case 200: // expr_level: "level" -#line 755 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3158 "parser.cpp" break; case 201: // expr_animation: "%" "identifier" -#line 760 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3164 "parser.cpp" break; case 202: // expr_animtree: "#animtree" -#line 765 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3170 "parser.cpp" break; case 203: // expr_identifier: "identifier" -#line 770 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3176 "parser.cpp" break; case 204: // expr_path: "path" -#line 775 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3182 "parser.cpp" break; case 205: // expr_path: expr_identifier -#line 777 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3188 "parser.cpp" break; case 206: // expr_istring: "localized string" -#line 782 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3194 "parser.cpp" break; case 207: // expr_string: "string literal" -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3200 "parser.cpp" break; case 208: // expr_color: "color" -#line 792 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3206 "parser.cpp" break; case 209: // expr_vector: "(" expr "," expr "," expr ")" -#line 797 "parser.ypp" +#line 805 "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 3212 "parser.cpp" break; case 210: // expr_float: "-" "float" -#line 802 "parser.ypp" +#line 810 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3218 "parser.cpp" break; case 211: // expr_float: "float" -#line 804 "parser.ypp" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3224 "parser.cpp" break; case 212: // expr_integer: "-" "integer" -#line 809 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3230 "parser.cpp" break; case 213: // expr_integer: "integer" -#line 811 "parser.ypp" +#line 819 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3236 "parser.cpp" break; case 214: // expr_false: "false" -#line 816 "parser.ypp" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3242 "parser.cpp" break; case 215: // expr_true: "true" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3248 "parser.cpp" break; @@ -3432,7 +3432,8 @@ namespace xsk { namespace gsc { namespace iw5 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", "default", "break", @@ -3735,49 +3736,49 @@ namespace xsk { namespace gsc { namespace iw5 { const short parser::yypact_[] = { - 16, -260, -260, -74, -74, -14, -260, 26, 16, -260, - -260, -260, -260, -260, -260, -33, -260, -260, -25, 4, - -43, -260, -260, -260, -260, -24, 1124, -260, -260, -260, - 21, -17, -260, -260, -40, -5, -260, 22, -260, -260, - -260, -260, -260, -260, -260, 1124, 994, -24, 1124, 1124, - -35, 11, -260, -260, -260, -260, 2038, -260, -260, -260, - -260, -260, 473, 541, -260, -260, -260, -260, 575, 624, - -260, -260, 653, -260, -260, -260, 677, 685, 1032, 1097, - -260, -260, 36, 24, -260, -260, -260, -260, -260, -260, - -260, -260, 23, 57, -24, 68, 69, 70, 84, 99, - 87, 93, 1324, 994, -260, 2121, 102, 107, -260, -260, - -260, -260, -260, -260, -260, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 1124, 1124, -260, 1189, -24, -260, -260, -260, - 114, 108, 1124, -24, -260, 783, -260, -260, 1124, 1124, - -24, 1124, 1124, -24, 1124, -260, 1124, 1768, 1124, -260, - 2003, 116, 116, 2152, 1180, 158, 158, 77, 77, 77, - 77, 2162, 989, 1115, 43, 43, -260, -260, -260, 1808, - -260, -24, 7, -260, 115, 829, 1124, 113, 126, 967, - 128, 130, 132, 133, -13, 125, 131, 134, 1059, 135, - 140, 149, -260, 148, 392, 392, -260, -260, -260, 875, + 8, -260, -260, -69, -69, -3, -260, 26, 8, -260, + -260, -260, -260, -260, -260, -41, -260, -260, -4, -2, + -39, -260, -260, -260, -260, -33, 1116, -260, -260, -260, + 14, -25, -260, -260, -48, -13, -260, 20, -260, -260, + -260, -260, -260, -260, -260, 1116, 986, -33, 1116, 1116, + -87, -29, -260, -260, -260, -260, 2030, -260, -260, -260, + -260, -260, 465, 533, -260, -260, -260, -260, 567, 616, + -260, -260, 645, -260, -260, -260, 669, 677, 1024, 1089, + -260, -260, 28, 17, -260, -260, -260, -260, -260, -260, + -260, -260, 51, 48, -33, 60, 70, 72, 83, 91, + 81, 96, 1316, 986, -260, 2113, 45, 99, -260, -260, + -260, -260, -260, -260, -260, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, -260, 1181, -33, -260, -260, -260, + 106, 100, 1116, -33, -260, 775, -260, -260, 1116, 1116, + -33, 1116, 1116, -33, 1116, -260, 1116, 1760, 1116, -260, + 1995, 108, 108, 2144, 1172, 150, 150, 69, 69, 69, + 69, 2154, 981, 1107, 35, 35, -260, -260, -260, 1800, + -260, -33, -1, -260, 107, 821, 1116, 105, 118, 959, + 120, 122, 124, 125, -21, 117, 123, 126, 1051, 127, + 132, 141, -260, 140, 384, 384, -260, -260, -260, 867, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, - -260, -260, -260, 144, 153, 154, 155, 157, -260, -260, - 1238, -260, -260, -260, -260, 2, 1848, 47, 169, 1888, - 48, 174, 1928, 1967, 178, 2121, 1124, -260, 115, -260, - 1124, -260, 921, 2073, -260, 1124, 160, 1124, -1, -24, - 1124, 141, 177, 186, -260, -260, -260, -260, 2108, -260, - 1124, 1124, 1124, -260, -260, 30, 30, -260, -260, -260, - -260, -260, -260, -260, 194, 196, 203, 204, -260, -260, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 200, -260, 1124, 202, -260, 1124, 205, 1124, 208, - 2121, 49, -260, -260, 1490, 209, 1524, 201, -260, -260, - -260, 1287, 3, 1558, -260, -260, -260, 51, 55, 1768, - 1124, 1124, 1124, 1124, 2121, 2121, 2121, 2121, 2121, 2121, - 2121, 2121, 2121, 2121, 2121, 214, 61, 215, 65, 216, - 1592, 1124, -260, 967, 1124, 967, 1124, 1124, -24, 57, - 207, 210, 1626, 1368, 1412, 1456, 1124, -260, 1124, -260, - 1124, -260, 67, 245, 1660, -260, 2121, 211, 1694, 246, - -260, -260, -260, 213, 217, 1124, 219, 1124, 221, 1124, - 95, 97, 121, -260, 967, 222, -1, 967, 1124, -260, - -260, 232, -260, 235, -260, 236, -260, -260, -260, -260, - -260, 238, -260, 1728, 231, 234, 237, 967, 967, -260, + -260, -260, -260, 136, 145, 146, 147, 149, -260, -260, + 1230, -260, -260, -260, -260, -6, 1840, 39, 161, 1880, + 40, 166, 1920, 1959, 170, 2113, 1116, -260, 107, -260, + 1116, -260, 913, 2065, -260, 1116, 152, 1116, -9, -33, + 1116, 133, 169, 177, -260, -260, -260, -260, 2100, -260, + 1116, 1116, 1116, -260, -260, 22, 22, -260, -260, -260, + -260, -260, -260, -260, 187, 188, 195, 196, -260, -260, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 194, -260, 1116, 197, -260, 1116, 198, 1116, 200, + 2113, 41, -260, -260, 1482, 201, 1516, 199, -260, -260, + -260, 1279, -5, 1550, -260, -260, -260, 43, 47, 1760, + 1116, 1116, 1116, 1116, 2113, 2113, 2113, 2113, 2113, 2113, + 2113, 2113, 2113, 2113, 2113, 206, 53, 207, 57, 208, + 1584, 1116, -260, 959, 1116, 959, 1116, 1116, -33, 48, + 202, 203, 1618, 1360, 1404, 1448, 1116, -260, 1116, -260, + 1116, -260, 59, 224, 1652, -260, 2113, 205, 1686, 232, + -260, -260, -260, 209, 211, 1116, 213, 1116, 214, 1116, + 87, 89, 113, -260, 959, 215, -9, 959, 1116, -260, + -260, 227, -260, 228, -260, 230, -260, -260, -260, -260, + -260, 235, -260, 1720, 223, 229, 231, 959, 959, -260, -260, -260, -260, -260 }; @@ -3833,14 +3834,14 @@ namespace xsk { namespace gsc { namespace iw5 { const short parser::yypgoto_[] = { - -260, -260, -260, 281, 284, 288, -260, -260, -260, -172, + -260, -260, -260, 259, 281, 288, -260, -260, -260, -172, -260, -91, 112, -108, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 185, -260, -259, -257, -250, -260, -260, -260, -260, -260, -82, -72, -66, -58, -260, -260, 321, -45, -260, -37, 192, -260, -260, 240, -260, -260, -260, 253, 327, 355, 365, -260, -260, - 0, 9, -260, -15, -260, -260, -260, 105, -260, -260 + 0, 9, -260, -15, -260, -260, -260, 129, -260, -260 }; const short @@ -3860,21 +3861,21 @@ namespace xsk { namespace gsc { namespace iw5 { parser::yytable_[] = { 15, 107, 146, 17, 17, 30, 138, 95, 15, 328, - 25, 329, 18, 19, 139, 16, 6, 266, 330, 1, - 2, 3, 4, 5, 367, 32, 21, 93, 27, 20, + 25, 329, 18, 19, 139, 111, 112, 266, 330, 1, + 2, 3, 4, 5, 367, 32, 21, 93, 16, 6, 34, 35, 94, 37, 96, 99, 26, 288, 41, 42, - 43, 44, 98, 97, 100, 142, 203, 108, 29, 16, - 6, 259, 368, -205, 204, 205, 158, 28, 107, 111, - 112, 34, 35, 236, 37, 92, 6, -193, -193, 101, - -193, 271, 140, 237, -193, 143, 144, 135, 29, 142, + 43, 44, 98, 97, 100, 142, 203, 108, 20, 16, + 6, 259, 368, -205, 204, 205, 158, 27, 107, 28, + 29, 34, 35, 236, 37, 6, 92, -193, -193, 113, + -193, 271, 140, 237, -193, 101, 143, 135, 29, 142, 136, 141, 55, -193, 16, 6, -193, -205, 16, 6, 288, 312, 315, 362, 147, 370, 158, 158, 158, 371, - 158, 113, 145, 236, 158, 377, 6, 236, 238, 379, - 158, 403, 149, 237, 158, 148, 158, 237, 137, 16, - 6, 150, 283, 283, -193, -193, -193, 236, 131, 132, - 133, 151, 284, 284, 116, 117, 180, 237, 153, 416, - 154, 417, 152, 184, 158, 245, 158, 328, 238, 329, - 248, 158, 238, 251, 141, 159, 330, 142, 260, 181, + 158, 145, 158, 236, 158, 377, 6, 236, 238, 379, + 158, 403, 144, 237, 158, 148, 158, 237, 137, 16, + 6, 149, 283, 283, -193, -193, -193, 236, 131, 132, + 133, 150, 284, 284, 116, 117, 180, 237, 151, 416, + 153, 417, 152, 184, 158, 245, 158, 328, 238, 329, + 248, 154, 238, 251, 141, 159, 330, 142, 260, 181, 129, 130, 131, 132, 133, 418, 264, 238, 238, 265, 158, 267, 238, 268, 138, 269, 270, 274, 325, 272, 236, 258, 139, 280, 275, 245, 283, 276, 279, 245, @@ -3882,16 +3883,16 @@ namespace xsk { namespace gsc { namespace iw5 { 130, 131, 132, 133, 245, 245, 290, 291, 292, 245, 293, 56, 313, 141, 141, 116, 117, 316, 141, 138, 138, 122, 123, 124, 125, 238, 319, 139, 139, 334, - 102, 238, 419, 109, 110, 422, 112, 340, 335, 341, - 140, 129, 130, 131, 132, 133, 342, 343, 355, 141, - 357, 361, 364, 359, 366, 432, 433, 376, 378, 380, - 391, 404, 245, 392, 406, 138, 409, 408, 245, 332, - 410, 141, 412, 139, 414, 420, 424, 141, 390, 425, - 426, 236, 427, 236, 429, 140, 140, 430, 157, 22, - 431, 237, 23, 237, 141, 141, 24, 262, 421, 273, + 102, 238, 419, 109, 110, 422, 112, 335, 340, 341, + 140, 129, 130, 131, 132, 133, 342, 343, 404, 141, + 355, 361, 364, 357, 359, 432, 433, 376, 378, 380, + 366, 408, 245, 391, 392, 138, 406, 22, 245, 332, + 409, 141, 410, 139, 412, 414, 420, 141, 390, 424, + 425, 236, 426, 236, 429, 140, 140, 427, 157, 23, + 430, 237, 431, 237, 141, 141, 24, 262, 421, 0, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, - 179, 0, 236, 0, 283, 236, 238, 0, 238, 0, + 179, 0, 236, 273, 283, 236, 238, 0, 238, 0, 0, 140, 237, 246, 284, 237, 249, 239, 0, 252, 141, 253, 0, 255, 0, 236, 236, 0, 0, 0, 411, 0, 413, 0, 415, 237, 237, 0, 0, 0, @@ -4089,39 +4090,39 @@ namespace xsk { namespace gsc { namespace iw5 { const short parser::yycheck_[] = { - 0, 46, 93, 3, 4, 20, 72, 47, 8, 268, - 43, 268, 3, 4, 72, 89, 90, 189, 268, 3, - 4, 5, 6, 7, 21, 25, 0, 44, 53, 43, - 31, 32, 49, 34, 34, 35, 69, 209, 39, 40, - 41, 42, 47, 34, 35, 43, 47, 47, 91, 89, - 90, 44, 49, 51, 55, 56, 49, 53, 103, 94, - 95, 31, 32, 145, 34, 44, 90, 31, 32, 47, - 34, 84, 72, 145, 38, 51, 53, 47, 91, 43, - 50, 72, 95, 47, 89, 90, 50, 51, 89, 90, - 262, 44, 44, 44, 94, 44, 49, 49, 49, 44, - 49, 90, 45, 185, 49, 44, 90, 189, 145, 44, - 49, 44, 43, 185, 49, 47, 49, 189, 88, 89, - 90, 51, 204, 205, 88, 89, 90, 209, 85, 86, - 87, 47, 204, 205, 57, 58, 136, 209, 51, 44, - 47, 44, 43, 143, 49, 145, 49, 406, 185, 406, - 150, 49, 189, 153, 145, 48, 406, 43, 43, 51, - 83, 84, 85, 86, 87, 44, 53, 204, 205, 43, - 49, 43, 209, 43, 240, 43, 43, 52, 18, 194, - 262, 181, 240, 43, 53, 185, 268, 53, 53, 189, - 262, 363, 43, 365, 185, 47, 268, 53, 189, 83, - 84, 85, 86, 87, 204, 205, 53, 53, 53, 209, - 53, 26, 43, 204, 205, 57, 58, 43, 209, 285, - 286, 63, 64, 65, 66, 262, 48, 285, 286, 52, - 45, 268, 404, 48, 49, 407, 95, 43, 52, 43, - 240, 83, 84, 85, 86, 87, 43, 43, 48, 240, - 48, 43, 43, 48, 53, 427, 428, 43, 43, 43, - 53, 16, 262, 53, 53, 331, 53, 21, 268, 269, - 53, 262, 53, 331, 53, 53, 44, 268, 369, 44, - 44, 363, 44, 365, 53, 285, 286, 53, 103, 8, - 53, 363, 8, 365, 285, 286, 8, 185, 406, 194, + 0, 46, 93, 3, 4, 20, 72, 55, 8, 268, + 51, 268, 3, 4, 72, 102, 103, 189, 268, 11, + 12, 13, 14, 15, 29, 25, 0, 52, 97, 98, + 39, 40, 57, 42, 34, 35, 77, 209, 47, 48, + 49, 50, 55, 34, 35, 51, 55, 47, 51, 97, + 98, 52, 57, 59, 63, 64, 57, 61, 103, 61, + 99, 39, 40, 145, 42, 98, 52, 39, 40, 98, + 42, 92, 72, 145, 46, 55, 59, 55, 99, 51, + 58, 72, 103, 55, 97, 98, 58, 59, 97, 98, + 262, 52, 52, 52, 94, 52, 57, 57, 57, 52, + 57, 53, 57, 185, 57, 52, 98, 189, 145, 52, + 57, 52, 61, 185, 57, 55, 57, 189, 96, 97, + 98, 51, 204, 205, 96, 97, 98, 209, 93, 94, + 95, 59, 204, 205, 65, 66, 136, 209, 55, 52, + 59, 52, 51, 143, 57, 145, 57, 406, 185, 406, + 150, 55, 189, 153, 145, 56, 406, 51, 51, 59, + 91, 92, 93, 94, 95, 52, 61, 204, 205, 51, + 57, 51, 209, 51, 240, 51, 51, 60, 26, 194, + 262, 181, 240, 51, 61, 185, 268, 61, 61, 189, + 262, 363, 51, 365, 185, 55, 268, 61, 189, 91, + 92, 93, 94, 95, 204, 205, 61, 61, 61, 209, + 61, 26, 51, 204, 205, 65, 66, 51, 209, 285, + 286, 71, 72, 73, 74, 262, 56, 285, 286, 60, + 45, 268, 404, 48, 49, 407, 103, 60, 51, 51, + 240, 91, 92, 93, 94, 95, 51, 51, 24, 240, + 56, 51, 51, 56, 56, 427, 428, 51, 51, 51, + 61, 29, 262, 61, 61, 331, 61, 8, 268, 269, + 61, 262, 61, 331, 61, 61, 61, 268, 369, 52, + 52, 363, 52, 365, 61, 285, 286, 52, 103, 8, + 61, 363, 61, 365, 285, 286, 8, 185, 406, -1, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, - 135, -1, 404, -1, 406, 407, 363, -1, 365, -1, + 135, -1, 404, 194, 406, 407, 363, -1, 365, -1, -1, 331, 404, 148, 406, 407, 151, 145, -1, 154, 331, 156, -1, 158, -1, 427, 428, -1, -1, -1, 395, -1, 397, -1, 399, 427, 428, -1, -1, -1, @@ -4131,265 +4132,265 @@ namespace xsk { namespace gsc { namespace iw5 { 427, 428, -1, -1, -1, -1, 204, 205, 145, -1, -1, 209, -1, -1, 404, -1, 406, 407, -1, -1, -1, -1, -1, 404, -1, 406, 407, -1, -1, -1, - -1, -1, -1, 31, 32, 185, 34, 427, 428, 189, - -1, 39, 40, 41, 42, -1, 427, 428, 185, 47, + -1, -1, -1, 39, 40, 185, 42, 427, 428, 189, + -1, 47, 48, 49, 50, -1, 427, 428, 185, 55, -1, 256, 189, -1, 204, 205, -1, -1, -1, 209, 265, -1, 267, -1, 262, 270, -1, 204, 205, -1, 268, -1, 209, 142, -1, -1, -1, 282, -1, -1, 149, -1, 145, 152, -1, -1, -1, -1, -1, -1, - -1, 89, 90, -1, -1, 300, 301, 302, 303, 304, + -1, 97, 98, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, -1, -1, -1, -1, - 145, -1, 262, 318, 31, 32, -1, 34, 268, -1, - 145, 38, 185, -1, -1, 262, 189, -1, -1, -1, - 47, 268, -1, 50, -1, 340, 341, 342, 343, -1, + 145, -1, 262, 318, 39, 40, -1, 42, 268, -1, + 145, 46, 185, -1, -1, 262, 189, -1, -1, -1, + 55, 268, -1, 58, -1, 340, 341, 342, 343, -1, -1, 204, 205, -1, -1, -1, 209, -1, -1, -1, 185, -1, -1, -1, 189, -1, -1, -1, -1, 364, 185, 366, 367, -1, 189, 363, -1, 365, -1, 204, - 205, 88, 89, 90, 209, -1, -1, -1, -1, 204, - 205, -1, 31, 32, 209, 34, -1, -1, -1, 38, - -1, 260, -1, -1, -1, -1, -1, -1, 47, 262, - -1, 50, -1, 408, -1, 268, 404, -1, 406, 407, - -1, 280, 281, 363, -1, 365, 31, 32, -1, 34, - -1, -1, -1, 38, -1, -1, 363, 262, 365, 427, - 428, -1, 47, 268, -1, 50, -1, 262, -1, 88, - 89, 90, -1, 268, 313, -1, -1, 316, -1, -1, + 205, 96, 97, 98, 209, -1, -1, -1, -1, 204, + 205, -1, 39, 40, 209, 42, -1, -1, -1, 46, + -1, 260, -1, -1, -1, -1, -1, -1, 55, 262, + -1, 58, -1, 408, -1, 268, 404, -1, 406, 407, + -1, 280, 281, 363, -1, 365, 39, 40, -1, 42, + -1, -1, -1, 46, -1, -1, 363, 262, 365, 427, + 428, -1, 55, 268, -1, 58, -1, 262, -1, 96, + 97, 98, -1, 268, 313, -1, -1, 316, -1, -1, -1, -1, -1, -1, 404, -1, 406, 407, -1, -1, - -1, -1, -1, -1, -1, 31, 32, 404, 34, 406, - 407, -1, 38, 88, 89, 90, -1, 427, 428, -1, - -1, 47, -1, -1, 50, -1, -1, -1, -1, -1, - 427, 428, 361, -1, 31, 32, -1, 34, -1, -1, - 363, 38, 365, -1, -1, -1, -1, 376, -1, 378, - 47, 380, -1, 50, -1, -1, -1, -1, 31, 32, - -1, 34, 88, 89, 90, 38, 31, 32, 363, 34, - 365, -1, -1, 38, 47, -1, -1, 50, 363, -1, - 365, 404, 47, 406, 407, 50, -1, -1, -1, -1, - -1, 88, 89, 90, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 39, 40, 404, 42, 406, + 407, -1, 46, 96, 97, 98, -1, 427, 428, -1, + -1, 55, -1, -1, 58, -1, -1, -1, -1, -1, + 427, 428, 361, -1, 39, 40, -1, 42, -1, -1, + 363, 46, 365, -1, -1, -1, -1, 376, -1, 378, + 55, 380, -1, 58, -1, -1, -1, -1, 39, 40, + -1, 42, 96, 97, 98, 46, 39, 40, 363, 42, + 365, -1, -1, 46, 55, -1, -1, 58, 363, -1, + 365, 404, 55, 406, 407, 58, -1, -1, -1, -1, + -1, 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, 428, -1, -1, -1, 404, - -1, 406, 407, -1, -1, 88, 89, 90, -1, 404, - -1, 406, 407, 88, 89, 90, -1, -1, -1, -1, - -1, -1, 427, 428, -1, -1, 3, -1, -1, -1, - -1, -1, 427, 428, 11, -1, -1, 14, 15, -1, - 17, 18, 19, 20, -1, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, -1, 34, -1, -1, - -1, -1, 39, 40, 41, 42, -1, -1, 45, 46, - 47, -1, 3, 4, -1, -1, -1, -1, 55, 56, - 11, -1, -1, 14, 15, -1, 17, 18, 19, 20, - -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, -1, 34, -1, -1, -1, -1, 39, 40, - 41, 42, 89, 90, 45, -1, 47, -1, 3, -1, - -1, -1, -1, -1, 55, 56, 11, -1, -1, 14, - 15, -1, 17, 18, 19, 20, -1, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, - -1, -1, -1, -1, 39, 40, 41, 42, 89, 90, - 45, 46, 47, -1, 3, 4, -1, -1, -1, -1, - 55, 56, 11, -1, -1, 14, 15, -1, 17, 18, - 19, 20, -1, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, -1, 34, -1, -1, -1, -1, - 39, 40, 41, 42, 89, 90, 45, -1, 47, -1, - 3, -1, -1, -1, -1, -1, 55, 56, 11, -1, - -1, 14, 15, -1, 17, 18, 19, 20, -1, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - -1, 34, 8, -1, -1, -1, 39, 40, 41, 42, - 89, 90, 45, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, 56, -1, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, - -1, 47, 48, -1, -1, 51, 57, 58, -1, -1, - 61, 62, 63, 64, 65, 66, 89, 90, -1, -1, - -1, 67, 68, 31, 32, -1, 34, 8, -1, -1, - 38, -1, 83, 84, 85, 86, 87, -1, 84, 47, - -1, 87, 50, 89, 90, 91, 92, 93, 94, 95, - 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, - 41, 42, 43, -1, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, -1, -1, -1, 67, 68, 31, 32, - -1, 34, 8, -1, -1, 38, -1, -1, -1, -1, - -1, -1, -1, 84, 47, -1, 87, 50, 89, 90, - 91, 92, 93, 94, 95, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, - -1, 47, 57, 58, -1, 51, 61, 62, 63, 64, - 65, 66, -1, -1, -1, 88, 89, 90, -1, -1, - -1, 67, 68, -1, -1, -1, 81, 8, 83, 84, - 85, 86, 87, -1, -1, -1, -1, -1, 84, -1, - -1, 87, -1, 89, 90, 91, 92, 93, 94, 95, - 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, - 41, 42, 43, -1, -1, -1, 47, 57, 58, -1, - 51, 61, 62, 63, 64, 65, 66, 9, 10, -1, - 12, 13, -1, -1, -1, -1, 67, 68, -1, -1, - 80, 81, 82, 83, 84, 85, 86, 87, -1, 31, - 32, -1, 34, 84, -1, -1, 87, -1, 89, 90, - 91, 92, 93, 94, 95, 47, -1, -1, 50, -1, - -1, -1, -1, 55, 56, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 31, 32, - -1, 34, -1, -1, -1, -1, 88, 89, 90, -1, - -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, - -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, -1, 44, -1, - -1, -1, -1, 49, -1, 88, 89, 90, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 44, -1, -1, -1, -1, 49, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 44, -1, -1, -1, - -1, 49, -1, -1, -1, -1, 54, -1, -1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, + -1, 406, 407, -1, -1, 96, 97, 98, -1, 404, + -1, 406, 407, 96, 97, 98, -1, -1, -1, -1, + -1, -1, 427, 428, -1, -1, 11, -1, -1, -1, + -1, -1, 427, 428, 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, -1, 47, 48, 49, 50, -1, -1, 53, 54, + 55, -1, 11, 12, -1, -1, -1, -1, 63, 64, + 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, -1, 47, 48, + 49, 50, 97, 98, 53, -1, 55, -1, 11, -1, + -1, -1, -1, -1, 63, 64, 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, -1, 47, 48, 49, 50, 97, 98, + 53, 54, 55, -1, 11, 12, -1, -1, -1, -1, + 63, 64, 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, -1, + 47, 48, 49, 50, 97, 98, 53, -1, 55, -1, + 11, -1, -1, -1, -1, -1, 63, 64, 19, -1, + -1, 22, 23, -1, 25, 26, 27, 28, -1, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + -1, 42, 16, -1, -1, -1, 47, 48, 49, 50, + 97, 98, 53, -1, 55, -1, -1, -1, -1, -1, + -1, -1, 63, 64, -1, 39, 40, 41, 42, 43, + 44, 45, -1, 47, 48, 49, 50, 51, -1, -1, + -1, 55, 56, -1, -1, 59, 65, 66, -1, -1, + 69, 70, 71, 72, 73, 74, 97, 98, -1, -1, + -1, 75, 76, 39, 40, -1, 42, 16, -1, -1, + 46, -1, 91, 92, 93, 94, 95, -1, 92, 55, + -1, 95, 58, 97, 98, 99, 100, 101, 102, 103, + 39, 40, 41, 42, 43, 44, 45, -1, 47, 48, + 49, 50, 51, -1, -1, -1, 55, -1, -1, -1, + 59, -1, 61, -1, -1, -1, -1, -1, -1, -1, + 96, 97, 98, -1, -1, -1, 75, 76, 39, 40, + -1, 42, 16, -1, -1, 46, -1, -1, -1, -1, + -1, -1, -1, 92, 55, -1, 95, 58, 97, 98, + 99, 100, 101, 102, 103, 39, 40, 41, 42, 43, + 44, 45, -1, 47, 48, 49, 50, 51, -1, -1, + -1, 55, 65, 66, -1, 59, 69, 70, 71, 72, + 73, 74, -1, -1, -1, 96, 97, 98, -1, -1, + -1, 75, 76, -1, -1, -1, 89, 16, 91, 92, + 93, 94, 95, -1, -1, -1, -1, -1, 92, -1, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + 39, 40, 41, 42, 43, 44, 45, -1, 47, 48, + 49, 50, 51, -1, -1, -1, 55, 65, 66, -1, + 59, 69, 70, 71, 72, 73, 74, 17, 18, -1, + 20, 21, -1, -1, -1, -1, 75, 76, -1, -1, + 88, 89, 90, 91, 92, 93, 94, 95, -1, 39, + 40, -1, 42, 92, -1, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, 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, 39, 40, + -1, 42, -1, -1, -1, -1, 96, 97, 98, -1, + -1, -1, -1, -1, 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, 52, -1, + -1, -1, -1, 57, -1, 96, 97, 98, 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, - -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 44, -1, -1, -1, -1, 49, -1, -1, -1, -1, - 54, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 44, -1, 80, 81, 82, 83, - 84, 85, 86, 87, 54, -1, -1, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 44, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 54, -1, -1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -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, - 44, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 54, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 44, -1, 80, 81, 82, 83, - 84, 85, 86, 87, 54, -1, -1, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 49, -1, -1, -1, - -1, 54, -1, -1, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 80, 81, 82, - 83, 84, 85, 86, 87, 52, -1, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 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, 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, 80, 81, 82, 83, 84, 85, 86, - 87, 53, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 53, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + -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, 80, 81, 82, 83, 84, 85, 86, - 87, 53, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 54, -1, -1, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 80, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, - -1, 80, 81, 82, 83, 84, 85, 86, 87, 57, - 58, -1, 60, 61, 62, 63, 64, 65, 66, 57, - 58, -1, -1, 61, 62, 63, 64, 65, 66, -1, - -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, - -1, -1, -1, 81, 82, 83, 84, 85, 86, 87 + -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, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, - 109, 110, 111, 112, 113, 175, 89, 175, 176, 176, - 43, 0, 108, 109, 110, 43, 69, 53, 53, 91, - 178, 157, 175, 8, 31, 32, 33, 34, 35, 36, - 37, 39, 40, 41, 42, 43, 47, 51, 67, 68, - 84, 87, 92, 93, 94, 95, 142, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 44, 44, 49, 47, 175, 176, 47, 175, - 176, 47, 142, 47, 48, 142, 158, 159, 175, 142, - 142, 94, 95, 90, 53, 54, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, - 84, 85, 86, 87, 38, 47, 50, 88, 154, 155, - 175, 176, 43, 51, 53, 45, 116, 175, 47, 43, - 51, 47, 43, 51, 47, 44, 49, 142, 49, 48, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 175, 51, 158, 159, 175, 3, 11, 14, 15, 17, - 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 46, 47, 55, 56, 114, 115, 116, 117, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 144, 145, 146, 152, 153, 161, 162, - 165, 169, 170, 171, 172, 175, 142, 158, 175, 142, - 158, 175, 142, 142, 48, 142, 52, 48, 175, 44, - 43, 4, 117, 142, 53, 43, 114, 43, 43, 43, - 43, 84, 178, 182, 52, 53, 53, 53, 142, 53, - 43, 43, 47, 152, 153, 165, 165, 46, 114, 53, - 53, 53, 53, 53, 9, 10, 12, 13, 55, 56, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 48, 44, 43, 48, 44, 43, 48, 49, 48, - 142, 158, 4, 53, 142, 18, 142, 118, 144, 145, - 146, 165, 175, 142, 52, 52, 53, 158, 158, 142, - 43, 43, 43, 43, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 48, 158, 48, 158, 48, - 142, 43, 44, 44, 43, 44, 53, 21, 49, 44, - 44, 44, 142, 142, 142, 142, 43, 44, 43, 44, - 43, 44, 158, 114, 142, 114, 142, 143, 142, 175, - 116, 53, 53, 44, 44, 49, 44, 49, 44, 49, - 158, 158, 158, 44, 16, 44, 53, 44, 21, 53, - 53, 159, 53, 159, 53, 159, 44, 44, 44, 114, - 53, 118, 114, 142, 44, 44, 44, 44, 44, 53, - 53, 53, 114, 114 + 0, 11, 12, 13, 14, 15, 98, 114, 115, 116, + 117, 118, 119, 120, 121, 183, 97, 183, 184, 184, + 51, 0, 116, 117, 118, 51, 77, 61, 61, 99, + 186, 165, 183, 16, 39, 40, 41, 42, 43, 44, + 45, 47, 48, 49, 50, 51, 55, 59, 75, 76, + 92, 95, 100, 101, 102, 103, 150, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 52, 52, 57, 55, 183, 184, 55, 183, + 184, 55, 150, 55, 56, 150, 166, 167, 183, 150, + 150, 102, 103, 98, 61, 62, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 88, 89, 90, 91, + 92, 93, 94, 95, 46, 55, 58, 96, 162, 163, + 183, 184, 51, 59, 61, 53, 124, 183, 55, 51, + 59, 55, 51, 59, 55, 52, 57, 150, 57, 56, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 183, 59, 166, 167, 183, 11, 19, 22, 23, 25, + 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 54, 55, 63, 64, 122, 123, 124, 125, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 152, 153, 154, 160, 161, 169, 170, + 173, 177, 178, 179, 180, 183, 150, 166, 183, 150, + 166, 183, 150, 150, 56, 150, 60, 56, 183, 52, + 51, 12, 125, 150, 61, 51, 122, 51, 51, 51, + 51, 92, 186, 190, 60, 61, 61, 61, 150, 61, + 51, 51, 55, 160, 161, 173, 173, 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, + 150, 166, 12, 61, 150, 26, 150, 126, 152, 153, + 154, 173, 183, 150, 60, 60, 61, 166, 166, 150, + 51, 51, 51, 51, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 56, 166, 56, 166, 56, + 150, 51, 52, 52, 51, 52, 61, 29, 57, 52, + 52, 52, 150, 150, 150, 150, 51, 52, 51, 52, + 51, 52, 166, 122, 150, 122, 150, 151, 150, 183, + 124, 61, 61, 52, 52, 57, 52, 57, 52, 57, + 166, 166, 166, 52, 24, 52, 61, 52, 29, 61, + 61, 167, 61, 167, 61, 167, 52, 52, 52, 122, + 61, 126, 122, 150, 52, 52, 52, 52, 52, 61, + 61, 61, 122, 122 }; const unsigned char parser::yyr1_[] = { - 0, 105, 106, 106, 107, 107, 107, 107, 107, 107, - 108, 109, 110, 110, 110, 110, 110, 111, 112, 113, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 115, 115, 116, 116, 117, - 117, 118, 118, 118, 118, 119, 119, 120, 120, 120, - 121, 122, 122, 123, 124, 124, 125, 125, 126, 127, - 128, 129, 130, 131, 132, 132, 133, 134, 134, 135, - 136, 137, 138, 138, 139, 140, 141, 142, 142, 142, - 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 145, 145, 146, 146, 147, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 150, 151, 152, 152, 153, 153, - 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, - 156, 157, 157, 157, 158, 158, 159, 159, 160, 160, - 161, 162, 162, 163, 164, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 176, 177, 178, 179, 180, - 181, 181, 182, 182, 183, 184 + 0, 113, 114, 114, 115, 115, 115, 115, 115, 115, + 116, 117, 118, 118, 118, 118, 118, 119, 120, 121, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 123, 123, 124, 124, 125, + 125, 126, 126, 126, 126, 127, 127, 128, 128, 128, + 129, 130, 130, 131, 132, 132, 133, 133, 134, 135, + 136, 137, 138, 139, 140, 140, 141, 142, 142, 143, + 144, 145, 146, 146, 147, 148, 149, 150, 150, 150, + 151, 151, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 153, 153, 154, 154, 155, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 158, 159, 160, 160, 161, 161, + 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, + 164, 165, 165, 165, 166, 166, 167, 167, 168, 168, + 169, 170, 170, 171, 172, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 184, 185, 186, 187, 188, + 189, 189, 190, 190, 191, 192 }; const signed char @@ -4426,28 +4427,28 @@ namespace xsk { namespace gsc { namespace iw5 { const short parser::yyrline_[] = { - 0, 244, 244, 245, 249, 251, 253, 255, 257, 259, - 264, 268, 273, 274, 275, 276, 277, 281, 286, 291, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 324, 325, 329, 330, 334, - 336, 341, 343, 345, 348, 352, 354, 359, 361, 363, - 368, 373, 375, 380, 385, 387, 392, 394, 399, 404, - 409, 414, 419, 424, 429, 431, 436, 441, 443, 448, - 453, 458, 463, 465, 470, 475, 480, 485, 486, 487, - 491, 492, 496, 498, 500, 502, 504, 506, 508, 510, - 512, 514, 516, 521, 523, 528, 530, 535, 540, 542, - 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, - 564, 566, 568, 570, 572, 574, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, - 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, - 603, 604, 605, 606, 610, 615, 620, 621, 624, 625, - 629, 631, 633, 635, 637, 639, 644, 646, 648, 650, - 655, 660, 662, 665, 669, 672, 676, 678, 683, 685, - 690, 695, 697, 702, 707, 712, 713, 714, 715, 716, - 717, 718, 719, 720, 724, 729, 734, 739, 744, 749, - 754, 759, 764, 769, 774, 776, 781, 786, 791, 796, - 801, 803, 808, 810, 815, 820 + 0, 252, 252, 253, 257, 259, 261, 263, 265, 267, + 272, 276, 281, 282, 283, 284, 285, 289, 294, 299, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 332, 333, 337, 338, 342, + 344, 349, 351, 353, 356, 360, 362, 367, 369, 371, + 376, 381, 383, 388, 393, 395, 400, 402, 407, 412, + 417, 422, 427, 432, 437, 439, 444, 449, 451, 456, + 461, 466, 471, 473, 478, 483, 488, 493, 494, 495, + 499, 500, 504, 506, 508, 510, 512, 514, 516, 518, + 520, 522, 524, 529, 531, 536, 538, 543, 548, 550, + 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, + 572, 574, 576, 578, 580, 582, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 614, 618, 623, 628, 629, 632, 633, + 637, 639, 641, 643, 645, 647, 652, 654, 656, 658, + 663, 668, 670, 673, 677, 680, 684, 686, 691, 693, + 698, 703, 705, 710, 715, 720, 721, 722, 723, 724, + 725, 726, 727, 728, 732, 737, 742, 747, 752, 757, + 762, 767, 772, 777, 782, 784, 789, 794, 799, 804, + 809, 811, 816, 818, 823, 828 }; void @@ -4480,9 +4481,9 @@ namespace xsk { namespace gsc { namespace iw5 { #line 13 "parser.ypp" } } } // xsk::gsc::iw5 -#line 4484 "parser.cpp" +#line 4485 "parser.cpp" -#line 824 "parser.ypp" +#line 832 "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 cd83dfa9..b724cae5 100644 --- a/src/iw5/xsk/parser.hpp +++ b/src/iw5/xsk/parser.hpp @@ -674,108 +674,116 @@ namespace xsk { namespace gsc { namespace iw5 { IW5EOF = 0, // "end of file" IW5error = 1, // error IW5UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - IF = 15, // "if" - ELSE = 16, // "else" - DO = 17, // "do" - WHILE = 18, // "while" - FOR = 19, // "for" - FOREACH = 20, // "foreach" - IN = 21, // "in" - SWITCH = 22, // "switch" - CASE = 23, // "case" - DEFAULT = 24, // "default" - BREAK = 25, // "break" - CONTINUE = 26, // "continue" - RETURN = 27, // "return" - BREAKPOINT = 28, // "breakpoint" - PROFBEGIN = 29, // "prof_begin" - PROFEND = 30, // "prof_end" - THREAD = 31, // "thread" - CHILDTHREAD = 32, // "childthread" - THISTHREAD = 33, // "thisthread" - CALL = 34, // "call" - TRUE = 35, // "true" - FALSE = 36, // "false" - UNDEFINED = 37, // "undefined" - SIZE = 38, // ".size" - GAME = 39, // "game" - SELF = 40, // "self" - ANIM = 41, // "anim" - LEVEL = 42, // "level" - LPAREN = 43, // "(" - RPAREN = 44, // ")" - LBRACE = 45, // "{" - RBRACE = 46, // "}" - LBRACKET = 47, // "[" - RBRACKET = 48, // "]" - COMMA = 49, // "," - DOT = 50, // "." - DOUBLECOLON = 51, // "::" - COLON = 52, // ":" - SEMICOLON = 53, // ";" - QMARK = 54, // "?" - INCREMENT = 55, // "++" - DECREMENT = 56, // "--" - LSHIFT = 57, // "<<" - RSHIFT = 58, // ">>" - OR = 59, // "||" - AND = 60, // "&&" - EQUALITY = 61, // "==" - INEQUALITY = 62, // "!=" - LESS_EQUAL = 63, // "<=" - GREATER_EQUAL = 64, // ">=" - LESS = 65, // "<" - GREATER = 66, // ">" - NOT = 67, // "!" - COMPLEMENT = 68, // "~" - ASSIGN = 69, // "=" - ASSIGN_ADD = 70, // "+=" - ASSIGN_SUB = 71, // "-=" - ASSIGN_MUL = 72, // "*=" - ASSIGN_DIV = 73, // "/=" - ASSIGN_MOD = 74, // "%=" - ASSIGN_BW_OR = 75, // "|=" - ASSIGN_BW_AND = 76, // "&=" - ASSIGN_BW_EXOR = 77, // "^=" - ASSIGN_RSHIFT = 78, // ">>=" - ASSIGN_LSHIFT = 79, // "<<=" - BITWISE_OR = 80, // "|" - BITWISE_AND = 81, // "&" - BITWISE_EXOR = 82, // "^" - ADD = 83, // "+" - SUB = 84, // "-" - MUL = 85, // "*" - DIV = 86, // "/" - MOD = 87, // "%" - FIELD = 88, // "field" - PATH = 89, // "path" - IDENTIFIER = 90, // "identifier" - STRING = 91, // "string literal" - ISTRING = 92, // "localized string" - COLOR = 93, // "color" - FLOAT = 94, // "float" - INTEGER = 95, // "integer" - ADD_ARRAY = 96, // ADD_ARRAY - THEN = 97, // THEN - TERN = 98, // TERN - NEG = 99, // NEG - ANIMREF = 100, // ANIMREF - PREINC = 101, // PREINC - PREDEC = 102, // PREDEC - POSTINC = 103, // POSTINC - POSTDEC = 104 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + IF = 23, // "if" + ELSE = 24, // "else" + DO = 25, // "do" + WHILE = 26, // "while" + FOR = 27, // "for" + FOREACH = 28, // "foreach" + IN = 29, // "in" + SWITCH = 30, // "switch" + CASE = 31, // "case" + DEFAULT = 32, // "default" + BREAK = 33, // "break" + CONTINUE = 34, // "continue" + RETURN = 35, // "return" + BREAKPOINT = 36, // "breakpoint" + PROFBEGIN = 37, // "prof_begin" + PROFEND = 38, // "prof_end" + THREAD = 39, // "thread" + CHILDTHREAD = 40, // "childthread" + THISTHREAD = 41, // "thisthread" + CALL = 42, // "call" + TRUE = 43, // "true" + FALSE = 44, // "false" + UNDEFINED = 45, // "undefined" + SIZE = 46, // ".size" + GAME = 47, // "game" + SELF = 48, // "self" + ANIM = 49, // "anim" + LEVEL = 50, // "level" + LPAREN = 51, // "(" + RPAREN = 52, // ")" + LBRACE = 53, // "{" + RBRACE = 54, // "}" + LBRACKET = 55, // "[" + RBRACKET = 56, // "]" + COMMA = 57, // "," + DOT = 58, // "." + DOUBLECOLON = 59, // "::" + COLON = 60, // ":" + SEMICOLON = 61, // ";" + QMARK = 62, // "?" + INCREMENT = 63, // "++" + DECREMENT = 64, // "--" + LSHIFT = 65, // "<<" + RSHIFT = 66, // ">>" + OR = 67, // "||" + AND = 68, // "&&" + EQUALITY = 69, // "==" + INEQUALITY = 70, // "!=" + LESS_EQUAL = 71, // "<=" + GREATER_EQUAL = 72, // ">=" + LESS = 73, // "<" + GREATER = 74, // ">" + NOT = 75, // "!" + COMPLEMENT = 76, // "~" + ASSIGN = 77, // "=" + ASSIGN_ADD = 78, // "+=" + ASSIGN_SUB = 79, // "-=" + ASSIGN_MUL = 80, // "*=" + ASSIGN_DIV = 81, // "/=" + ASSIGN_MOD = 82, // "%=" + ASSIGN_BW_OR = 83, // "|=" + ASSIGN_BW_AND = 84, // "&=" + ASSIGN_BW_EXOR = 85, // "^=" + ASSIGN_RSHIFT = 86, // ">>=" + ASSIGN_LSHIFT = 87, // "<<=" + BITWISE_OR = 88, // "|" + BITWISE_AND = 89, // "&" + BITWISE_EXOR = 90, // "^" + ADD = 91, // "+" + SUB = 92, // "-" + MUL = 93, // "*" + DIV = 94, // "/" + MOD = 95, // "%" + FIELD = 96, // "field" + PATH = 97, // "path" + IDENTIFIER = 98, // "identifier" + STRING = 99, // "string literal" + ISTRING = 100, // "localized string" + COLOR = 101, // "color" + FLOAT = 102, // "float" + INTEGER = 103, // "integer" + ADD_ARRAY = 104, // ADD_ARRAY + THEN = 105, // THEN + TERN = 106, // TERN + NEG = 107, // NEG + ANIMREF = 108, // ANIMREF + PREINC = 109, // PREINC + PREDEC = 110, // PREDEC + POSTINC = 111, // POSTINC + POSTDEC = 112 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -792,193 +800,201 @@ namespace xsk { namespace gsc { namespace iw5 { { enum symbol_kind_type { - YYNTOKENS = 105, ///< Number of tokens. + YYNTOKENS = 113, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_IF = 15, // "if" - S_ELSE = 16, // "else" - S_DO = 17, // "do" - S_WHILE = 18, // "while" - S_FOR = 19, // "for" - S_FOREACH = 20, // "foreach" - S_IN = 21, // "in" - S_SWITCH = 22, // "switch" - S_CASE = 23, // "case" - S_DEFAULT = 24, // "default" - S_BREAK = 25, // "break" - S_CONTINUE = 26, // "continue" - S_RETURN = 27, // "return" - S_BREAKPOINT = 28, // "breakpoint" - S_PROFBEGIN = 29, // "prof_begin" - S_PROFEND = 30, // "prof_end" - S_THREAD = 31, // "thread" - S_CHILDTHREAD = 32, // "childthread" - S_THISTHREAD = 33, // "thisthread" - S_CALL = 34, // "call" - S_TRUE = 35, // "true" - S_FALSE = 36, // "false" - S_UNDEFINED = 37, // "undefined" - S_SIZE = 38, // ".size" - S_GAME = 39, // "game" - S_SELF = 40, // "self" - S_ANIM = 41, // "anim" - S_LEVEL = 42, // "level" - S_LPAREN = 43, // "(" - S_RPAREN = 44, // ")" - S_LBRACE = 45, // "{" - S_RBRACE = 46, // "}" - S_LBRACKET = 47, // "[" - S_RBRACKET = 48, // "]" - S_COMMA = 49, // "," - S_DOT = 50, // "." - S_DOUBLECOLON = 51, // "::" - S_COLON = 52, // ":" - S_SEMICOLON = 53, // ";" - S_QMARK = 54, // "?" - S_INCREMENT = 55, // "++" - S_DECREMENT = 56, // "--" - S_LSHIFT = 57, // "<<" - S_RSHIFT = 58, // ">>" - S_OR = 59, // "||" - S_AND = 60, // "&&" - S_EQUALITY = 61, // "==" - S_INEQUALITY = 62, // "!=" - S_LESS_EQUAL = 63, // "<=" - S_GREATER_EQUAL = 64, // ">=" - S_LESS = 65, // "<" - S_GREATER = 66, // ">" - S_NOT = 67, // "!" - S_COMPLEMENT = 68, // "~" - S_ASSIGN = 69, // "=" - S_ASSIGN_ADD = 70, // "+=" - S_ASSIGN_SUB = 71, // "-=" - S_ASSIGN_MUL = 72, // "*=" - S_ASSIGN_DIV = 73, // "/=" - S_ASSIGN_MOD = 74, // "%=" - S_ASSIGN_BW_OR = 75, // "|=" - S_ASSIGN_BW_AND = 76, // "&=" - S_ASSIGN_BW_EXOR = 77, // "^=" - S_ASSIGN_RSHIFT = 78, // ">>=" - S_ASSIGN_LSHIFT = 79, // "<<=" - S_BITWISE_OR = 80, // "|" - S_BITWISE_AND = 81, // "&" - S_BITWISE_EXOR = 82, // "^" - S_ADD = 83, // "+" - S_SUB = 84, // "-" - S_MUL = 85, // "*" - S_DIV = 86, // "/" - S_MOD = 87, // "%" - S_FIELD = 88, // "field" - S_PATH = 89, // "path" - S_IDENTIFIER = 90, // "identifier" - S_STRING = 91, // "string literal" - S_ISTRING = 92, // "localized string" - S_COLOR = 93, // "color" - S_FLOAT = 94, // "float" - S_INTEGER = 95, // "integer" - S_ADD_ARRAY = 96, // ADD_ARRAY - S_THEN = 97, // THEN - S_TERN = 98, // TERN - S_NEG = 99, // NEG - S_ANIMREF = 100, // ANIMREF - S_PREINC = 101, // PREINC - S_PREDEC = 102, // PREDEC - S_POSTINC = 103, // POSTINC - S_POSTDEC = 104, // POSTDEC - S_YYACCEPT = 105, // $accept - S_root = 106, // root - S_program = 107, // program - S_inline = 108, // inline - S_include = 109, // include - S_declaration = 110, // declaration - S_decl_usingtree = 111, // decl_usingtree - S_decl_constant = 112, // decl_constant - S_decl_thread = 113, // decl_thread - S_stmt = 114, // stmt - S_stmt_dev = 115, // stmt_dev - S_stmt_block = 116, // stmt_block - S_stmt_list = 117, // stmt_list - S_stmt_expr = 118, // stmt_expr - S_stmt_call = 119, // stmt_call - S_stmt_assign = 120, // stmt_assign - S_stmt_endon = 121, // stmt_endon - S_stmt_notify = 122, // stmt_notify - S_stmt_wait = 123, // stmt_wait - S_stmt_waittill = 124, // stmt_waittill - S_stmt_waittillmatch = 125, // stmt_waittillmatch - S_stmt_waittillframeend = 126, // stmt_waittillframeend - S_stmt_if = 127, // stmt_if - S_stmt_ifelse = 128, // stmt_ifelse - S_stmt_while = 129, // stmt_while - S_stmt_dowhile = 130, // stmt_dowhile - S_stmt_for = 131, // stmt_for - S_stmt_foreach = 132, // stmt_foreach - S_stmt_switch = 133, // stmt_switch - S_stmt_case = 134, // stmt_case - S_stmt_default = 135, // stmt_default - S_stmt_break = 136, // stmt_break - S_stmt_continue = 137, // stmt_continue - S_stmt_return = 138, // stmt_return - S_stmt_breakpoint = 139, // stmt_breakpoint - S_stmt_prof_begin = 140, // stmt_prof_begin - S_stmt_prof_end = 141, // stmt_prof_end - S_expr = 142, // expr - S_expr_or_empty = 143, // expr_or_empty - S_expr_assign = 144, // expr_assign - S_expr_increment = 145, // expr_increment - S_expr_decrement = 146, // expr_decrement - S_expr_ternary = 147, // expr_ternary - S_expr_binary = 148, // expr_binary - S_expr_primitive = 149, // expr_primitive - S_expr_complement = 150, // expr_complement - S_expr_not = 151, // expr_not - S_expr_call = 152, // expr_call - S_expr_method = 153, // expr_method - S_expr_function = 154, // expr_function - S_expr_pointer = 155, // expr_pointer - S_expr_add_array = 156, // expr_add_array - S_expr_parameters = 157, // expr_parameters - S_expr_arguments = 158, // expr_arguments - S_expr_arguments_no_empty = 159, // expr_arguments_no_empty - S_expr_reference = 160, // expr_reference - S_expr_array = 161, // expr_array - S_expr_field = 162, // expr_field - S_expr_size = 163, // expr_size - S_expr_paren = 164, // expr_paren - S_expr_object = 165, // expr_object - S_expr_thisthread = 166, // expr_thisthread - S_expr_empty_array = 167, // expr_empty_array - S_expr_undefined = 168, // expr_undefined - S_expr_game = 169, // expr_game - S_expr_self = 170, // expr_self - S_expr_anim = 171, // expr_anim - S_expr_level = 172, // expr_level - S_expr_animation = 173, // expr_animation - S_expr_animtree = 174, // expr_animtree - S_expr_identifier = 175, // expr_identifier - S_expr_path = 176, // expr_path - S_expr_istring = 177, // expr_istring - S_expr_string = 178, // expr_string - S_expr_color = 179, // expr_color - S_expr_vector = 180, // expr_vector - S_expr_float = 181, // expr_float - S_expr_integer = 182, // expr_integer - S_expr_false = 183, // expr_false - S_expr_true = 184 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_IF = 23, // "if" + S_ELSE = 24, // "else" + S_DO = 25, // "do" + S_WHILE = 26, // "while" + S_FOR = 27, // "for" + S_FOREACH = 28, // "foreach" + S_IN = 29, // "in" + S_SWITCH = 30, // "switch" + S_CASE = 31, // "case" + S_DEFAULT = 32, // "default" + S_BREAK = 33, // "break" + S_CONTINUE = 34, // "continue" + S_RETURN = 35, // "return" + S_BREAKPOINT = 36, // "breakpoint" + S_PROFBEGIN = 37, // "prof_begin" + S_PROFEND = 38, // "prof_end" + S_THREAD = 39, // "thread" + S_CHILDTHREAD = 40, // "childthread" + S_THISTHREAD = 41, // "thisthread" + S_CALL = 42, // "call" + S_TRUE = 43, // "true" + S_FALSE = 44, // "false" + S_UNDEFINED = 45, // "undefined" + S_SIZE = 46, // ".size" + S_GAME = 47, // "game" + S_SELF = 48, // "self" + S_ANIM = 49, // "anim" + S_LEVEL = 50, // "level" + S_LPAREN = 51, // "(" + S_RPAREN = 52, // ")" + S_LBRACE = 53, // "{" + S_RBRACE = 54, // "}" + S_LBRACKET = 55, // "[" + S_RBRACKET = 56, // "]" + S_COMMA = 57, // "," + S_DOT = 58, // "." + S_DOUBLECOLON = 59, // "::" + S_COLON = 60, // ":" + S_SEMICOLON = 61, // ";" + S_QMARK = 62, // "?" + S_INCREMENT = 63, // "++" + S_DECREMENT = 64, // "--" + S_LSHIFT = 65, // "<<" + S_RSHIFT = 66, // ">>" + S_OR = 67, // "||" + S_AND = 68, // "&&" + S_EQUALITY = 69, // "==" + S_INEQUALITY = 70, // "!=" + S_LESS_EQUAL = 71, // "<=" + S_GREATER_EQUAL = 72, // ">=" + S_LESS = 73, // "<" + S_GREATER = 74, // ">" + S_NOT = 75, // "!" + S_COMPLEMENT = 76, // "~" + S_ASSIGN = 77, // "=" + S_ASSIGN_ADD = 78, // "+=" + S_ASSIGN_SUB = 79, // "-=" + S_ASSIGN_MUL = 80, // "*=" + S_ASSIGN_DIV = 81, // "/=" + S_ASSIGN_MOD = 82, // "%=" + S_ASSIGN_BW_OR = 83, // "|=" + S_ASSIGN_BW_AND = 84, // "&=" + S_ASSIGN_BW_EXOR = 85, // "^=" + S_ASSIGN_RSHIFT = 86, // ">>=" + S_ASSIGN_LSHIFT = 87, // "<<=" + S_BITWISE_OR = 88, // "|" + S_BITWISE_AND = 89, // "&" + S_BITWISE_EXOR = 90, // "^" + S_ADD = 91, // "+" + S_SUB = 92, // "-" + S_MUL = 93, // "*" + S_DIV = 94, // "/" + S_MOD = 95, // "%" + S_FIELD = 96, // "field" + S_PATH = 97, // "path" + S_IDENTIFIER = 98, // "identifier" + S_STRING = 99, // "string literal" + S_ISTRING = 100, // "localized string" + S_COLOR = 101, // "color" + S_FLOAT = 102, // "float" + S_INTEGER = 103, // "integer" + S_ADD_ARRAY = 104, // ADD_ARRAY + S_THEN = 105, // THEN + S_TERN = 106, // TERN + S_NEG = 107, // NEG + S_ANIMREF = 108, // ANIMREF + S_PREINC = 109, // PREINC + S_PREDEC = 110, // PREDEC + S_POSTINC = 111, // POSTINC + S_POSTDEC = 112, // POSTDEC + S_YYACCEPT = 113, // $accept + S_root = 114, // root + S_program = 115, // program + S_inline = 116, // inline + S_include = 117, // include + S_declaration = 118, // declaration + S_decl_usingtree = 119, // decl_usingtree + S_decl_constant = 120, // decl_constant + S_decl_thread = 121, // decl_thread + S_stmt = 122, // stmt + S_stmt_dev = 123, // stmt_dev + S_stmt_block = 124, // stmt_block + S_stmt_list = 125, // stmt_list + S_stmt_expr = 126, // stmt_expr + S_stmt_call = 127, // stmt_call + S_stmt_assign = 128, // stmt_assign + S_stmt_endon = 129, // stmt_endon + S_stmt_notify = 130, // stmt_notify + S_stmt_wait = 131, // stmt_wait + S_stmt_waittill = 132, // stmt_waittill + S_stmt_waittillmatch = 133, // stmt_waittillmatch + S_stmt_waittillframeend = 134, // stmt_waittillframeend + S_stmt_if = 135, // stmt_if + S_stmt_ifelse = 136, // stmt_ifelse + S_stmt_while = 137, // stmt_while + S_stmt_dowhile = 138, // stmt_dowhile + S_stmt_for = 139, // stmt_for + S_stmt_foreach = 140, // stmt_foreach + S_stmt_switch = 141, // stmt_switch + S_stmt_case = 142, // stmt_case + S_stmt_default = 143, // stmt_default + S_stmt_break = 144, // stmt_break + S_stmt_continue = 145, // stmt_continue + S_stmt_return = 146, // stmt_return + S_stmt_breakpoint = 147, // stmt_breakpoint + S_stmt_prof_begin = 148, // stmt_prof_begin + S_stmt_prof_end = 149, // stmt_prof_end + S_expr = 150, // expr + S_expr_or_empty = 151, // expr_or_empty + S_expr_assign = 152, // expr_assign + S_expr_increment = 153, // expr_increment + S_expr_decrement = 154, // expr_decrement + S_expr_ternary = 155, // expr_ternary + S_expr_binary = 156, // expr_binary + S_expr_primitive = 157, // expr_primitive + S_expr_complement = 158, // expr_complement + S_expr_not = 159, // expr_not + S_expr_call = 160, // expr_call + S_expr_method = 161, // expr_method + S_expr_function = 162, // expr_function + S_expr_pointer = 163, // expr_pointer + S_expr_add_array = 164, // expr_add_array + S_expr_parameters = 165, // expr_parameters + S_expr_arguments = 166, // expr_arguments + S_expr_arguments_no_empty = 167, // expr_arguments_no_empty + S_expr_reference = 168, // expr_reference + S_expr_array = 169, // expr_array + S_expr_field = 170, // expr_field + S_expr_size = 171, // expr_size + S_expr_paren = 172, // expr_paren + S_expr_object = 173, // expr_object + S_expr_thisthread = 174, // expr_thisthread + S_expr_empty_array = 175, // expr_empty_array + S_expr_undefined = 176, // expr_undefined + S_expr_game = 177, // expr_game + S_expr_self = 178, // expr_self + S_expr_anim = 179, // expr_anim + S_expr_level = 180, // expr_level + S_expr_animation = 181, // expr_animation + S_expr_animtree = 182, // expr_animtree + S_expr_identifier = 183, // expr_identifier + S_expr_path = 184, // expr_path + S_expr_istring = 185, // expr_istring + S_expr_string = 186, // expr_string + S_expr_color = 187, // expr_color + S_expr_vector = 188, // expr_vector + S_expr_float = 189, // expr_float + S_expr_integer = 190, // expr_integer + S_expr_false = 191, // expr_false + S_expr_true = 192 // expr_true }; }; @@ -2751,6 +2767,126 @@ switch (yykind) return symbol_type (token::IW5UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5311,7 +5447,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw5 -#line 5315 "parser.hpp" +#line 5451 "parser.hpp" diff --git a/src/iw6/xsk/lexer.cpp b/src/iw6/xsk/lexer.cpp index 9e8bd51e..0981964f 100644 --- a/src/iw6/xsk/lexer.cpp +++ b/src/iw6/xsk/lexer.cpp @@ -16,57 +16,6 @@ xsk::gsc::iw6::parser::symbol_type IW6lex(xsk::gsc::iw6::lexer& lexer) namespace xsk::gsc::iw6 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -129,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -140,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -151,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -164,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -172,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -193,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type if (header_top_ > 0) pop_header(); else - return iw6::parser::make_IW6EOF(loc_); + return parser::make_IW6EOF(loc_); } reader_.advance(); @@ -211,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return iw6::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return iw6::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return iw6::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -290,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type indev_ = false; reader_.advance(); - return iw6::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -303,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return iw6::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return iw6::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -323,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::iw6::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return iw6::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return iw6::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return iw6::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return iw6::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return iw6::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return iw6::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return iw6::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return iw6::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return iw6::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return iw6::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return iw6::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return iw6::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return iw6::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return iw6::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return iw6::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return iw6::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return iw6::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return iw6::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return iw6::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return iw6::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return iw6::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return iw6::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return iw6::parser::make_OR(loc_); + return parser::make_OR(loc_); - return iw6::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return iw6::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return iw6::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return iw6::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return iw6::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return iw6::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return iw6::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return iw6::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return iw6::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return iw6::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return iw6::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return iw6::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return iw6::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return iw6::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return iw6::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return iw6::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return iw6::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -496,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return iw6::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return iw6::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -533,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return iw6::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return iw6::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::IW6UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return iw6::parser::make_PATH(xsk::gsc::iw6::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw6::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return iw6::parser::make_IDENTIFIER(xsk::gsc::iw6::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw6::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -621,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return iw6::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return iw6::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -655,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return iw6::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -689,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return iw6::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -723,176 +683,59 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return iw6::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::iw6::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return iw6::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return iw6::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return iw6::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return iw6::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return iw6::parser::make_ENDON(loc_); - case keyword::KW_notify: - return iw6::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return iw6::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return iw6::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return iw6::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return iw6::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_if: - return iw6::parser::make_IF(loc_); - case keyword::KW_else: - return iw6::parser::make_ELSE(loc_); - case keyword::KW_do: - return iw6::parser::make_DO(loc_); - case keyword::KW_while: - return iw6::parser::make_WHILE(loc_); - case keyword::KW_for: - return iw6::parser::make_FOR(loc_); - case keyword::KW_foreach: - return iw6::parser::make_FOREACH(loc_); - case keyword::KW_in: - return iw6::parser::make_IN(loc_); - case keyword::KW_switch: - return iw6::parser::make_SWITCH(loc_); - case keyword::KW_case: - return iw6::parser::make_CASE(loc_); - case keyword::KW_default: - return iw6::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return iw6::parser::make_BREAK(loc_); - case keyword::KW_continue: - return iw6::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return iw6::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return iw6::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return iw6::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return iw6::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return iw6::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return iw6::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return iw6::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return iw6::parser::make_CALL(loc_); - case keyword::KW_true: - return iw6::parser::make_TRUE(loc_); - case keyword::KW_false: - return iw6::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return iw6::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return iw6::parser::make_SIZE(loc_); - case keyword::KW_game: - return iw6::parser::make_GAME(loc_); - case keyword::KW_self: - return iw6::parser::make_SELF(loc_); - case keyword::KW_anim: - return iw6::parser::make_ANIM(loc_); - case keyword::KW_level: - return iw6::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::iw6 diff --git a/src/iw6/xsk/lexer.hpp b/src/iw6/xsk/lexer.hpp index 8b7ad376..65a597b3 100644 --- a/src/iw6/xsk/lexer.hpp +++ b/src/iw6/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::iw6 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::iw6::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::iw6::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::iw6 diff --git a/src/iw6/xsk/parser.cpp b/src/iw6/xsk/parser.cpp index 53195716..c92ac0d8 100644 --- a/src/iw6/xsk/parser.cpp +++ b/src/iw6/xsk/parser.cpp @@ -1964,1285 +1964,1285 @@ namespace xsk { namespace gsc { namespace iw6 { switch (yyn) { case 2: // root: program -#line 244 "parser.ypp" +#line 252 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1970 "parser.cpp" break; case 3: // root: %empty -#line 245 "parser.ypp" +#line 253 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1976 "parser.cpp" break; case 4: // program: program inline -#line 250 "parser.ypp" +#line 258 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 1982 "parser.cpp" break; case 5: // program: program include -#line 252 "parser.ypp" +#line 260 "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 1988 "parser.cpp" break; case 6: // program: program declaration -#line 254 "parser.ypp" +#line 262 "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 1994 "parser.cpp" break; case 7: // program: inline -#line 256 "parser.ypp" +#line 264 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2000 "parser.cpp" break; case 8: // program: include -#line 258 "parser.ypp" +#line 266 "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 2006 "parser.cpp" break; case 9: // program: declaration -#line 260 "parser.ypp" +#line 268 "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 2012 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 264 "parser.ypp" +#line 272 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2018 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 269 "parser.ypp" +#line 277 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2024 "parser.cpp" break; case 12: // declaration: "/#" -#line 273 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2030 "parser.cpp" break; case 13: // declaration: "#/" -#line 274 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2036 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 275 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2042 "parser.cpp" break; case 15: // declaration: decl_constant -#line 276 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2048 "parser.cpp" break; case 16: // declaration: decl_thread -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2054 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 282 "parser.ypp" - { lexer.restrict_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 290 "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 2060 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 287 "parser.ypp" +#line 295 "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 2066 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 292 "parser.ypp" - { lexer.restrict_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 300 "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 2072 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 296 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2078 "parser.cpp" break; case 21: // stmt: stmt_block -#line 297 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2084 "parser.cpp" break; case 22: // stmt: stmt_call -#line 298 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2090 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 299 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2096 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2102 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2108 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2114 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2120 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2126 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2132 "parser.cpp" break; case 30: // stmt: stmt_if -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2138 "parser.cpp" break; case 31: // stmt: stmt_ifelse -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2144 "parser.cpp" break; case 32: // stmt: stmt_while -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2150 "parser.cpp" break; case 33: // stmt: stmt_dowhile -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2156 "parser.cpp" break; case 34: // stmt: stmt_for -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2162 "parser.cpp" break; case 35: // stmt: stmt_foreach -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2168 "parser.cpp" break; case 36: // stmt: stmt_switch -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2174 "parser.cpp" break; case 37: // stmt: stmt_case -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2180 "parser.cpp" break; case 38: // stmt: stmt_default -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2186 "parser.cpp" break; case 39: // stmt: stmt_break -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2192 "parser.cpp" break; case 40: // stmt: stmt_continue -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2198 "parser.cpp" break; case 41: // stmt: stmt_return -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2204 "parser.cpp" break; case 42: // stmt: stmt_breakpoint -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2210 "parser.cpp" break; case 43: // stmt: stmt_prof_begin -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2216 "parser.cpp" break; case 44: // stmt: stmt_prof_end -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2222 "parser.cpp" break; case 45: // stmt_dev: "/#" stmt_list "#/" -#line 324 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2228 "parser.cpp" break; case 46: // stmt_dev: "/#" "#/" -#line 325 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2234 "parser.cpp" break; case 47: // stmt_block: "{" stmt_list "}" -#line 329 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2240 "parser.cpp" break; case 48: // stmt_block: "{" "}" -#line 330 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2246 "parser.cpp" break; case 49: // stmt_list: stmt_list stmt -#line 335 "parser.ypp" +#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 > ())); } #line 2252 "parser.cpp" break; case 50: // stmt_list: stmt -#line 337 "parser.ypp" +#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 > ())); } #line 2258 "parser.cpp" break; case 51: // stmt_expr: expr_assign -#line 342 "parser.ypp" +#line 350 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2264 "parser.cpp" break; case 52: // stmt_expr: expr_increment -#line 344 "parser.ypp" +#line 352 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2270 "parser.cpp" break; case 53: // stmt_expr: expr_decrement -#line 346 "parser.ypp" +#line 354 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2276 "parser.cpp" break; case 54: // stmt_expr: %empty -#line 348 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2282 "parser.cpp" break; case 55: // stmt_call: expr_call ";" -#line 353 "parser.ypp" +#line 361 "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 2288 "parser.cpp" break; case 56: // stmt_call: expr_method ";" -#line 355 "parser.ypp" +#line 363 "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 2294 "parser.cpp" break; case 57: // stmt_assign: expr_assign ";" -#line 360 "parser.ypp" +#line 368 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2300 "parser.cpp" break; case 58: // stmt_assign: expr_increment ";" -#line 362 "parser.ypp" +#line 370 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2306 "parser.cpp" break; case 59: // stmt_assign: expr_decrement ";" -#line 364 "parser.ypp" +#line 372 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2312 "parser.cpp" break; case 60: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 369 "parser.ypp" +#line 377 "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 2318 "parser.cpp" break; case 61: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 374 "parser.ypp" +#line 382 "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 2324 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 376 "parser.ypp" +#line 384 "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 2330 "parser.cpp" break; case 63: // stmt_wait: "wait" expr ";" -#line 381 "parser.ypp" +#line 389 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2336 "parser.cpp" break; case 64: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 386 "parser.ypp" +#line 394 "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 2342 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 388 "parser.ypp" +#line 396 "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 2348 "parser.cpp" break; case 66: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 393 "parser.ypp" +#line 401 "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 2354 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 395 "parser.ypp" +#line 403 "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 2360 "parser.cpp" break; case 68: // stmt_waittillframeend: "waittillframeend" ";" -#line 400 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2366 "parser.cpp" break; case 69: // stmt_if: "if" "(" expr ")" stmt -#line 405 "parser.ypp" +#line 413 "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 2372 "parser.cpp" break; case 70: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 410 "parser.ypp" +#line 418 "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 2378 "parser.cpp" break; case 71: // stmt_while: "while" "(" expr ")" stmt -#line 415 "parser.ypp" +#line 423 "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 2384 "parser.cpp" break; case 72: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 420 "parser.ypp" +#line 428 "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 2390 "parser.cpp" break; case 73: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 425 "parser.ypp" +#line 433 "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 2396 "parser.cpp" break; case 74: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 430 "parser.ypp" +#line 438 "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 2402 "parser.cpp" break; case 75: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 432 "parser.ypp" +#line 440 "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 2408 "parser.cpp" break; case 76: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 437 "parser.ypp" +#line 445 "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 2414 "parser.cpp" break; case 77: // stmt_case: "case" expr_integer ":" -#line 442 "parser.ypp" +#line 450 "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 2420 "parser.cpp" break; case 78: // stmt_case: "case" expr_string ":" -#line 444 "parser.ypp" +#line 452 "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 2426 "parser.cpp" break; case 79: // stmt_default: "default" ":" -#line 449 "parser.ypp" +#line 457 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2432 "parser.cpp" break; case 80: // stmt_break: "break" ";" -#line 454 "parser.ypp" +#line 462 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2438 "parser.cpp" break; case 81: // stmt_continue: "continue" ";" -#line 459 "parser.ypp" +#line 467 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2444 "parser.cpp" break; case 82: // stmt_return: "return" expr ";" -#line 464 "parser.ypp" +#line 472 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2450 "parser.cpp" break; case 83: // stmt_return: "return" ";" -#line 466 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2456 "parser.cpp" break; case 84: // stmt_breakpoint: "breakpoint" ";" -#line 471 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2462 "parser.cpp" break; case 85: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 476 "parser.ypp" +#line 484 "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 2468 "parser.cpp" break; case 86: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 481 "parser.ypp" +#line 489 "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 2474 "parser.cpp" break; case 87: // expr: expr_ternary -#line 485 "parser.ypp" +#line 493 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2480 "parser.cpp" break; case 88: // expr: expr_binary -#line 486 "parser.ypp" +#line 494 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2486 "parser.cpp" break; case 89: // expr: expr_primitive -#line 487 "parser.ypp" +#line 495 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2492 "parser.cpp" break; case 90: // expr_or_empty: expr -#line 491 "parser.ypp" +#line 499 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2498 "parser.cpp" break; case 91: // expr_or_empty: %empty -#line 492 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2504 "parser.cpp" break; case 92: // expr_assign: expr_object "=" expr -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2510 "parser.cpp" break; case 93: // expr_assign: expr_object "|=" expr -#line 499 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2516 "parser.cpp" break; case 94: // expr_assign: expr_object "&=" expr -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2522 "parser.cpp" break; case 95: // expr_assign: expr_object "^=" expr -#line 503 "parser.ypp" +#line 511 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2528 "parser.cpp" break; case 96: // expr_assign: expr_object "<<=" expr -#line 505 "parser.ypp" +#line 513 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2534 "parser.cpp" break; case 97: // expr_assign: expr_object ">>=" expr -#line 507 "parser.ypp" +#line 515 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2540 "parser.cpp" break; case 98: // expr_assign: expr_object "+=" expr -#line 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2546 "parser.cpp" break; case 99: // expr_assign: expr_object "-=" expr -#line 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2552 "parser.cpp" break; case 100: // expr_assign: expr_object "*=" expr -#line 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2558 "parser.cpp" break; case 101: // expr_assign: expr_object "/=" expr -#line 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2564 "parser.cpp" break; case 102: // expr_assign: expr_object "%=" expr -#line 517 "parser.ypp" +#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 2570 "parser.cpp" break; case 103: // expr_increment: "++" expr_object -#line 522 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2576 "parser.cpp" break; case 104: // expr_increment: expr_object "++" -#line 524 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2582 "parser.cpp" break; case 105: // expr_decrement: "--" expr_object -#line 529 "parser.ypp" +#line 537 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2588 "parser.cpp" break; case 106: // expr_decrement: expr_object "--" -#line 531 "parser.ypp" +#line 539 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2594 "parser.cpp" break; case 107: // expr_ternary: expr "?" expr ":" expr -#line 536 "parser.ypp" +#line 544 "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 2600 "parser.cpp" break; case 108: // expr_binary: expr "||" expr -#line 541 "parser.ypp" +#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 2606 "parser.cpp" break; case 109: // expr_binary: expr "&&" expr -#line 543 "parser.ypp" +#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 2612 "parser.cpp" break; case 110: // expr_binary: expr "==" expr -#line 545 "parser.ypp" +#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 2618 "parser.cpp" break; case 111: // expr_binary: expr "!=" expr -#line 547 "parser.ypp" +#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 2624 "parser.cpp" break; case 112: // expr_binary: expr "<=" expr -#line 549 "parser.ypp" +#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 2630 "parser.cpp" break; case 113: // expr_binary: expr ">=" expr -#line 551 "parser.ypp" +#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 2636 "parser.cpp" break; case 114: // expr_binary: expr "<" expr -#line 553 "parser.ypp" +#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 2642 "parser.cpp" break; case 115: // expr_binary: expr ">" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2648 "parser.cpp" break; case 116: // expr_binary: expr "|" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2654 "parser.cpp" break; case 117: // expr_binary: expr "&" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2660 "parser.cpp" break; case 118: // expr_binary: expr "^" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2666 "parser.cpp" break; case 119: // expr_binary: expr "<<" expr -#line 563 "parser.ypp" +#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 2672 "parser.cpp" break; case 120: // expr_binary: expr ">>" expr -#line 565 "parser.ypp" +#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 2678 "parser.cpp" break; case 121: // expr_binary: expr "+" expr -#line 567 "parser.ypp" +#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 2684 "parser.cpp" break; case 122: // expr_binary: expr "-" expr -#line 569 "parser.ypp" +#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 2690 "parser.cpp" break; case 123: // expr_binary: expr "*" expr -#line 571 "parser.ypp" +#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 2696 "parser.cpp" break; case 124: // expr_binary: expr "/" expr -#line 573 "parser.ypp" +#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 2702 "parser.cpp" break; case 125: // expr_binary: expr "%" expr -#line 575 "parser.ypp" +#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 2708 "parser.cpp" break; case 126: // expr_primitive: expr_complement -#line 579 "parser.ypp" +#line 587 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2714 "parser.cpp" break; case 127: // expr_primitive: expr_not -#line 580 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2720 "parser.cpp" break; case 128: // expr_primitive: expr_call -#line 581 "parser.ypp" +#line 589 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2726 "parser.cpp" break; case 129: // expr_primitive: expr_method -#line 582 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2732 "parser.cpp" break; case 130: // expr_primitive: expr_add_array -#line 583 "parser.ypp" +#line 591 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2738 "parser.cpp" break; case 131: // expr_primitive: expr_reference -#line 584 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2744 "parser.cpp" break; case 132: // expr_primitive: expr_array -#line 585 "parser.ypp" +#line 593 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2750 "parser.cpp" break; case 133: // expr_primitive: expr_field -#line 586 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2756 "parser.cpp" break; case 134: // expr_primitive: expr_size -#line 587 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2762 "parser.cpp" break; case 135: // expr_primitive: expr_paren -#line 588 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2768 "parser.cpp" break; case 136: // expr_primitive: expr_thisthread -#line 589 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2774 "parser.cpp" break; case 137: // expr_primitive: expr_empty_array -#line 590 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2780 "parser.cpp" break; case 138: // expr_primitive: expr_undefined -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2786 "parser.cpp" break; case 139: // expr_primitive: expr_game -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2792 "parser.cpp" break; case 140: // expr_primitive: expr_self -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2798 "parser.cpp" break; case 141: // expr_primitive: expr_anim -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2804 "parser.cpp" break; case 142: // expr_primitive: expr_level -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2810 "parser.cpp" break; case 143: // expr_primitive: expr_animation -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2816 "parser.cpp" break; case 144: // expr_primitive: expr_animtree -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2822 "parser.cpp" break; case 145: // expr_primitive: expr_identifier -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2828 "parser.cpp" break; case 146: // expr_primitive: expr_istring -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2834 "parser.cpp" break; case 147: // expr_primitive: expr_string -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2840 "parser.cpp" break; case 148: // expr_primitive: expr_color -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2846 "parser.cpp" break; case 149: // expr_primitive: expr_vector -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2852 "parser.cpp" break; case 150: // expr_primitive: expr_float -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2858 "parser.cpp" break; case 151: // expr_primitive: expr_integer -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2864 "parser.cpp" break; case 152: // expr_primitive: expr_false -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2870 "parser.cpp" break; case 153: // expr_primitive: expr_true -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2876 "parser.cpp" break; case 154: // expr_complement: "~" expr -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2882 "parser.cpp" break; case 155: // expr_not: "!" expr -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2888 "parser.cpp" break; case 156: // expr_call: expr_function -#line 620 "parser.ypp" +#line 628 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2894 "parser.cpp" break; case 157: // expr_call: expr_pointer -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2900 "parser.cpp" break; case 158: // expr_method: expr_object expr_function -#line 624 "parser.ypp" +#line 632 "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 2906 "parser.cpp" break; case 159: // expr_method: expr_object expr_pointer -#line 625 "parser.ypp" +#line 633 "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 2912 "parser.cpp" break; case 160: // expr_function: expr_identifier "(" expr_arguments ")" -#line 630 "parser.ypp" +#line 638 "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 2918 "parser.cpp" break; case 161: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 632 "parser.ypp" +#line 640 "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 2924 "parser.cpp" break; case 162: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 634 "parser.ypp" +#line 642 "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 2930 "parser.cpp" break; case 163: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 636 "parser.ypp" +#line 644 "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 2936 "parser.cpp" break; case 164: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 638 "parser.ypp" +#line 646 "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 2942 "parser.cpp" break; case 165: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 648 "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 2948 "parser.cpp" break; case 166: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 645 "parser.ypp" +#line 653 "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 2954 "parser.cpp" break; case 167: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 647 "parser.ypp" +#line 655 "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 2960 "parser.cpp" break; case 168: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 649 "parser.ypp" +#line 657 "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 2966 "parser.cpp" break; case 169: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 651 "parser.ypp" +#line 659 "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 2972 "parser.cpp" break; case 170: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 656 "parser.ypp" +#line 664 "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 2978 "parser.cpp" break; case 171: // expr_parameters: expr_parameters "," expr_identifier -#line 661 "parser.ypp" +#line 669 "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 2984 "parser.cpp" break; case 172: // expr_parameters: expr_identifier -#line 663 "parser.ypp" +#line 671 "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 2990 "parser.cpp" break; case 173: // expr_parameters: %empty -#line 665 "parser.ypp" +#line 673 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 2996 "parser.cpp" break; case 174: // expr_arguments: expr_arguments_no_empty -#line 670 "parser.ypp" +#line 678 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3002 "parser.cpp" break; case 175: // expr_arguments: %empty -#line 672 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3008 "parser.cpp" break; case 176: // expr_arguments_no_empty: expr_arguments "," expr -#line 677 "parser.ypp" +#line 685 "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 3014 "parser.cpp" break; case 177: // expr_arguments_no_empty: expr -#line 679 "parser.ypp" +#line 687 "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 3020 "parser.cpp" break; case 178: // expr_reference: "::" expr_identifier -#line 684 "parser.ypp" +#line 692 "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 3026 "parser.cpp" break; case 179: // expr_reference: expr_path "::" expr_identifier -#line 686 "parser.ypp" +#line 694 "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 3032 "parser.cpp" break; case 180: // expr_array: expr_object "[" expr "]" -#line 691 "parser.ypp" +#line 699 "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 3038 "parser.cpp" break; case 181: // expr_field: expr_object "." expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3044 "parser.cpp" break; case 182: // expr_field: expr_object "field" -#line 698 "parser.ypp" +#line 706 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3050 "parser.cpp" break; case 183: // expr_size: expr_object ".size" -#line 703 "parser.ypp" +#line 711 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3056 "parser.cpp" break; case 184: // expr_paren: "(" expr ")" -#line 708 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3062 "parser.cpp" break; case 185: // expr_object: expr_call -#line 712 "parser.ypp" +#line 720 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3068 "parser.cpp" break; case 186: // expr_object: expr_method -#line 713 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3074 "parser.cpp" break; case 187: // expr_object: expr_array -#line 714 "parser.ypp" +#line 722 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3080 "parser.cpp" break; case 188: // expr_object: expr_field -#line 715 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3086 "parser.cpp" break; case 189: // expr_object: expr_game -#line 716 "parser.ypp" +#line 724 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3092 "parser.cpp" break; case 190: // expr_object: expr_self -#line 717 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3098 "parser.cpp" break; case 191: // expr_object: expr_anim -#line 718 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3104 "parser.cpp" break; case 192: // expr_object: expr_level -#line 719 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3110 "parser.cpp" break; case 193: // expr_object: expr_identifier -#line 720 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3116 "parser.cpp" break; case 194: // expr_thisthread: "thisthread" -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3122 "parser.cpp" break; case 195: // expr_empty_array: "[" "]" -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3128 "parser.cpp" break; case 196: // expr_undefined: "undefined" -#line 735 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3134 "parser.cpp" break; case 197: // expr_game: "game" -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3140 "parser.cpp" break; case 198: // expr_self: "self" -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3146 "parser.cpp" break; case 199: // expr_anim: "anim" -#line 750 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3152 "parser.cpp" break; case 200: // expr_level: "level" -#line 755 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3158 "parser.cpp" break; case 201: // expr_animation: "%" "identifier" -#line 760 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3164 "parser.cpp" break; case 202: // expr_animtree: "#animtree" -#line 765 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3170 "parser.cpp" break; case 203: // expr_identifier: "identifier" -#line 770 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3176 "parser.cpp" break; case 204: // expr_path: "path" -#line 775 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3182 "parser.cpp" break; case 205: // expr_path: expr_identifier -#line 777 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3188 "parser.cpp" break; case 206: // expr_istring: "localized string" -#line 782 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3194 "parser.cpp" break; case 207: // expr_string: "string literal" -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3200 "parser.cpp" break; case 208: // expr_color: "color" -#line 792 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3206 "parser.cpp" break; case 209: // expr_vector: "(" expr "," expr "," expr ")" -#line 797 "parser.ypp" +#line 805 "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 3212 "parser.cpp" break; case 210: // expr_float: "-" "float" -#line 802 "parser.ypp" +#line 810 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3218 "parser.cpp" break; case 211: // expr_float: "float" -#line 804 "parser.ypp" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3224 "parser.cpp" break; case 212: // expr_integer: "-" "integer" -#line 809 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3230 "parser.cpp" break; case 213: // expr_integer: "integer" -#line 811 "parser.ypp" +#line 819 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3236 "parser.cpp" break; case 214: // expr_false: "false" -#line 816 "parser.ypp" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3242 "parser.cpp" break; case 215: // expr_true: "true" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3248 "parser.cpp" break; @@ -3432,7 +3432,8 @@ namespace xsk { namespace gsc { namespace iw6 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", "default", "break", @@ -3735,49 +3736,49 @@ namespace xsk { namespace gsc { namespace iw6 { const short parser::yypact_[] = { - 16, -260, -260, -74, -74, -14, -260, 26, 16, -260, - -260, -260, -260, -260, -260, -33, -260, -260, -25, 4, - -43, -260, -260, -260, -260, -24, 1124, -260, -260, -260, - 21, -17, -260, -260, -40, -5, -260, 22, -260, -260, - -260, -260, -260, -260, -260, 1124, 994, -24, 1124, 1124, - -35, 11, -260, -260, -260, -260, 2038, -260, -260, -260, - -260, -260, 473, 541, -260, -260, -260, -260, 575, 624, - -260, -260, 653, -260, -260, -260, 677, 685, 1032, 1097, - -260, -260, 36, 24, -260, -260, -260, -260, -260, -260, - -260, -260, 23, 57, -24, 68, 69, 70, 84, 99, - 87, 93, 1324, 994, -260, 2121, 102, 107, -260, -260, - -260, -260, -260, -260, -260, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 1124, 1124, -260, 1189, -24, -260, -260, -260, - 114, 108, 1124, -24, -260, 783, -260, -260, 1124, 1124, - -24, 1124, 1124, -24, 1124, -260, 1124, 1768, 1124, -260, - 2003, 116, 116, 2152, 1180, 158, 158, 77, 77, 77, - 77, 2162, 989, 1115, 43, 43, -260, -260, -260, 1808, - -260, -24, 7, -260, 115, 829, 1124, 113, 126, 967, - 128, 130, 132, 133, -13, 125, 131, 134, 1059, 135, - 140, 149, -260, 148, 392, 392, -260, -260, -260, 875, + 8, -260, -260, -69, -69, -3, -260, 26, 8, -260, + -260, -260, -260, -260, -260, -41, -260, -260, -4, -2, + -39, -260, -260, -260, -260, -33, 1116, -260, -260, -260, + 14, -25, -260, -260, -48, -13, -260, 20, -260, -260, + -260, -260, -260, -260, -260, 1116, 986, -33, 1116, 1116, + -87, -29, -260, -260, -260, -260, 2030, -260, -260, -260, + -260, -260, 465, 533, -260, -260, -260, -260, 567, 616, + -260, -260, 645, -260, -260, -260, 669, 677, 1024, 1089, + -260, -260, 28, 17, -260, -260, -260, -260, -260, -260, + -260, -260, 51, 48, -33, 60, 70, 72, 83, 91, + 81, 96, 1316, 986, -260, 2113, 45, 99, -260, -260, + -260, -260, -260, -260, -260, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, -260, 1181, -33, -260, -260, -260, + 106, 100, 1116, -33, -260, 775, -260, -260, 1116, 1116, + -33, 1116, 1116, -33, 1116, -260, 1116, 1760, 1116, -260, + 1995, 108, 108, 2144, 1172, 150, 150, 69, 69, 69, + 69, 2154, 981, 1107, 35, 35, -260, -260, -260, 1800, + -260, -33, -1, -260, 107, 821, 1116, 105, 118, 959, + 120, 122, 124, 125, -21, 117, 123, 126, 1051, 127, + 132, 141, -260, 140, 384, 384, -260, -260, -260, 867, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, - -260, -260, -260, 144, 153, 154, 155, 157, -260, -260, - 1238, -260, -260, -260, -260, 2, 1848, 47, 169, 1888, - 48, 174, 1928, 1967, 178, 2121, 1124, -260, 115, -260, - 1124, -260, 921, 2073, -260, 1124, 160, 1124, -1, -24, - 1124, 141, 177, 186, -260, -260, -260, -260, 2108, -260, - 1124, 1124, 1124, -260, -260, 30, 30, -260, -260, -260, - -260, -260, -260, -260, 194, 196, 203, 204, -260, -260, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 200, -260, 1124, 202, -260, 1124, 205, 1124, 208, - 2121, 49, -260, -260, 1490, 209, 1524, 201, -260, -260, - -260, 1287, 3, 1558, -260, -260, -260, 51, 55, 1768, - 1124, 1124, 1124, 1124, 2121, 2121, 2121, 2121, 2121, 2121, - 2121, 2121, 2121, 2121, 2121, 214, 61, 215, 65, 216, - 1592, 1124, -260, 967, 1124, 967, 1124, 1124, -24, 57, - 207, 210, 1626, 1368, 1412, 1456, 1124, -260, 1124, -260, - 1124, -260, 67, 245, 1660, -260, 2121, 211, 1694, 246, - -260, -260, -260, 213, 217, 1124, 219, 1124, 221, 1124, - 95, 97, 121, -260, 967, 222, -1, 967, 1124, -260, - -260, 232, -260, 235, -260, 236, -260, -260, -260, -260, - -260, 238, -260, 1728, 231, 234, 237, 967, 967, -260, + -260, -260, -260, 136, 145, 146, 147, 149, -260, -260, + 1230, -260, -260, -260, -260, -6, 1840, 39, 161, 1880, + 40, 166, 1920, 1959, 170, 2113, 1116, -260, 107, -260, + 1116, -260, 913, 2065, -260, 1116, 152, 1116, -9, -33, + 1116, 133, 169, 177, -260, -260, -260, -260, 2100, -260, + 1116, 1116, 1116, -260, -260, 22, 22, -260, -260, -260, + -260, -260, -260, -260, 187, 188, 195, 196, -260, -260, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 194, -260, 1116, 197, -260, 1116, 198, 1116, 200, + 2113, 41, -260, -260, 1482, 201, 1516, 199, -260, -260, + -260, 1279, -5, 1550, -260, -260, -260, 43, 47, 1760, + 1116, 1116, 1116, 1116, 2113, 2113, 2113, 2113, 2113, 2113, + 2113, 2113, 2113, 2113, 2113, 206, 53, 207, 57, 208, + 1584, 1116, -260, 959, 1116, 959, 1116, 1116, -33, 48, + 202, 203, 1618, 1360, 1404, 1448, 1116, -260, 1116, -260, + 1116, -260, 59, 224, 1652, -260, 2113, 205, 1686, 232, + -260, -260, -260, 209, 211, 1116, 213, 1116, 214, 1116, + 87, 89, 113, -260, 959, 215, -9, 959, 1116, -260, + -260, 227, -260, 228, -260, 230, -260, -260, -260, -260, + -260, 235, -260, 1720, 223, 229, 231, 959, 959, -260, -260, -260, -260, -260 }; @@ -3833,14 +3834,14 @@ namespace xsk { namespace gsc { namespace iw6 { const short parser::yypgoto_[] = { - -260, -260, -260, 281, 284, 288, -260, -260, -260, -172, + -260, -260, -260, 259, 281, 288, -260, -260, -260, -172, -260, -91, 112, -108, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 185, -260, -259, -257, -250, -260, -260, -260, -260, -260, -82, -72, -66, -58, -260, -260, 321, -45, -260, -37, 192, -260, -260, 240, -260, -260, -260, 253, 327, 355, 365, -260, -260, - 0, 9, -260, -15, -260, -260, -260, 105, -260, -260 + 0, 9, -260, -15, -260, -260, -260, 129, -260, -260 }; const short @@ -3860,21 +3861,21 @@ namespace xsk { namespace gsc { namespace iw6 { parser::yytable_[] = { 15, 107, 146, 17, 17, 30, 138, 95, 15, 328, - 25, 329, 18, 19, 139, 16, 6, 266, 330, 1, - 2, 3, 4, 5, 367, 32, 21, 93, 27, 20, + 25, 329, 18, 19, 139, 111, 112, 266, 330, 1, + 2, 3, 4, 5, 367, 32, 21, 93, 16, 6, 34, 35, 94, 37, 96, 99, 26, 288, 41, 42, - 43, 44, 98, 97, 100, 142, 203, 108, 29, 16, - 6, 259, 368, -205, 204, 205, 158, 28, 107, 111, - 112, 34, 35, 236, 37, 92, 6, -193, -193, 101, - -193, 271, 140, 237, -193, 143, 144, 135, 29, 142, + 43, 44, 98, 97, 100, 142, 203, 108, 20, 16, + 6, 259, 368, -205, 204, 205, 158, 27, 107, 28, + 29, 34, 35, 236, 37, 6, 92, -193, -193, 113, + -193, 271, 140, 237, -193, 101, 143, 135, 29, 142, 136, 141, 55, -193, 16, 6, -193, -205, 16, 6, 288, 312, 315, 362, 147, 370, 158, 158, 158, 371, - 158, 113, 145, 236, 158, 377, 6, 236, 238, 379, - 158, 403, 149, 237, 158, 148, 158, 237, 137, 16, - 6, 150, 283, 283, -193, -193, -193, 236, 131, 132, - 133, 151, 284, 284, 116, 117, 180, 237, 153, 416, - 154, 417, 152, 184, 158, 245, 158, 328, 238, 329, - 248, 158, 238, 251, 141, 159, 330, 142, 260, 181, + 158, 145, 158, 236, 158, 377, 6, 236, 238, 379, + 158, 403, 144, 237, 158, 148, 158, 237, 137, 16, + 6, 149, 283, 283, -193, -193, -193, 236, 131, 132, + 133, 150, 284, 284, 116, 117, 180, 237, 151, 416, + 153, 417, 152, 184, 158, 245, 158, 328, 238, 329, + 248, 154, 238, 251, 141, 159, 330, 142, 260, 181, 129, 130, 131, 132, 133, 418, 264, 238, 238, 265, 158, 267, 238, 268, 138, 269, 270, 274, 325, 272, 236, 258, 139, 280, 275, 245, 283, 276, 279, 245, @@ -3882,16 +3883,16 @@ namespace xsk { namespace gsc { namespace iw6 { 130, 131, 132, 133, 245, 245, 290, 291, 292, 245, 293, 56, 313, 141, 141, 116, 117, 316, 141, 138, 138, 122, 123, 124, 125, 238, 319, 139, 139, 334, - 102, 238, 419, 109, 110, 422, 112, 340, 335, 341, - 140, 129, 130, 131, 132, 133, 342, 343, 355, 141, - 357, 361, 364, 359, 366, 432, 433, 376, 378, 380, - 391, 404, 245, 392, 406, 138, 409, 408, 245, 332, - 410, 141, 412, 139, 414, 420, 424, 141, 390, 425, - 426, 236, 427, 236, 429, 140, 140, 430, 157, 22, - 431, 237, 23, 237, 141, 141, 24, 262, 421, 273, + 102, 238, 419, 109, 110, 422, 112, 335, 340, 341, + 140, 129, 130, 131, 132, 133, 342, 343, 404, 141, + 355, 361, 364, 357, 359, 432, 433, 376, 378, 380, + 366, 408, 245, 391, 392, 138, 406, 22, 245, 332, + 409, 141, 410, 139, 412, 414, 420, 141, 390, 424, + 425, 236, 426, 236, 429, 140, 140, 427, 157, 23, + 430, 237, 431, 237, 141, 141, 24, 262, 421, 0, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, - 179, 0, 236, 0, 283, 236, 238, 0, 238, 0, + 179, 0, 236, 273, 283, 236, 238, 0, 238, 0, 0, 140, 237, 246, 284, 237, 249, 239, 0, 252, 141, 253, 0, 255, 0, 236, 236, 0, 0, 0, 411, 0, 413, 0, 415, 237, 237, 0, 0, 0, @@ -4089,39 +4090,39 @@ namespace xsk { namespace gsc { namespace iw6 { const short parser::yycheck_[] = { - 0, 46, 93, 3, 4, 20, 72, 47, 8, 268, - 43, 268, 3, 4, 72, 89, 90, 189, 268, 3, - 4, 5, 6, 7, 21, 25, 0, 44, 53, 43, - 31, 32, 49, 34, 34, 35, 69, 209, 39, 40, - 41, 42, 47, 34, 35, 43, 47, 47, 91, 89, - 90, 44, 49, 51, 55, 56, 49, 53, 103, 94, - 95, 31, 32, 145, 34, 44, 90, 31, 32, 47, - 34, 84, 72, 145, 38, 51, 53, 47, 91, 43, - 50, 72, 95, 47, 89, 90, 50, 51, 89, 90, - 262, 44, 44, 44, 94, 44, 49, 49, 49, 44, - 49, 90, 45, 185, 49, 44, 90, 189, 145, 44, - 49, 44, 43, 185, 49, 47, 49, 189, 88, 89, - 90, 51, 204, 205, 88, 89, 90, 209, 85, 86, - 87, 47, 204, 205, 57, 58, 136, 209, 51, 44, - 47, 44, 43, 143, 49, 145, 49, 406, 185, 406, - 150, 49, 189, 153, 145, 48, 406, 43, 43, 51, - 83, 84, 85, 86, 87, 44, 53, 204, 205, 43, - 49, 43, 209, 43, 240, 43, 43, 52, 18, 194, - 262, 181, 240, 43, 53, 185, 268, 53, 53, 189, - 262, 363, 43, 365, 185, 47, 268, 53, 189, 83, - 84, 85, 86, 87, 204, 205, 53, 53, 53, 209, - 53, 26, 43, 204, 205, 57, 58, 43, 209, 285, - 286, 63, 64, 65, 66, 262, 48, 285, 286, 52, - 45, 268, 404, 48, 49, 407, 95, 43, 52, 43, - 240, 83, 84, 85, 86, 87, 43, 43, 48, 240, - 48, 43, 43, 48, 53, 427, 428, 43, 43, 43, - 53, 16, 262, 53, 53, 331, 53, 21, 268, 269, - 53, 262, 53, 331, 53, 53, 44, 268, 369, 44, - 44, 363, 44, 365, 53, 285, 286, 53, 103, 8, - 53, 363, 8, 365, 285, 286, 8, 185, 406, 194, + 0, 46, 93, 3, 4, 20, 72, 55, 8, 268, + 51, 268, 3, 4, 72, 102, 103, 189, 268, 11, + 12, 13, 14, 15, 29, 25, 0, 52, 97, 98, + 39, 40, 57, 42, 34, 35, 77, 209, 47, 48, + 49, 50, 55, 34, 35, 51, 55, 47, 51, 97, + 98, 52, 57, 59, 63, 64, 57, 61, 103, 61, + 99, 39, 40, 145, 42, 98, 52, 39, 40, 98, + 42, 92, 72, 145, 46, 55, 59, 55, 99, 51, + 58, 72, 103, 55, 97, 98, 58, 59, 97, 98, + 262, 52, 52, 52, 94, 52, 57, 57, 57, 52, + 57, 53, 57, 185, 57, 52, 98, 189, 145, 52, + 57, 52, 61, 185, 57, 55, 57, 189, 96, 97, + 98, 51, 204, 205, 96, 97, 98, 209, 93, 94, + 95, 59, 204, 205, 65, 66, 136, 209, 55, 52, + 59, 52, 51, 143, 57, 145, 57, 406, 185, 406, + 150, 55, 189, 153, 145, 56, 406, 51, 51, 59, + 91, 92, 93, 94, 95, 52, 61, 204, 205, 51, + 57, 51, 209, 51, 240, 51, 51, 60, 26, 194, + 262, 181, 240, 51, 61, 185, 268, 61, 61, 189, + 262, 363, 51, 365, 185, 55, 268, 61, 189, 91, + 92, 93, 94, 95, 204, 205, 61, 61, 61, 209, + 61, 26, 51, 204, 205, 65, 66, 51, 209, 285, + 286, 71, 72, 73, 74, 262, 56, 285, 286, 60, + 45, 268, 404, 48, 49, 407, 103, 60, 51, 51, + 240, 91, 92, 93, 94, 95, 51, 51, 24, 240, + 56, 51, 51, 56, 56, 427, 428, 51, 51, 51, + 61, 29, 262, 61, 61, 331, 61, 8, 268, 269, + 61, 262, 61, 331, 61, 61, 61, 268, 369, 52, + 52, 363, 52, 365, 61, 285, 286, 52, 103, 8, + 61, 363, 61, 365, 285, 286, 8, 185, 406, -1, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, - 135, -1, 404, -1, 406, 407, 363, -1, 365, -1, + 135, -1, 404, 194, 406, 407, 363, -1, 365, -1, -1, 331, 404, 148, 406, 407, 151, 145, -1, 154, 331, 156, -1, 158, -1, 427, 428, -1, -1, -1, 395, -1, 397, -1, 399, 427, 428, -1, -1, -1, @@ -4131,265 +4132,265 @@ namespace xsk { namespace gsc { namespace iw6 { 427, 428, -1, -1, -1, -1, 204, 205, 145, -1, -1, 209, -1, -1, 404, -1, 406, 407, -1, -1, -1, -1, -1, 404, -1, 406, 407, -1, -1, -1, - -1, -1, -1, 31, 32, 185, 34, 427, 428, 189, - -1, 39, 40, 41, 42, -1, 427, 428, 185, 47, + -1, -1, -1, 39, 40, 185, 42, 427, 428, 189, + -1, 47, 48, 49, 50, -1, 427, 428, 185, 55, -1, 256, 189, -1, 204, 205, -1, -1, -1, 209, 265, -1, 267, -1, 262, 270, -1, 204, 205, -1, 268, -1, 209, 142, -1, -1, -1, 282, -1, -1, 149, -1, 145, 152, -1, -1, -1, -1, -1, -1, - -1, 89, 90, -1, -1, 300, 301, 302, 303, 304, + -1, 97, 98, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, -1, -1, -1, -1, - 145, -1, 262, 318, 31, 32, -1, 34, 268, -1, - 145, 38, 185, -1, -1, 262, 189, -1, -1, -1, - 47, 268, -1, 50, -1, 340, 341, 342, 343, -1, + 145, -1, 262, 318, 39, 40, -1, 42, 268, -1, + 145, 46, 185, -1, -1, 262, 189, -1, -1, -1, + 55, 268, -1, 58, -1, 340, 341, 342, 343, -1, -1, 204, 205, -1, -1, -1, 209, -1, -1, -1, 185, -1, -1, -1, 189, -1, -1, -1, -1, 364, 185, 366, 367, -1, 189, 363, -1, 365, -1, 204, - 205, 88, 89, 90, 209, -1, -1, -1, -1, 204, - 205, -1, 31, 32, 209, 34, -1, -1, -1, 38, - -1, 260, -1, -1, -1, -1, -1, -1, 47, 262, - -1, 50, -1, 408, -1, 268, 404, -1, 406, 407, - -1, 280, 281, 363, -1, 365, 31, 32, -1, 34, - -1, -1, -1, 38, -1, -1, 363, 262, 365, 427, - 428, -1, 47, 268, -1, 50, -1, 262, -1, 88, - 89, 90, -1, 268, 313, -1, -1, 316, -1, -1, + 205, 96, 97, 98, 209, -1, -1, -1, -1, 204, + 205, -1, 39, 40, 209, 42, -1, -1, -1, 46, + -1, 260, -1, -1, -1, -1, -1, -1, 55, 262, + -1, 58, -1, 408, -1, 268, 404, -1, 406, 407, + -1, 280, 281, 363, -1, 365, 39, 40, -1, 42, + -1, -1, -1, 46, -1, -1, 363, 262, 365, 427, + 428, -1, 55, 268, -1, 58, -1, 262, -1, 96, + 97, 98, -1, 268, 313, -1, -1, 316, -1, -1, -1, -1, -1, -1, 404, -1, 406, 407, -1, -1, - -1, -1, -1, -1, -1, 31, 32, 404, 34, 406, - 407, -1, 38, 88, 89, 90, -1, 427, 428, -1, - -1, 47, -1, -1, 50, -1, -1, -1, -1, -1, - 427, 428, 361, -1, 31, 32, -1, 34, -1, -1, - 363, 38, 365, -1, -1, -1, -1, 376, -1, 378, - 47, 380, -1, 50, -1, -1, -1, -1, 31, 32, - -1, 34, 88, 89, 90, 38, 31, 32, 363, 34, - 365, -1, -1, 38, 47, -1, -1, 50, 363, -1, - 365, 404, 47, 406, 407, 50, -1, -1, -1, -1, - -1, 88, 89, 90, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 39, 40, 404, 42, 406, + 407, -1, 46, 96, 97, 98, -1, 427, 428, -1, + -1, 55, -1, -1, 58, -1, -1, -1, -1, -1, + 427, 428, 361, -1, 39, 40, -1, 42, -1, -1, + 363, 46, 365, -1, -1, -1, -1, 376, -1, 378, + 55, 380, -1, 58, -1, -1, -1, -1, 39, 40, + -1, 42, 96, 97, 98, 46, 39, 40, 363, 42, + 365, -1, -1, 46, 55, -1, -1, 58, 363, -1, + 365, 404, 55, 406, 407, 58, -1, -1, -1, -1, + -1, 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, 428, -1, -1, -1, 404, - -1, 406, 407, -1, -1, 88, 89, 90, -1, 404, - -1, 406, 407, 88, 89, 90, -1, -1, -1, -1, - -1, -1, 427, 428, -1, -1, 3, -1, -1, -1, - -1, -1, 427, 428, 11, -1, -1, 14, 15, -1, - 17, 18, 19, 20, -1, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, -1, 34, -1, -1, - -1, -1, 39, 40, 41, 42, -1, -1, 45, 46, - 47, -1, 3, 4, -1, -1, -1, -1, 55, 56, - 11, -1, -1, 14, 15, -1, 17, 18, 19, 20, - -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, -1, 34, -1, -1, -1, -1, 39, 40, - 41, 42, 89, 90, 45, -1, 47, -1, 3, -1, - -1, -1, -1, -1, 55, 56, 11, -1, -1, 14, - 15, -1, 17, 18, 19, 20, -1, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, - -1, -1, -1, -1, 39, 40, 41, 42, 89, 90, - 45, 46, 47, -1, 3, 4, -1, -1, -1, -1, - 55, 56, 11, -1, -1, 14, 15, -1, 17, 18, - 19, 20, -1, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, -1, 34, -1, -1, -1, -1, - 39, 40, 41, 42, 89, 90, 45, -1, 47, -1, - 3, -1, -1, -1, -1, -1, 55, 56, 11, -1, - -1, 14, 15, -1, 17, 18, 19, 20, -1, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - -1, 34, 8, -1, -1, -1, 39, 40, 41, 42, - 89, 90, 45, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, 56, -1, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, - -1, 47, 48, -1, -1, 51, 57, 58, -1, -1, - 61, 62, 63, 64, 65, 66, 89, 90, -1, -1, - -1, 67, 68, 31, 32, -1, 34, 8, -1, -1, - 38, -1, 83, 84, 85, 86, 87, -1, 84, 47, - -1, 87, 50, 89, 90, 91, 92, 93, 94, 95, - 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, - 41, 42, 43, -1, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, -1, -1, -1, 67, 68, 31, 32, - -1, 34, 8, -1, -1, 38, -1, -1, -1, -1, - -1, -1, -1, 84, 47, -1, 87, 50, 89, 90, - 91, 92, 93, 94, 95, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, - -1, 47, 57, 58, -1, 51, 61, 62, 63, 64, - 65, 66, -1, -1, -1, 88, 89, 90, -1, -1, - -1, 67, 68, -1, -1, -1, 81, 8, 83, 84, - 85, 86, 87, -1, -1, -1, -1, -1, 84, -1, - -1, 87, -1, 89, 90, 91, 92, 93, 94, 95, - 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, - 41, 42, 43, -1, -1, -1, 47, 57, 58, -1, - 51, 61, 62, 63, 64, 65, 66, 9, 10, -1, - 12, 13, -1, -1, -1, -1, 67, 68, -1, -1, - 80, 81, 82, 83, 84, 85, 86, 87, -1, 31, - 32, -1, 34, 84, -1, -1, 87, -1, 89, 90, - 91, 92, 93, 94, 95, 47, -1, -1, 50, -1, - -1, -1, -1, 55, 56, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 31, 32, - -1, 34, -1, -1, -1, -1, 88, 89, 90, -1, - -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, - -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, -1, 44, -1, - -1, -1, -1, 49, -1, 88, 89, 90, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 44, -1, -1, -1, -1, 49, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 44, -1, -1, -1, - -1, 49, -1, -1, -1, -1, 54, -1, -1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, + -1, 406, 407, -1, -1, 96, 97, 98, -1, 404, + -1, 406, 407, 96, 97, 98, -1, -1, -1, -1, + -1, -1, 427, 428, -1, -1, 11, -1, -1, -1, + -1, -1, 427, 428, 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, -1, 47, 48, 49, 50, -1, -1, 53, 54, + 55, -1, 11, 12, -1, -1, -1, -1, 63, 64, + 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, -1, 47, 48, + 49, 50, 97, 98, 53, -1, 55, -1, 11, -1, + -1, -1, -1, -1, 63, 64, 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, -1, 47, 48, 49, 50, 97, 98, + 53, 54, 55, -1, 11, 12, -1, -1, -1, -1, + 63, 64, 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, -1, + 47, 48, 49, 50, 97, 98, 53, -1, 55, -1, + 11, -1, -1, -1, -1, -1, 63, 64, 19, -1, + -1, 22, 23, -1, 25, 26, 27, 28, -1, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + -1, 42, 16, -1, -1, -1, 47, 48, 49, 50, + 97, 98, 53, -1, 55, -1, -1, -1, -1, -1, + -1, -1, 63, 64, -1, 39, 40, 41, 42, 43, + 44, 45, -1, 47, 48, 49, 50, 51, -1, -1, + -1, 55, 56, -1, -1, 59, 65, 66, -1, -1, + 69, 70, 71, 72, 73, 74, 97, 98, -1, -1, + -1, 75, 76, 39, 40, -1, 42, 16, -1, -1, + 46, -1, 91, 92, 93, 94, 95, -1, 92, 55, + -1, 95, 58, 97, 98, 99, 100, 101, 102, 103, + 39, 40, 41, 42, 43, 44, 45, -1, 47, 48, + 49, 50, 51, -1, -1, -1, 55, -1, -1, -1, + 59, -1, 61, -1, -1, -1, -1, -1, -1, -1, + 96, 97, 98, -1, -1, -1, 75, 76, 39, 40, + -1, 42, 16, -1, -1, 46, -1, -1, -1, -1, + -1, -1, -1, 92, 55, -1, 95, 58, 97, 98, + 99, 100, 101, 102, 103, 39, 40, 41, 42, 43, + 44, 45, -1, 47, 48, 49, 50, 51, -1, -1, + -1, 55, 65, 66, -1, 59, 69, 70, 71, 72, + 73, 74, -1, -1, -1, 96, 97, 98, -1, -1, + -1, 75, 76, -1, -1, -1, 89, 16, 91, 92, + 93, 94, 95, -1, -1, -1, -1, -1, 92, -1, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + 39, 40, 41, 42, 43, 44, 45, -1, 47, 48, + 49, 50, 51, -1, -1, -1, 55, 65, 66, -1, + 59, 69, 70, 71, 72, 73, 74, 17, 18, -1, + 20, 21, -1, -1, -1, -1, 75, 76, -1, -1, + 88, 89, 90, 91, 92, 93, 94, 95, -1, 39, + 40, -1, 42, 92, -1, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, 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, 39, 40, + -1, 42, -1, -1, -1, -1, 96, 97, 98, -1, + -1, -1, -1, -1, 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, 52, -1, + -1, -1, -1, 57, -1, 96, 97, 98, 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, - -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 44, -1, -1, -1, -1, 49, -1, -1, -1, -1, - 54, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 44, -1, 80, 81, 82, 83, - 84, 85, 86, 87, 54, -1, -1, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 44, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 54, -1, -1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -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, - 44, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 54, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 44, -1, 80, 81, 82, 83, - 84, 85, 86, 87, 54, -1, -1, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 49, -1, -1, -1, - -1, 54, -1, -1, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 80, 81, 82, - 83, 84, 85, 86, 87, 52, -1, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 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, 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, 80, 81, 82, 83, 84, 85, 86, - 87, 53, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 53, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + -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, 80, 81, 82, 83, 84, 85, 86, - 87, 53, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 54, -1, -1, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 80, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, - -1, 80, 81, 82, 83, 84, 85, 86, 87, 57, - 58, -1, 60, 61, 62, 63, 64, 65, 66, 57, - 58, -1, -1, 61, 62, 63, 64, 65, 66, -1, - -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, - -1, -1, -1, 81, 82, 83, 84, 85, 86, 87 + -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, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, - 109, 110, 111, 112, 113, 175, 89, 175, 176, 176, - 43, 0, 108, 109, 110, 43, 69, 53, 53, 91, - 178, 157, 175, 8, 31, 32, 33, 34, 35, 36, - 37, 39, 40, 41, 42, 43, 47, 51, 67, 68, - 84, 87, 92, 93, 94, 95, 142, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 44, 44, 49, 47, 175, 176, 47, 175, - 176, 47, 142, 47, 48, 142, 158, 159, 175, 142, - 142, 94, 95, 90, 53, 54, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, - 84, 85, 86, 87, 38, 47, 50, 88, 154, 155, - 175, 176, 43, 51, 53, 45, 116, 175, 47, 43, - 51, 47, 43, 51, 47, 44, 49, 142, 49, 48, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 175, 51, 158, 159, 175, 3, 11, 14, 15, 17, - 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 46, 47, 55, 56, 114, 115, 116, 117, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 144, 145, 146, 152, 153, 161, 162, - 165, 169, 170, 171, 172, 175, 142, 158, 175, 142, - 158, 175, 142, 142, 48, 142, 52, 48, 175, 44, - 43, 4, 117, 142, 53, 43, 114, 43, 43, 43, - 43, 84, 178, 182, 52, 53, 53, 53, 142, 53, - 43, 43, 47, 152, 153, 165, 165, 46, 114, 53, - 53, 53, 53, 53, 9, 10, 12, 13, 55, 56, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 48, 44, 43, 48, 44, 43, 48, 49, 48, - 142, 158, 4, 53, 142, 18, 142, 118, 144, 145, - 146, 165, 175, 142, 52, 52, 53, 158, 158, 142, - 43, 43, 43, 43, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 48, 158, 48, 158, 48, - 142, 43, 44, 44, 43, 44, 53, 21, 49, 44, - 44, 44, 142, 142, 142, 142, 43, 44, 43, 44, - 43, 44, 158, 114, 142, 114, 142, 143, 142, 175, - 116, 53, 53, 44, 44, 49, 44, 49, 44, 49, - 158, 158, 158, 44, 16, 44, 53, 44, 21, 53, - 53, 159, 53, 159, 53, 159, 44, 44, 44, 114, - 53, 118, 114, 142, 44, 44, 44, 44, 44, 53, - 53, 53, 114, 114 + 0, 11, 12, 13, 14, 15, 98, 114, 115, 116, + 117, 118, 119, 120, 121, 183, 97, 183, 184, 184, + 51, 0, 116, 117, 118, 51, 77, 61, 61, 99, + 186, 165, 183, 16, 39, 40, 41, 42, 43, 44, + 45, 47, 48, 49, 50, 51, 55, 59, 75, 76, + 92, 95, 100, 101, 102, 103, 150, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 52, 52, 57, 55, 183, 184, 55, 183, + 184, 55, 150, 55, 56, 150, 166, 167, 183, 150, + 150, 102, 103, 98, 61, 62, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 88, 89, 90, 91, + 92, 93, 94, 95, 46, 55, 58, 96, 162, 163, + 183, 184, 51, 59, 61, 53, 124, 183, 55, 51, + 59, 55, 51, 59, 55, 52, 57, 150, 57, 56, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 183, 59, 166, 167, 183, 11, 19, 22, 23, 25, + 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 54, 55, 63, 64, 122, 123, 124, 125, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 152, 153, 154, 160, 161, 169, 170, + 173, 177, 178, 179, 180, 183, 150, 166, 183, 150, + 166, 183, 150, 150, 56, 150, 60, 56, 183, 52, + 51, 12, 125, 150, 61, 51, 122, 51, 51, 51, + 51, 92, 186, 190, 60, 61, 61, 61, 150, 61, + 51, 51, 55, 160, 161, 173, 173, 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, + 150, 166, 12, 61, 150, 26, 150, 126, 152, 153, + 154, 173, 183, 150, 60, 60, 61, 166, 166, 150, + 51, 51, 51, 51, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 56, 166, 56, 166, 56, + 150, 51, 52, 52, 51, 52, 61, 29, 57, 52, + 52, 52, 150, 150, 150, 150, 51, 52, 51, 52, + 51, 52, 166, 122, 150, 122, 150, 151, 150, 183, + 124, 61, 61, 52, 52, 57, 52, 57, 52, 57, + 166, 166, 166, 52, 24, 52, 61, 52, 29, 61, + 61, 167, 61, 167, 61, 167, 52, 52, 52, 122, + 61, 126, 122, 150, 52, 52, 52, 52, 52, 61, + 61, 61, 122, 122 }; const unsigned char parser::yyr1_[] = { - 0, 105, 106, 106, 107, 107, 107, 107, 107, 107, - 108, 109, 110, 110, 110, 110, 110, 111, 112, 113, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 115, 115, 116, 116, 117, - 117, 118, 118, 118, 118, 119, 119, 120, 120, 120, - 121, 122, 122, 123, 124, 124, 125, 125, 126, 127, - 128, 129, 130, 131, 132, 132, 133, 134, 134, 135, - 136, 137, 138, 138, 139, 140, 141, 142, 142, 142, - 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 145, 145, 146, 146, 147, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 150, 151, 152, 152, 153, 153, - 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, - 156, 157, 157, 157, 158, 158, 159, 159, 160, 160, - 161, 162, 162, 163, 164, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 176, 177, 178, 179, 180, - 181, 181, 182, 182, 183, 184 + 0, 113, 114, 114, 115, 115, 115, 115, 115, 115, + 116, 117, 118, 118, 118, 118, 118, 119, 120, 121, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 123, 123, 124, 124, 125, + 125, 126, 126, 126, 126, 127, 127, 128, 128, 128, + 129, 130, 130, 131, 132, 132, 133, 133, 134, 135, + 136, 137, 138, 139, 140, 140, 141, 142, 142, 143, + 144, 145, 146, 146, 147, 148, 149, 150, 150, 150, + 151, 151, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 153, 153, 154, 154, 155, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 158, 159, 160, 160, 161, 161, + 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, + 164, 165, 165, 165, 166, 166, 167, 167, 168, 168, + 169, 170, 170, 171, 172, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 184, 185, 186, 187, 188, + 189, 189, 190, 190, 191, 192 }; const signed char @@ -4426,28 +4427,28 @@ namespace xsk { namespace gsc { namespace iw6 { const short parser::yyrline_[] = { - 0, 244, 244, 245, 249, 251, 253, 255, 257, 259, - 264, 268, 273, 274, 275, 276, 277, 281, 286, 291, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 324, 325, 329, 330, 334, - 336, 341, 343, 345, 348, 352, 354, 359, 361, 363, - 368, 373, 375, 380, 385, 387, 392, 394, 399, 404, - 409, 414, 419, 424, 429, 431, 436, 441, 443, 448, - 453, 458, 463, 465, 470, 475, 480, 485, 486, 487, - 491, 492, 496, 498, 500, 502, 504, 506, 508, 510, - 512, 514, 516, 521, 523, 528, 530, 535, 540, 542, - 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, - 564, 566, 568, 570, 572, 574, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, - 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, - 603, 604, 605, 606, 610, 615, 620, 621, 624, 625, - 629, 631, 633, 635, 637, 639, 644, 646, 648, 650, - 655, 660, 662, 665, 669, 672, 676, 678, 683, 685, - 690, 695, 697, 702, 707, 712, 713, 714, 715, 716, - 717, 718, 719, 720, 724, 729, 734, 739, 744, 749, - 754, 759, 764, 769, 774, 776, 781, 786, 791, 796, - 801, 803, 808, 810, 815, 820 + 0, 252, 252, 253, 257, 259, 261, 263, 265, 267, + 272, 276, 281, 282, 283, 284, 285, 289, 294, 299, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 332, 333, 337, 338, 342, + 344, 349, 351, 353, 356, 360, 362, 367, 369, 371, + 376, 381, 383, 388, 393, 395, 400, 402, 407, 412, + 417, 422, 427, 432, 437, 439, 444, 449, 451, 456, + 461, 466, 471, 473, 478, 483, 488, 493, 494, 495, + 499, 500, 504, 506, 508, 510, 512, 514, 516, 518, + 520, 522, 524, 529, 531, 536, 538, 543, 548, 550, + 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, + 572, 574, 576, 578, 580, 582, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 614, 618, 623, 628, 629, 632, 633, + 637, 639, 641, 643, 645, 647, 652, 654, 656, 658, + 663, 668, 670, 673, 677, 680, 684, 686, 691, 693, + 698, 703, 705, 710, 715, 720, 721, 722, 723, 724, + 725, 726, 727, 728, 732, 737, 742, 747, 752, 757, + 762, 767, 772, 777, 782, 784, 789, 794, 799, 804, + 809, 811, 816, 818, 823, 828 }; void @@ -4480,9 +4481,9 @@ namespace xsk { namespace gsc { namespace iw6 { #line 13 "parser.ypp" } } } // xsk::gsc::iw6 -#line 4484 "parser.cpp" +#line 4485 "parser.cpp" -#line 824 "parser.ypp" +#line 832 "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 2cc4e1bb..6a41447c 100644 --- a/src/iw6/xsk/parser.hpp +++ b/src/iw6/xsk/parser.hpp @@ -674,108 +674,116 @@ namespace xsk { namespace gsc { namespace iw6 { IW6EOF = 0, // "end of file" IW6error = 1, // error IW6UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - IF = 15, // "if" - ELSE = 16, // "else" - DO = 17, // "do" - WHILE = 18, // "while" - FOR = 19, // "for" - FOREACH = 20, // "foreach" - IN = 21, // "in" - SWITCH = 22, // "switch" - CASE = 23, // "case" - DEFAULT = 24, // "default" - BREAK = 25, // "break" - CONTINUE = 26, // "continue" - RETURN = 27, // "return" - BREAKPOINT = 28, // "breakpoint" - PROFBEGIN = 29, // "prof_begin" - PROFEND = 30, // "prof_end" - THREAD = 31, // "thread" - CHILDTHREAD = 32, // "childthread" - THISTHREAD = 33, // "thisthread" - CALL = 34, // "call" - TRUE = 35, // "true" - FALSE = 36, // "false" - UNDEFINED = 37, // "undefined" - SIZE = 38, // ".size" - GAME = 39, // "game" - SELF = 40, // "self" - ANIM = 41, // "anim" - LEVEL = 42, // "level" - LPAREN = 43, // "(" - RPAREN = 44, // ")" - LBRACE = 45, // "{" - RBRACE = 46, // "}" - LBRACKET = 47, // "[" - RBRACKET = 48, // "]" - COMMA = 49, // "," - DOT = 50, // "." - DOUBLECOLON = 51, // "::" - COLON = 52, // ":" - SEMICOLON = 53, // ";" - QMARK = 54, // "?" - INCREMENT = 55, // "++" - DECREMENT = 56, // "--" - LSHIFT = 57, // "<<" - RSHIFT = 58, // ">>" - OR = 59, // "||" - AND = 60, // "&&" - EQUALITY = 61, // "==" - INEQUALITY = 62, // "!=" - LESS_EQUAL = 63, // "<=" - GREATER_EQUAL = 64, // ">=" - LESS = 65, // "<" - GREATER = 66, // ">" - NOT = 67, // "!" - COMPLEMENT = 68, // "~" - ASSIGN = 69, // "=" - ASSIGN_ADD = 70, // "+=" - ASSIGN_SUB = 71, // "-=" - ASSIGN_MUL = 72, // "*=" - ASSIGN_DIV = 73, // "/=" - ASSIGN_MOD = 74, // "%=" - ASSIGN_BW_OR = 75, // "|=" - ASSIGN_BW_AND = 76, // "&=" - ASSIGN_BW_EXOR = 77, // "^=" - ASSIGN_RSHIFT = 78, // ">>=" - ASSIGN_LSHIFT = 79, // "<<=" - BITWISE_OR = 80, // "|" - BITWISE_AND = 81, // "&" - BITWISE_EXOR = 82, // "^" - ADD = 83, // "+" - SUB = 84, // "-" - MUL = 85, // "*" - DIV = 86, // "/" - MOD = 87, // "%" - FIELD = 88, // "field" - PATH = 89, // "path" - IDENTIFIER = 90, // "identifier" - STRING = 91, // "string literal" - ISTRING = 92, // "localized string" - COLOR = 93, // "color" - FLOAT = 94, // "float" - INTEGER = 95, // "integer" - ADD_ARRAY = 96, // ADD_ARRAY - THEN = 97, // THEN - TERN = 98, // TERN - NEG = 99, // NEG - ANIMREF = 100, // ANIMREF - PREINC = 101, // PREINC - PREDEC = 102, // PREDEC - POSTINC = 103, // POSTINC - POSTDEC = 104 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + IF = 23, // "if" + ELSE = 24, // "else" + DO = 25, // "do" + WHILE = 26, // "while" + FOR = 27, // "for" + FOREACH = 28, // "foreach" + IN = 29, // "in" + SWITCH = 30, // "switch" + CASE = 31, // "case" + DEFAULT = 32, // "default" + BREAK = 33, // "break" + CONTINUE = 34, // "continue" + RETURN = 35, // "return" + BREAKPOINT = 36, // "breakpoint" + PROFBEGIN = 37, // "prof_begin" + PROFEND = 38, // "prof_end" + THREAD = 39, // "thread" + CHILDTHREAD = 40, // "childthread" + THISTHREAD = 41, // "thisthread" + CALL = 42, // "call" + TRUE = 43, // "true" + FALSE = 44, // "false" + UNDEFINED = 45, // "undefined" + SIZE = 46, // ".size" + GAME = 47, // "game" + SELF = 48, // "self" + ANIM = 49, // "anim" + LEVEL = 50, // "level" + LPAREN = 51, // "(" + RPAREN = 52, // ")" + LBRACE = 53, // "{" + RBRACE = 54, // "}" + LBRACKET = 55, // "[" + RBRACKET = 56, // "]" + COMMA = 57, // "," + DOT = 58, // "." + DOUBLECOLON = 59, // "::" + COLON = 60, // ":" + SEMICOLON = 61, // ";" + QMARK = 62, // "?" + INCREMENT = 63, // "++" + DECREMENT = 64, // "--" + LSHIFT = 65, // "<<" + RSHIFT = 66, // ">>" + OR = 67, // "||" + AND = 68, // "&&" + EQUALITY = 69, // "==" + INEQUALITY = 70, // "!=" + LESS_EQUAL = 71, // "<=" + GREATER_EQUAL = 72, // ">=" + LESS = 73, // "<" + GREATER = 74, // ">" + NOT = 75, // "!" + COMPLEMENT = 76, // "~" + ASSIGN = 77, // "=" + ASSIGN_ADD = 78, // "+=" + ASSIGN_SUB = 79, // "-=" + ASSIGN_MUL = 80, // "*=" + ASSIGN_DIV = 81, // "/=" + ASSIGN_MOD = 82, // "%=" + ASSIGN_BW_OR = 83, // "|=" + ASSIGN_BW_AND = 84, // "&=" + ASSIGN_BW_EXOR = 85, // "^=" + ASSIGN_RSHIFT = 86, // ">>=" + ASSIGN_LSHIFT = 87, // "<<=" + BITWISE_OR = 88, // "|" + BITWISE_AND = 89, // "&" + BITWISE_EXOR = 90, // "^" + ADD = 91, // "+" + SUB = 92, // "-" + MUL = 93, // "*" + DIV = 94, // "/" + MOD = 95, // "%" + FIELD = 96, // "field" + PATH = 97, // "path" + IDENTIFIER = 98, // "identifier" + STRING = 99, // "string literal" + ISTRING = 100, // "localized string" + COLOR = 101, // "color" + FLOAT = 102, // "float" + INTEGER = 103, // "integer" + ADD_ARRAY = 104, // ADD_ARRAY + THEN = 105, // THEN + TERN = 106, // TERN + NEG = 107, // NEG + ANIMREF = 108, // ANIMREF + PREINC = 109, // PREINC + PREDEC = 110, // PREDEC + POSTINC = 111, // POSTINC + POSTDEC = 112 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -792,193 +800,201 @@ namespace xsk { namespace gsc { namespace iw6 { { enum symbol_kind_type { - YYNTOKENS = 105, ///< Number of tokens. + YYNTOKENS = 113, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_IF = 15, // "if" - S_ELSE = 16, // "else" - S_DO = 17, // "do" - S_WHILE = 18, // "while" - S_FOR = 19, // "for" - S_FOREACH = 20, // "foreach" - S_IN = 21, // "in" - S_SWITCH = 22, // "switch" - S_CASE = 23, // "case" - S_DEFAULT = 24, // "default" - S_BREAK = 25, // "break" - S_CONTINUE = 26, // "continue" - S_RETURN = 27, // "return" - S_BREAKPOINT = 28, // "breakpoint" - S_PROFBEGIN = 29, // "prof_begin" - S_PROFEND = 30, // "prof_end" - S_THREAD = 31, // "thread" - S_CHILDTHREAD = 32, // "childthread" - S_THISTHREAD = 33, // "thisthread" - S_CALL = 34, // "call" - S_TRUE = 35, // "true" - S_FALSE = 36, // "false" - S_UNDEFINED = 37, // "undefined" - S_SIZE = 38, // ".size" - S_GAME = 39, // "game" - S_SELF = 40, // "self" - S_ANIM = 41, // "anim" - S_LEVEL = 42, // "level" - S_LPAREN = 43, // "(" - S_RPAREN = 44, // ")" - S_LBRACE = 45, // "{" - S_RBRACE = 46, // "}" - S_LBRACKET = 47, // "[" - S_RBRACKET = 48, // "]" - S_COMMA = 49, // "," - S_DOT = 50, // "." - S_DOUBLECOLON = 51, // "::" - S_COLON = 52, // ":" - S_SEMICOLON = 53, // ";" - S_QMARK = 54, // "?" - S_INCREMENT = 55, // "++" - S_DECREMENT = 56, // "--" - S_LSHIFT = 57, // "<<" - S_RSHIFT = 58, // ">>" - S_OR = 59, // "||" - S_AND = 60, // "&&" - S_EQUALITY = 61, // "==" - S_INEQUALITY = 62, // "!=" - S_LESS_EQUAL = 63, // "<=" - S_GREATER_EQUAL = 64, // ">=" - S_LESS = 65, // "<" - S_GREATER = 66, // ">" - S_NOT = 67, // "!" - S_COMPLEMENT = 68, // "~" - S_ASSIGN = 69, // "=" - S_ASSIGN_ADD = 70, // "+=" - S_ASSIGN_SUB = 71, // "-=" - S_ASSIGN_MUL = 72, // "*=" - S_ASSIGN_DIV = 73, // "/=" - S_ASSIGN_MOD = 74, // "%=" - S_ASSIGN_BW_OR = 75, // "|=" - S_ASSIGN_BW_AND = 76, // "&=" - S_ASSIGN_BW_EXOR = 77, // "^=" - S_ASSIGN_RSHIFT = 78, // ">>=" - S_ASSIGN_LSHIFT = 79, // "<<=" - S_BITWISE_OR = 80, // "|" - S_BITWISE_AND = 81, // "&" - S_BITWISE_EXOR = 82, // "^" - S_ADD = 83, // "+" - S_SUB = 84, // "-" - S_MUL = 85, // "*" - S_DIV = 86, // "/" - S_MOD = 87, // "%" - S_FIELD = 88, // "field" - S_PATH = 89, // "path" - S_IDENTIFIER = 90, // "identifier" - S_STRING = 91, // "string literal" - S_ISTRING = 92, // "localized string" - S_COLOR = 93, // "color" - S_FLOAT = 94, // "float" - S_INTEGER = 95, // "integer" - S_ADD_ARRAY = 96, // ADD_ARRAY - S_THEN = 97, // THEN - S_TERN = 98, // TERN - S_NEG = 99, // NEG - S_ANIMREF = 100, // ANIMREF - S_PREINC = 101, // PREINC - S_PREDEC = 102, // PREDEC - S_POSTINC = 103, // POSTINC - S_POSTDEC = 104, // POSTDEC - S_YYACCEPT = 105, // $accept - S_root = 106, // root - S_program = 107, // program - S_inline = 108, // inline - S_include = 109, // include - S_declaration = 110, // declaration - S_decl_usingtree = 111, // decl_usingtree - S_decl_constant = 112, // decl_constant - S_decl_thread = 113, // decl_thread - S_stmt = 114, // stmt - S_stmt_dev = 115, // stmt_dev - S_stmt_block = 116, // stmt_block - S_stmt_list = 117, // stmt_list - S_stmt_expr = 118, // stmt_expr - S_stmt_call = 119, // stmt_call - S_stmt_assign = 120, // stmt_assign - S_stmt_endon = 121, // stmt_endon - S_stmt_notify = 122, // stmt_notify - S_stmt_wait = 123, // stmt_wait - S_stmt_waittill = 124, // stmt_waittill - S_stmt_waittillmatch = 125, // stmt_waittillmatch - S_stmt_waittillframeend = 126, // stmt_waittillframeend - S_stmt_if = 127, // stmt_if - S_stmt_ifelse = 128, // stmt_ifelse - S_stmt_while = 129, // stmt_while - S_stmt_dowhile = 130, // stmt_dowhile - S_stmt_for = 131, // stmt_for - S_stmt_foreach = 132, // stmt_foreach - S_stmt_switch = 133, // stmt_switch - S_stmt_case = 134, // stmt_case - S_stmt_default = 135, // stmt_default - S_stmt_break = 136, // stmt_break - S_stmt_continue = 137, // stmt_continue - S_stmt_return = 138, // stmt_return - S_stmt_breakpoint = 139, // stmt_breakpoint - S_stmt_prof_begin = 140, // stmt_prof_begin - S_stmt_prof_end = 141, // stmt_prof_end - S_expr = 142, // expr - S_expr_or_empty = 143, // expr_or_empty - S_expr_assign = 144, // expr_assign - S_expr_increment = 145, // expr_increment - S_expr_decrement = 146, // expr_decrement - S_expr_ternary = 147, // expr_ternary - S_expr_binary = 148, // expr_binary - S_expr_primitive = 149, // expr_primitive - S_expr_complement = 150, // expr_complement - S_expr_not = 151, // expr_not - S_expr_call = 152, // expr_call - S_expr_method = 153, // expr_method - S_expr_function = 154, // expr_function - S_expr_pointer = 155, // expr_pointer - S_expr_add_array = 156, // expr_add_array - S_expr_parameters = 157, // expr_parameters - S_expr_arguments = 158, // expr_arguments - S_expr_arguments_no_empty = 159, // expr_arguments_no_empty - S_expr_reference = 160, // expr_reference - S_expr_array = 161, // expr_array - S_expr_field = 162, // expr_field - S_expr_size = 163, // expr_size - S_expr_paren = 164, // expr_paren - S_expr_object = 165, // expr_object - S_expr_thisthread = 166, // expr_thisthread - S_expr_empty_array = 167, // expr_empty_array - S_expr_undefined = 168, // expr_undefined - S_expr_game = 169, // expr_game - S_expr_self = 170, // expr_self - S_expr_anim = 171, // expr_anim - S_expr_level = 172, // expr_level - S_expr_animation = 173, // expr_animation - S_expr_animtree = 174, // expr_animtree - S_expr_identifier = 175, // expr_identifier - S_expr_path = 176, // expr_path - S_expr_istring = 177, // expr_istring - S_expr_string = 178, // expr_string - S_expr_color = 179, // expr_color - S_expr_vector = 180, // expr_vector - S_expr_float = 181, // expr_float - S_expr_integer = 182, // expr_integer - S_expr_false = 183, // expr_false - S_expr_true = 184 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_IF = 23, // "if" + S_ELSE = 24, // "else" + S_DO = 25, // "do" + S_WHILE = 26, // "while" + S_FOR = 27, // "for" + S_FOREACH = 28, // "foreach" + S_IN = 29, // "in" + S_SWITCH = 30, // "switch" + S_CASE = 31, // "case" + S_DEFAULT = 32, // "default" + S_BREAK = 33, // "break" + S_CONTINUE = 34, // "continue" + S_RETURN = 35, // "return" + S_BREAKPOINT = 36, // "breakpoint" + S_PROFBEGIN = 37, // "prof_begin" + S_PROFEND = 38, // "prof_end" + S_THREAD = 39, // "thread" + S_CHILDTHREAD = 40, // "childthread" + S_THISTHREAD = 41, // "thisthread" + S_CALL = 42, // "call" + S_TRUE = 43, // "true" + S_FALSE = 44, // "false" + S_UNDEFINED = 45, // "undefined" + S_SIZE = 46, // ".size" + S_GAME = 47, // "game" + S_SELF = 48, // "self" + S_ANIM = 49, // "anim" + S_LEVEL = 50, // "level" + S_LPAREN = 51, // "(" + S_RPAREN = 52, // ")" + S_LBRACE = 53, // "{" + S_RBRACE = 54, // "}" + S_LBRACKET = 55, // "[" + S_RBRACKET = 56, // "]" + S_COMMA = 57, // "," + S_DOT = 58, // "." + S_DOUBLECOLON = 59, // "::" + S_COLON = 60, // ":" + S_SEMICOLON = 61, // ";" + S_QMARK = 62, // "?" + S_INCREMENT = 63, // "++" + S_DECREMENT = 64, // "--" + S_LSHIFT = 65, // "<<" + S_RSHIFT = 66, // ">>" + S_OR = 67, // "||" + S_AND = 68, // "&&" + S_EQUALITY = 69, // "==" + S_INEQUALITY = 70, // "!=" + S_LESS_EQUAL = 71, // "<=" + S_GREATER_EQUAL = 72, // ">=" + S_LESS = 73, // "<" + S_GREATER = 74, // ">" + S_NOT = 75, // "!" + S_COMPLEMENT = 76, // "~" + S_ASSIGN = 77, // "=" + S_ASSIGN_ADD = 78, // "+=" + S_ASSIGN_SUB = 79, // "-=" + S_ASSIGN_MUL = 80, // "*=" + S_ASSIGN_DIV = 81, // "/=" + S_ASSIGN_MOD = 82, // "%=" + S_ASSIGN_BW_OR = 83, // "|=" + S_ASSIGN_BW_AND = 84, // "&=" + S_ASSIGN_BW_EXOR = 85, // "^=" + S_ASSIGN_RSHIFT = 86, // ">>=" + S_ASSIGN_LSHIFT = 87, // "<<=" + S_BITWISE_OR = 88, // "|" + S_BITWISE_AND = 89, // "&" + S_BITWISE_EXOR = 90, // "^" + S_ADD = 91, // "+" + S_SUB = 92, // "-" + S_MUL = 93, // "*" + S_DIV = 94, // "/" + S_MOD = 95, // "%" + S_FIELD = 96, // "field" + S_PATH = 97, // "path" + S_IDENTIFIER = 98, // "identifier" + S_STRING = 99, // "string literal" + S_ISTRING = 100, // "localized string" + S_COLOR = 101, // "color" + S_FLOAT = 102, // "float" + S_INTEGER = 103, // "integer" + S_ADD_ARRAY = 104, // ADD_ARRAY + S_THEN = 105, // THEN + S_TERN = 106, // TERN + S_NEG = 107, // NEG + S_ANIMREF = 108, // ANIMREF + S_PREINC = 109, // PREINC + S_PREDEC = 110, // PREDEC + S_POSTINC = 111, // POSTINC + S_POSTDEC = 112, // POSTDEC + S_YYACCEPT = 113, // $accept + S_root = 114, // root + S_program = 115, // program + S_inline = 116, // inline + S_include = 117, // include + S_declaration = 118, // declaration + S_decl_usingtree = 119, // decl_usingtree + S_decl_constant = 120, // decl_constant + S_decl_thread = 121, // decl_thread + S_stmt = 122, // stmt + S_stmt_dev = 123, // stmt_dev + S_stmt_block = 124, // stmt_block + S_stmt_list = 125, // stmt_list + S_stmt_expr = 126, // stmt_expr + S_stmt_call = 127, // stmt_call + S_stmt_assign = 128, // stmt_assign + S_stmt_endon = 129, // stmt_endon + S_stmt_notify = 130, // stmt_notify + S_stmt_wait = 131, // stmt_wait + S_stmt_waittill = 132, // stmt_waittill + S_stmt_waittillmatch = 133, // stmt_waittillmatch + S_stmt_waittillframeend = 134, // stmt_waittillframeend + S_stmt_if = 135, // stmt_if + S_stmt_ifelse = 136, // stmt_ifelse + S_stmt_while = 137, // stmt_while + S_stmt_dowhile = 138, // stmt_dowhile + S_stmt_for = 139, // stmt_for + S_stmt_foreach = 140, // stmt_foreach + S_stmt_switch = 141, // stmt_switch + S_stmt_case = 142, // stmt_case + S_stmt_default = 143, // stmt_default + S_stmt_break = 144, // stmt_break + S_stmt_continue = 145, // stmt_continue + S_stmt_return = 146, // stmt_return + S_stmt_breakpoint = 147, // stmt_breakpoint + S_stmt_prof_begin = 148, // stmt_prof_begin + S_stmt_prof_end = 149, // stmt_prof_end + S_expr = 150, // expr + S_expr_or_empty = 151, // expr_or_empty + S_expr_assign = 152, // expr_assign + S_expr_increment = 153, // expr_increment + S_expr_decrement = 154, // expr_decrement + S_expr_ternary = 155, // expr_ternary + S_expr_binary = 156, // expr_binary + S_expr_primitive = 157, // expr_primitive + S_expr_complement = 158, // expr_complement + S_expr_not = 159, // expr_not + S_expr_call = 160, // expr_call + S_expr_method = 161, // expr_method + S_expr_function = 162, // expr_function + S_expr_pointer = 163, // expr_pointer + S_expr_add_array = 164, // expr_add_array + S_expr_parameters = 165, // expr_parameters + S_expr_arguments = 166, // expr_arguments + S_expr_arguments_no_empty = 167, // expr_arguments_no_empty + S_expr_reference = 168, // expr_reference + S_expr_array = 169, // expr_array + S_expr_field = 170, // expr_field + S_expr_size = 171, // expr_size + S_expr_paren = 172, // expr_paren + S_expr_object = 173, // expr_object + S_expr_thisthread = 174, // expr_thisthread + S_expr_empty_array = 175, // expr_empty_array + S_expr_undefined = 176, // expr_undefined + S_expr_game = 177, // expr_game + S_expr_self = 178, // expr_self + S_expr_anim = 179, // expr_anim + S_expr_level = 180, // expr_level + S_expr_animation = 181, // expr_animation + S_expr_animtree = 182, // expr_animtree + S_expr_identifier = 183, // expr_identifier + S_expr_path = 184, // expr_path + S_expr_istring = 185, // expr_istring + S_expr_string = 186, // expr_string + S_expr_color = 187, // expr_color + S_expr_vector = 188, // expr_vector + S_expr_float = 189, // expr_float + S_expr_integer = 190, // expr_integer + S_expr_false = 191, // expr_false + S_expr_true = 192 // expr_true }; }; @@ -2751,6 +2767,126 @@ switch (yykind) return symbol_type (token::IW6UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5311,7 +5447,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw6 -#line 5315 "parser.hpp" +#line 5451 "parser.hpp" diff --git a/src/iw7/xsk/lexer.cpp b/src/iw7/xsk/lexer.cpp index dc7ec7a6..773c8136 100644 --- a/src/iw7/xsk/lexer.cpp +++ b/src/iw7/xsk/lexer.cpp @@ -16,57 +16,6 @@ xsk::gsc::iw7::parser::symbol_type IW7lex(xsk::gsc::iw7::lexer& lexer) namespace xsk::gsc::iw7 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -129,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -140,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -151,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -164,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -172,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -193,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type if (header_top_ > 0) pop_header(); else - return iw7::parser::make_IW7EOF(loc_); + return parser::make_IW7EOF(loc_); } reader_.advance(); @@ -211,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return iw7::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return iw7::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return iw7::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -290,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type indev_ = false; reader_.advance(); - return iw7::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -303,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return iw7::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return iw7::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -323,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::iw7::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return iw7::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return iw7::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return iw7::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return iw7::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return iw7::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return iw7::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return iw7::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return iw7::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return iw7::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return iw7::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return iw7::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return iw7::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return iw7::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return iw7::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return iw7::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return iw7::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return iw7::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return iw7::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return iw7::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return iw7::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return iw7::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return iw7::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return iw7::parser::make_OR(loc_); + return parser::make_OR(loc_); - return iw7::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return iw7::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return iw7::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return iw7::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return iw7::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return iw7::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return iw7::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return iw7::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return iw7::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return iw7::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return iw7::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return iw7::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return iw7::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return iw7::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return iw7::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return iw7::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return iw7::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -496,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return iw7::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return iw7::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -533,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return iw7::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return iw7::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::IW7UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return iw7::parser::make_PATH(xsk::gsc::iw7::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw7::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return iw7::parser::make_IDENTIFIER(xsk::gsc::iw7::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw7::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -621,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return iw7::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return iw7::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -655,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return iw7::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -689,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return iw7::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -723,176 +683,59 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return iw7::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::iw7::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return iw7::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return iw7::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return iw7::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return iw7::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return iw7::parser::make_ENDON(loc_); - case keyword::KW_notify: - return iw7::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return iw7::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return iw7::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return iw7::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return iw7::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_if: - return iw7::parser::make_IF(loc_); - case keyword::KW_else: - return iw7::parser::make_ELSE(loc_); - case keyword::KW_do: - return iw7::parser::make_DO(loc_); - case keyword::KW_while: - return iw7::parser::make_WHILE(loc_); - case keyword::KW_for: - return iw7::parser::make_FOR(loc_); - case keyword::KW_foreach: - return iw7::parser::make_FOREACH(loc_); - case keyword::KW_in: - return iw7::parser::make_IN(loc_); - case keyword::KW_switch: - return iw7::parser::make_SWITCH(loc_); - case keyword::KW_case: - return iw7::parser::make_CASE(loc_); - case keyword::KW_default: - return iw7::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return iw7::parser::make_BREAK(loc_); - case keyword::KW_continue: - return iw7::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return iw7::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return iw7::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return iw7::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return iw7::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return iw7::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return iw7::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return iw7::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return iw7::parser::make_CALL(loc_); - case keyword::KW_true: - return iw7::parser::make_TRUE(loc_); - case keyword::KW_false: - return iw7::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return iw7::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return iw7::parser::make_SIZE(loc_); - case keyword::KW_game: - return iw7::parser::make_GAME(loc_); - case keyword::KW_self: - return iw7::parser::make_SELF(loc_); - case keyword::KW_anim: - return iw7::parser::make_ANIM(loc_); - case keyword::KW_level: - return iw7::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::iw7 diff --git a/src/iw7/xsk/lexer.hpp b/src/iw7/xsk/lexer.hpp index 215534c1..3ac25c49 100644 --- a/src/iw7/xsk/lexer.hpp +++ b/src/iw7/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::iw7 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::iw7::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::iw7::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::iw7 diff --git a/src/iw7/xsk/parser.cpp b/src/iw7/xsk/parser.cpp index 1b581ffa..badb18cb 100644 --- a/src/iw7/xsk/parser.cpp +++ b/src/iw7/xsk/parser.cpp @@ -1964,1285 +1964,1285 @@ namespace xsk { namespace gsc { namespace iw7 { switch (yyn) { case 2: // root: program -#line 244 "parser.ypp" +#line 252 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1970 "parser.cpp" break; case 3: // root: %empty -#line 245 "parser.ypp" +#line 253 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1976 "parser.cpp" break; case 4: // program: program inline -#line 250 "parser.ypp" +#line 258 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 1982 "parser.cpp" break; case 5: // program: program include -#line 252 "parser.ypp" +#line 260 "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 1988 "parser.cpp" break; case 6: // program: program declaration -#line 254 "parser.ypp" +#line 262 "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 1994 "parser.cpp" break; case 7: // program: inline -#line 256 "parser.ypp" +#line 264 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2000 "parser.cpp" break; case 8: // program: include -#line 258 "parser.ypp" +#line 266 "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 2006 "parser.cpp" break; case 9: // program: declaration -#line 260 "parser.ypp" +#line 268 "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 2012 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 264 "parser.ypp" +#line 272 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2018 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 269 "parser.ypp" +#line 277 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2024 "parser.cpp" break; case 12: // declaration: "/#" -#line 273 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2030 "parser.cpp" break; case 13: // declaration: "#/" -#line 274 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2036 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 275 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2042 "parser.cpp" break; case 15: // declaration: decl_constant -#line 276 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2048 "parser.cpp" break; case 16: // declaration: decl_thread -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2054 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 282 "parser.ypp" - { lexer.restrict_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 290 "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 2060 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 287 "parser.ypp" +#line 295 "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 2066 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 292 "parser.ypp" - { lexer.restrict_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 300 "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 2072 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 296 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2078 "parser.cpp" break; case 21: // stmt: stmt_block -#line 297 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2084 "parser.cpp" break; case 22: // stmt: stmt_call -#line 298 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2090 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 299 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2096 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2102 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2108 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2114 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2120 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2126 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2132 "parser.cpp" break; case 30: // stmt: stmt_if -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2138 "parser.cpp" break; case 31: // stmt: stmt_ifelse -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2144 "parser.cpp" break; case 32: // stmt: stmt_while -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2150 "parser.cpp" break; case 33: // stmt: stmt_dowhile -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2156 "parser.cpp" break; case 34: // stmt: stmt_for -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2162 "parser.cpp" break; case 35: // stmt: stmt_foreach -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2168 "parser.cpp" break; case 36: // stmt: stmt_switch -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2174 "parser.cpp" break; case 37: // stmt: stmt_case -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2180 "parser.cpp" break; case 38: // stmt: stmt_default -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2186 "parser.cpp" break; case 39: // stmt: stmt_break -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2192 "parser.cpp" break; case 40: // stmt: stmt_continue -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2198 "parser.cpp" break; case 41: // stmt: stmt_return -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2204 "parser.cpp" break; case 42: // stmt: stmt_breakpoint -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2210 "parser.cpp" break; case 43: // stmt: stmt_prof_begin -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2216 "parser.cpp" break; case 44: // stmt: stmt_prof_end -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2222 "parser.cpp" break; case 45: // stmt_dev: "/#" stmt_list "#/" -#line 324 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2228 "parser.cpp" break; case 46: // stmt_dev: "/#" "#/" -#line 325 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2234 "parser.cpp" break; case 47: // stmt_block: "{" stmt_list "}" -#line 329 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2240 "parser.cpp" break; case 48: // stmt_block: "{" "}" -#line 330 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2246 "parser.cpp" break; case 49: // stmt_list: stmt_list stmt -#line 335 "parser.ypp" +#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 > ())); } #line 2252 "parser.cpp" break; case 50: // stmt_list: stmt -#line 337 "parser.ypp" +#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 > ())); } #line 2258 "parser.cpp" break; case 51: // stmt_expr: expr_assign -#line 342 "parser.ypp" +#line 350 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2264 "parser.cpp" break; case 52: // stmt_expr: expr_increment -#line 344 "parser.ypp" +#line 352 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2270 "parser.cpp" break; case 53: // stmt_expr: expr_decrement -#line 346 "parser.ypp" +#line 354 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2276 "parser.cpp" break; case 54: // stmt_expr: %empty -#line 348 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2282 "parser.cpp" break; case 55: // stmt_call: expr_call ";" -#line 353 "parser.ypp" +#line 361 "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 2288 "parser.cpp" break; case 56: // stmt_call: expr_method ";" -#line 355 "parser.ypp" +#line 363 "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 2294 "parser.cpp" break; case 57: // stmt_assign: expr_assign ";" -#line 360 "parser.ypp" +#line 368 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2300 "parser.cpp" break; case 58: // stmt_assign: expr_increment ";" -#line 362 "parser.ypp" +#line 370 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2306 "parser.cpp" break; case 59: // stmt_assign: expr_decrement ";" -#line 364 "parser.ypp" +#line 372 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2312 "parser.cpp" break; case 60: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 369 "parser.ypp" +#line 377 "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 2318 "parser.cpp" break; case 61: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 374 "parser.ypp" +#line 382 "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 2324 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 376 "parser.ypp" +#line 384 "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 2330 "parser.cpp" break; case 63: // stmt_wait: "wait" expr ";" -#line 381 "parser.ypp" +#line 389 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2336 "parser.cpp" break; case 64: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 386 "parser.ypp" +#line 394 "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 2342 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 388 "parser.ypp" +#line 396 "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 2348 "parser.cpp" break; case 66: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 393 "parser.ypp" +#line 401 "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 2354 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 395 "parser.ypp" +#line 403 "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 2360 "parser.cpp" break; case 68: // stmt_waittillframeend: "waittillframeend" ";" -#line 400 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2366 "parser.cpp" break; case 69: // stmt_if: "if" "(" expr ")" stmt -#line 405 "parser.ypp" +#line 413 "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 2372 "parser.cpp" break; case 70: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 410 "parser.ypp" +#line 418 "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 2378 "parser.cpp" break; case 71: // stmt_while: "while" "(" expr ")" stmt -#line 415 "parser.ypp" +#line 423 "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 2384 "parser.cpp" break; case 72: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 420 "parser.ypp" +#line 428 "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 2390 "parser.cpp" break; case 73: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 425 "parser.ypp" +#line 433 "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 2396 "parser.cpp" break; case 74: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 430 "parser.ypp" +#line 438 "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 2402 "parser.cpp" break; case 75: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 432 "parser.ypp" +#line 440 "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 2408 "parser.cpp" break; case 76: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 437 "parser.ypp" +#line 445 "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 2414 "parser.cpp" break; case 77: // stmt_case: "case" expr_integer ":" -#line 442 "parser.ypp" +#line 450 "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 2420 "parser.cpp" break; case 78: // stmt_case: "case" expr_string ":" -#line 444 "parser.ypp" +#line 452 "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 2426 "parser.cpp" break; case 79: // stmt_default: "default" ":" -#line 449 "parser.ypp" +#line 457 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2432 "parser.cpp" break; case 80: // stmt_break: "break" ";" -#line 454 "parser.ypp" +#line 462 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2438 "parser.cpp" break; case 81: // stmt_continue: "continue" ";" -#line 459 "parser.ypp" +#line 467 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2444 "parser.cpp" break; case 82: // stmt_return: "return" expr ";" -#line 464 "parser.ypp" +#line 472 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2450 "parser.cpp" break; case 83: // stmt_return: "return" ";" -#line 466 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2456 "parser.cpp" break; case 84: // stmt_breakpoint: "breakpoint" ";" -#line 471 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2462 "parser.cpp" break; case 85: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 476 "parser.ypp" +#line 484 "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 2468 "parser.cpp" break; case 86: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 481 "parser.ypp" +#line 489 "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 2474 "parser.cpp" break; case 87: // expr: expr_ternary -#line 485 "parser.ypp" +#line 493 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2480 "parser.cpp" break; case 88: // expr: expr_binary -#line 486 "parser.ypp" +#line 494 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2486 "parser.cpp" break; case 89: // expr: expr_primitive -#line 487 "parser.ypp" +#line 495 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2492 "parser.cpp" break; case 90: // expr_or_empty: expr -#line 491 "parser.ypp" +#line 499 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2498 "parser.cpp" break; case 91: // expr_or_empty: %empty -#line 492 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2504 "parser.cpp" break; case 92: // expr_assign: expr_object "=" expr -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2510 "parser.cpp" break; case 93: // expr_assign: expr_object "|=" expr -#line 499 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2516 "parser.cpp" break; case 94: // expr_assign: expr_object "&=" expr -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2522 "parser.cpp" break; case 95: // expr_assign: expr_object "^=" expr -#line 503 "parser.ypp" +#line 511 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2528 "parser.cpp" break; case 96: // expr_assign: expr_object "<<=" expr -#line 505 "parser.ypp" +#line 513 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2534 "parser.cpp" break; case 97: // expr_assign: expr_object ">>=" expr -#line 507 "parser.ypp" +#line 515 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2540 "parser.cpp" break; case 98: // expr_assign: expr_object "+=" expr -#line 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2546 "parser.cpp" break; case 99: // expr_assign: expr_object "-=" expr -#line 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2552 "parser.cpp" break; case 100: // expr_assign: expr_object "*=" expr -#line 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2558 "parser.cpp" break; case 101: // expr_assign: expr_object "/=" expr -#line 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2564 "parser.cpp" break; case 102: // expr_assign: expr_object "%=" expr -#line 517 "parser.ypp" +#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 2570 "parser.cpp" break; case 103: // expr_increment: "++" expr_object -#line 522 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2576 "parser.cpp" break; case 104: // expr_increment: expr_object "++" -#line 524 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2582 "parser.cpp" break; case 105: // expr_decrement: "--" expr_object -#line 529 "parser.ypp" +#line 537 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2588 "parser.cpp" break; case 106: // expr_decrement: expr_object "--" -#line 531 "parser.ypp" +#line 539 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2594 "parser.cpp" break; case 107: // expr_ternary: expr "?" expr ":" expr -#line 536 "parser.ypp" +#line 544 "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 2600 "parser.cpp" break; case 108: // expr_binary: expr "||" expr -#line 541 "parser.ypp" +#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 2606 "parser.cpp" break; case 109: // expr_binary: expr "&&" expr -#line 543 "parser.ypp" +#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 2612 "parser.cpp" break; case 110: // expr_binary: expr "==" expr -#line 545 "parser.ypp" +#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 2618 "parser.cpp" break; case 111: // expr_binary: expr "!=" expr -#line 547 "parser.ypp" +#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 2624 "parser.cpp" break; case 112: // expr_binary: expr "<=" expr -#line 549 "parser.ypp" +#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 2630 "parser.cpp" break; case 113: // expr_binary: expr ">=" expr -#line 551 "parser.ypp" +#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 2636 "parser.cpp" break; case 114: // expr_binary: expr "<" expr -#line 553 "parser.ypp" +#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 2642 "parser.cpp" break; case 115: // expr_binary: expr ">" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2648 "parser.cpp" break; case 116: // expr_binary: expr "|" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2654 "parser.cpp" break; case 117: // expr_binary: expr "&" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2660 "parser.cpp" break; case 118: // expr_binary: expr "^" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2666 "parser.cpp" break; case 119: // expr_binary: expr "<<" expr -#line 563 "parser.ypp" +#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 2672 "parser.cpp" break; case 120: // expr_binary: expr ">>" expr -#line 565 "parser.ypp" +#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 2678 "parser.cpp" break; case 121: // expr_binary: expr "+" expr -#line 567 "parser.ypp" +#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 2684 "parser.cpp" break; case 122: // expr_binary: expr "-" expr -#line 569 "parser.ypp" +#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 2690 "parser.cpp" break; case 123: // expr_binary: expr "*" expr -#line 571 "parser.ypp" +#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 2696 "parser.cpp" break; case 124: // expr_binary: expr "/" expr -#line 573 "parser.ypp" +#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 2702 "parser.cpp" break; case 125: // expr_binary: expr "%" expr -#line 575 "parser.ypp" +#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 2708 "parser.cpp" break; case 126: // expr_primitive: expr_complement -#line 579 "parser.ypp" +#line 587 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2714 "parser.cpp" break; case 127: // expr_primitive: expr_not -#line 580 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2720 "parser.cpp" break; case 128: // expr_primitive: expr_call -#line 581 "parser.ypp" +#line 589 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2726 "parser.cpp" break; case 129: // expr_primitive: expr_method -#line 582 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2732 "parser.cpp" break; case 130: // expr_primitive: expr_add_array -#line 583 "parser.ypp" +#line 591 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2738 "parser.cpp" break; case 131: // expr_primitive: expr_reference -#line 584 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2744 "parser.cpp" break; case 132: // expr_primitive: expr_array -#line 585 "parser.ypp" +#line 593 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2750 "parser.cpp" break; case 133: // expr_primitive: expr_field -#line 586 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2756 "parser.cpp" break; case 134: // expr_primitive: expr_size -#line 587 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2762 "parser.cpp" break; case 135: // expr_primitive: expr_paren -#line 588 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2768 "parser.cpp" break; case 136: // expr_primitive: expr_thisthread -#line 589 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2774 "parser.cpp" break; case 137: // expr_primitive: expr_empty_array -#line 590 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2780 "parser.cpp" break; case 138: // expr_primitive: expr_undefined -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2786 "parser.cpp" break; case 139: // expr_primitive: expr_game -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2792 "parser.cpp" break; case 140: // expr_primitive: expr_self -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2798 "parser.cpp" break; case 141: // expr_primitive: expr_anim -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2804 "parser.cpp" break; case 142: // expr_primitive: expr_level -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2810 "parser.cpp" break; case 143: // expr_primitive: expr_animation -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2816 "parser.cpp" break; case 144: // expr_primitive: expr_animtree -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2822 "parser.cpp" break; case 145: // expr_primitive: expr_identifier -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2828 "parser.cpp" break; case 146: // expr_primitive: expr_istring -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2834 "parser.cpp" break; case 147: // expr_primitive: expr_string -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2840 "parser.cpp" break; case 148: // expr_primitive: expr_color -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2846 "parser.cpp" break; case 149: // expr_primitive: expr_vector -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2852 "parser.cpp" break; case 150: // expr_primitive: expr_float -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2858 "parser.cpp" break; case 151: // expr_primitive: expr_integer -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2864 "parser.cpp" break; case 152: // expr_primitive: expr_false -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2870 "parser.cpp" break; case 153: // expr_primitive: expr_true -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2876 "parser.cpp" break; case 154: // expr_complement: "~" expr -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2882 "parser.cpp" break; case 155: // expr_not: "!" expr -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2888 "parser.cpp" break; case 156: // expr_call: expr_function -#line 620 "parser.ypp" +#line 628 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2894 "parser.cpp" break; case 157: // expr_call: expr_pointer -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2900 "parser.cpp" break; case 158: // expr_method: expr_object expr_function -#line 624 "parser.ypp" +#line 632 "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 2906 "parser.cpp" break; case 159: // expr_method: expr_object expr_pointer -#line 625 "parser.ypp" +#line 633 "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 2912 "parser.cpp" break; case 160: // expr_function: expr_identifier "(" expr_arguments ")" -#line 630 "parser.ypp" +#line 638 "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 2918 "parser.cpp" break; case 161: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 632 "parser.ypp" +#line 640 "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 2924 "parser.cpp" break; case 162: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 634 "parser.ypp" +#line 642 "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 2930 "parser.cpp" break; case 163: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 636 "parser.ypp" +#line 644 "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 2936 "parser.cpp" break; case 164: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 638 "parser.ypp" +#line 646 "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 2942 "parser.cpp" break; case 165: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 648 "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 2948 "parser.cpp" break; case 166: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 645 "parser.ypp" +#line 653 "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 2954 "parser.cpp" break; case 167: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 647 "parser.ypp" +#line 655 "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 2960 "parser.cpp" break; case 168: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 649 "parser.ypp" +#line 657 "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 2966 "parser.cpp" break; case 169: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 651 "parser.ypp" +#line 659 "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 2972 "parser.cpp" break; case 170: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 656 "parser.ypp" +#line 664 "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 2978 "parser.cpp" break; case 171: // expr_parameters: expr_parameters "," expr_identifier -#line 661 "parser.ypp" +#line 669 "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 2984 "parser.cpp" break; case 172: // expr_parameters: expr_identifier -#line 663 "parser.ypp" +#line 671 "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 2990 "parser.cpp" break; case 173: // expr_parameters: %empty -#line 665 "parser.ypp" +#line 673 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 2996 "parser.cpp" break; case 174: // expr_arguments: expr_arguments_no_empty -#line 670 "parser.ypp" +#line 678 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3002 "parser.cpp" break; case 175: // expr_arguments: %empty -#line 672 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3008 "parser.cpp" break; case 176: // expr_arguments_no_empty: expr_arguments "," expr -#line 677 "parser.ypp" +#line 685 "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 3014 "parser.cpp" break; case 177: // expr_arguments_no_empty: expr -#line 679 "parser.ypp" +#line 687 "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 3020 "parser.cpp" break; case 178: // expr_reference: "::" expr_identifier -#line 684 "parser.ypp" +#line 692 "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 3026 "parser.cpp" break; case 179: // expr_reference: expr_path "::" expr_identifier -#line 686 "parser.ypp" +#line 694 "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 3032 "parser.cpp" break; case 180: // expr_array: expr_object "[" expr "]" -#line 691 "parser.ypp" +#line 699 "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 3038 "parser.cpp" break; case 181: // expr_field: expr_object "." expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3044 "parser.cpp" break; case 182: // expr_field: expr_object "field" -#line 698 "parser.ypp" +#line 706 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3050 "parser.cpp" break; case 183: // expr_size: expr_object ".size" -#line 703 "parser.ypp" +#line 711 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3056 "parser.cpp" break; case 184: // expr_paren: "(" expr ")" -#line 708 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3062 "parser.cpp" break; case 185: // expr_object: expr_call -#line 712 "parser.ypp" +#line 720 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3068 "parser.cpp" break; case 186: // expr_object: expr_method -#line 713 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3074 "parser.cpp" break; case 187: // expr_object: expr_array -#line 714 "parser.ypp" +#line 722 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3080 "parser.cpp" break; case 188: // expr_object: expr_field -#line 715 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3086 "parser.cpp" break; case 189: // expr_object: expr_game -#line 716 "parser.ypp" +#line 724 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3092 "parser.cpp" break; case 190: // expr_object: expr_self -#line 717 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3098 "parser.cpp" break; case 191: // expr_object: expr_anim -#line 718 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3104 "parser.cpp" break; case 192: // expr_object: expr_level -#line 719 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3110 "parser.cpp" break; case 193: // expr_object: expr_identifier -#line 720 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3116 "parser.cpp" break; case 194: // expr_thisthread: "thisthread" -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3122 "parser.cpp" break; case 195: // expr_empty_array: "[" "]" -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3128 "parser.cpp" break; case 196: // expr_undefined: "undefined" -#line 735 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3134 "parser.cpp" break; case 197: // expr_game: "game" -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3140 "parser.cpp" break; case 198: // expr_self: "self" -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3146 "parser.cpp" break; case 199: // expr_anim: "anim" -#line 750 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3152 "parser.cpp" break; case 200: // expr_level: "level" -#line 755 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3158 "parser.cpp" break; case 201: // expr_animation: "%" "identifier" -#line 760 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3164 "parser.cpp" break; case 202: // expr_animtree: "#animtree" -#line 765 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3170 "parser.cpp" break; case 203: // expr_identifier: "identifier" -#line 770 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3176 "parser.cpp" break; case 204: // expr_path: "path" -#line 775 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3182 "parser.cpp" break; case 205: // expr_path: expr_identifier -#line 777 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3188 "parser.cpp" break; case 206: // expr_istring: "localized string" -#line 782 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3194 "parser.cpp" break; case 207: // expr_string: "string literal" -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3200 "parser.cpp" break; case 208: // expr_color: "color" -#line 792 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3206 "parser.cpp" break; case 209: // expr_vector: "(" expr "," expr "," expr ")" -#line 797 "parser.ypp" +#line 805 "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 3212 "parser.cpp" break; case 210: // expr_float: "-" "float" -#line 802 "parser.ypp" +#line 810 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3218 "parser.cpp" break; case 211: // expr_float: "float" -#line 804 "parser.ypp" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3224 "parser.cpp" break; case 212: // expr_integer: "-" "integer" -#line 809 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3230 "parser.cpp" break; case 213: // expr_integer: "integer" -#line 811 "parser.ypp" +#line 819 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3236 "parser.cpp" break; case 214: // expr_false: "false" -#line 816 "parser.ypp" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3242 "parser.cpp" break; case 215: // expr_true: "true" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3248 "parser.cpp" break; @@ -3432,7 +3432,8 @@ namespace xsk { namespace gsc { namespace iw7 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", "default", "break", @@ -3735,49 +3736,49 @@ namespace xsk { namespace gsc { namespace iw7 { const short parser::yypact_[] = { - 16, -260, -260, -74, -74, -14, -260, 26, 16, -260, - -260, -260, -260, -260, -260, -33, -260, -260, -25, 4, - -43, -260, -260, -260, -260, -24, 1124, -260, -260, -260, - 21, -17, -260, -260, -40, -5, -260, 22, -260, -260, - -260, -260, -260, -260, -260, 1124, 994, -24, 1124, 1124, - -35, 11, -260, -260, -260, -260, 2038, -260, -260, -260, - -260, -260, 473, 541, -260, -260, -260, -260, 575, 624, - -260, -260, 653, -260, -260, -260, 677, 685, 1032, 1097, - -260, -260, 36, 24, -260, -260, -260, -260, -260, -260, - -260, -260, 23, 57, -24, 68, 69, 70, 84, 99, - 87, 93, 1324, 994, -260, 2121, 102, 107, -260, -260, - -260, -260, -260, -260, -260, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 1124, 1124, 1124, -260, 1189, -24, -260, -260, -260, - 114, 108, 1124, -24, -260, 783, -260, -260, 1124, 1124, - -24, 1124, 1124, -24, 1124, -260, 1124, 1768, 1124, -260, - 2003, 116, 116, 2152, 1180, 158, 158, 77, 77, 77, - 77, 2162, 989, 1115, 43, 43, -260, -260, -260, 1808, - -260, -24, 7, -260, 115, 829, 1124, 113, 126, 967, - 128, 130, 132, 133, -13, 125, 131, 134, 1059, 135, - 140, 149, -260, 148, 392, 392, -260, -260, -260, 875, + 8, -260, -260, -69, -69, -3, -260, 26, 8, -260, + -260, -260, -260, -260, -260, -41, -260, -260, -4, -2, + -39, -260, -260, -260, -260, -33, 1116, -260, -260, -260, + 14, -25, -260, -260, -48, -13, -260, 20, -260, -260, + -260, -260, -260, -260, -260, 1116, 986, -33, 1116, 1116, + -87, -29, -260, -260, -260, -260, 2030, -260, -260, -260, + -260, -260, 465, 533, -260, -260, -260, -260, 567, 616, + -260, -260, 645, -260, -260, -260, 669, 677, 1024, 1089, + -260, -260, 28, 17, -260, -260, -260, -260, -260, -260, + -260, -260, 51, 48, -33, 60, 70, 72, 83, 91, + 81, 96, 1316, 986, -260, 2113, 45, 99, -260, -260, + -260, -260, -260, -260, -260, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 1116, 1116, 1116, -260, 1181, -33, -260, -260, -260, + 106, 100, 1116, -33, -260, 775, -260, -260, 1116, 1116, + -33, 1116, 1116, -33, 1116, -260, 1116, 1760, 1116, -260, + 1995, 108, 108, 2144, 1172, 150, 150, 69, 69, 69, + 69, 2154, 981, 1107, 35, 35, -260, -260, -260, 1800, + -260, -33, -1, -260, 107, 821, 1116, 105, 118, 959, + 120, 122, 124, 125, -21, 117, 123, 126, 1051, 127, + 132, 141, -260, 140, 384, 384, -260, -260, -260, 867, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, - -260, -260, -260, 144, 153, 154, 155, 157, -260, -260, - 1238, -260, -260, -260, -260, 2, 1848, 47, 169, 1888, - 48, 174, 1928, 1967, 178, 2121, 1124, -260, 115, -260, - 1124, -260, 921, 2073, -260, 1124, 160, 1124, -1, -24, - 1124, 141, 177, 186, -260, -260, -260, -260, 2108, -260, - 1124, 1124, 1124, -260, -260, 30, 30, -260, -260, -260, - -260, -260, -260, -260, 194, 196, 203, 204, -260, -260, - 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, 1124, - 1124, 200, -260, 1124, 202, -260, 1124, 205, 1124, 208, - 2121, 49, -260, -260, 1490, 209, 1524, 201, -260, -260, - -260, 1287, 3, 1558, -260, -260, -260, 51, 55, 1768, - 1124, 1124, 1124, 1124, 2121, 2121, 2121, 2121, 2121, 2121, - 2121, 2121, 2121, 2121, 2121, 214, 61, 215, 65, 216, - 1592, 1124, -260, 967, 1124, 967, 1124, 1124, -24, 57, - 207, 210, 1626, 1368, 1412, 1456, 1124, -260, 1124, -260, - 1124, -260, 67, 245, 1660, -260, 2121, 211, 1694, 246, - -260, -260, -260, 213, 217, 1124, 219, 1124, 221, 1124, - 95, 97, 121, -260, 967, 222, -1, 967, 1124, -260, - -260, 232, -260, 235, -260, 236, -260, -260, -260, -260, - -260, 238, -260, 1728, 231, 234, 237, 967, 967, -260, + -260, -260, -260, 136, 145, 146, 147, 149, -260, -260, + 1230, -260, -260, -260, -260, -6, 1840, 39, 161, 1880, + 40, 166, 1920, 1959, 170, 2113, 1116, -260, 107, -260, + 1116, -260, 913, 2065, -260, 1116, 152, 1116, -9, -33, + 1116, 133, 169, 177, -260, -260, -260, -260, 2100, -260, + 1116, 1116, 1116, -260, -260, 22, 22, -260, -260, -260, + -260, -260, -260, -260, 187, 188, 195, 196, -260, -260, + 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, 1116, + 1116, 194, -260, 1116, 197, -260, 1116, 198, 1116, 200, + 2113, 41, -260, -260, 1482, 201, 1516, 199, -260, -260, + -260, 1279, -5, 1550, -260, -260, -260, 43, 47, 1760, + 1116, 1116, 1116, 1116, 2113, 2113, 2113, 2113, 2113, 2113, + 2113, 2113, 2113, 2113, 2113, 206, 53, 207, 57, 208, + 1584, 1116, -260, 959, 1116, 959, 1116, 1116, -33, 48, + 202, 203, 1618, 1360, 1404, 1448, 1116, -260, 1116, -260, + 1116, -260, 59, 224, 1652, -260, 2113, 205, 1686, 232, + -260, -260, -260, 209, 211, 1116, 213, 1116, 214, 1116, + 87, 89, 113, -260, 959, 215, -9, 959, 1116, -260, + -260, 227, -260, 228, -260, 230, -260, -260, -260, -260, + -260, 235, -260, 1720, 223, 229, 231, 959, 959, -260, -260, -260, -260, -260 }; @@ -3833,14 +3834,14 @@ namespace xsk { namespace gsc { namespace iw7 { const short parser::yypgoto_[] = { - -260, -260, -260, 281, 284, 288, -260, -260, -260, -172, + -260, -260, -260, 259, 281, 288, -260, -260, -260, -172, -260, -91, 112, -108, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, -260, 185, -260, -259, -257, -250, -260, -260, -260, -260, -260, -82, -72, -66, -58, -260, -260, 321, -45, -260, -37, 192, -260, -260, 240, -260, -260, -260, 253, 327, 355, 365, -260, -260, - 0, 9, -260, -15, -260, -260, -260, 105, -260, -260 + 0, 9, -260, -15, -260, -260, -260, 129, -260, -260 }; const short @@ -3860,21 +3861,21 @@ namespace xsk { namespace gsc { namespace iw7 { parser::yytable_[] = { 15, 107, 146, 17, 17, 30, 138, 95, 15, 328, - 25, 329, 18, 19, 139, 16, 6, 266, 330, 1, - 2, 3, 4, 5, 367, 32, 21, 93, 27, 20, + 25, 329, 18, 19, 139, 111, 112, 266, 330, 1, + 2, 3, 4, 5, 367, 32, 21, 93, 16, 6, 34, 35, 94, 37, 96, 99, 26, 288, 41, 42, - 43, 44, 98, 97, 100, 142, 203, 108, 29, 16, - 6, 259, 368, -205, 204, 205, 158, 28, 107, 111, - 112, 34, 35, 236, 37, 92, 6, -193, -193, 101, - -193, 271, 140, 237, -193, 143, 144, 135, 29, 142, + 43, 44, 98, 97, 100, 142, 203, 108, 20, 16, + 6, 259, 368, -205, 204, 205, 158, 27, 107, 28, + 29, 34, 35, 236, 37, 6, 92, -193, -193, 113, + -193, 271, 140, 237, -193, 101, 143, 135, 29, 142, 136, 141, 55, -193, 16, 6, -193, -205, 16, 6, 288, 312, 315, 362, 147, 370, 158, 158, 158, 371, - 158, 113, 145, 236, 158, 377, 6, 236, 238, 379, - 158, 403, 149, 237, 158, 148, 158, 237, 137, 16, - 6, 150, 283, 283, -193, -193, -193, 236, 131, 132, - 133, 151, 284, 284, 116, 117, 180, 237, 153, 416, - 154, 417, 152, 184, 158, 245, 158, 328, 238, 329, - 248, 158, 238, 251, 141, 159, 330, 142, 260, 181, + 158, 145, 158, 236, 158, 377, 6, 236, 238, 379, + 158, 403, 144, 237, 158, 148, 158, 237, 137, 16, + 6, 149, 283, 283, -193, -193, -193, 236, 131, 132, + 133, 150, 284, 284, 116, 117, 180, 237, 151, 416, + 153, 417, 152, 184, 158, 245, 158, 328, 238, 329, + 248, 154, 238, 251, 141, 159, 330, 142, 260, 181, 129, 130, 131, 132, 133, 418, 264, 238, 238, 265, 158, 267, 238, 268, 138, 269, 270, 274, 325, 272, 236, 258, 139, 280, 275, 245, 283, 276, 279, 245, @@ -3882,16 +3883,16 @@ namespace xsk { namespace gsc { namespace iw7 { 130, 131, 132, 133, 245, 245, 290, 291, 292, 245, 293, 56, 313, 141, 141, 116, 117, 316, 141, 138, 138, 122, 123, 124, 125, 238, 319, 139, 139, 334, - 102, 238, 419, 109, 110, 422, 112, 340, 335, 341, - 140, 129, 130, 131, 132, 133, 342, 343, 355, 141, - 357, 361, 364, 359, 366, 432, 433, 376, 378, 380, - 391, 404, 245, 392, 406, 138, 409, 408, 245, 332, - 410, 141, 412, 139, 414, 420, 424, 141, 390, 425, - 426, 236, 427, 236, 429, 140, 140, 430, 157, 22, - 431, 237, 23, 237, 141, 141, 24, 262, 421, 273, + 102, 238, 419, 109, 110, 422, 112, 335, 340, 341, + 140, 129, 130, 131, 132, 133, 342, 343, 404, 141, + 355, 361, 364, 357, 359, 432, 433, 376, 378, 380, + 366, 408, 245, 391, 392, 138, 406, 22, 245, 332, + 409, 141, 410, 139, 412, 414, 420, 141, 390, 424, + 425, 236, 426, 236, 429, 140, 140, 427, 157, 23, + 430, 237, 431, 237, 141, 141, 24, 262, 421, 0, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 0, - 179, 0, 236, 0, 283, 236, 238, 0, 238, 0, + 179, 0, 236, 273, 283, 236, 238, 0, 238, 0, 0, 140, 237, 246, 284, 237, 249, 239, 0, 252, 141, 253, 0, 255, 0, 236, 236, 0, 0, 0, 411, 0, 413, 0, 415, 237, 237, 0, 0, 0, @@ -4089,39 +4090,39 @@ namespace xsk { namespace gsc { namespace iw7 { const short parser::yycheck_[] = { - 0, 46, 93, 3, 4, 20, 72, 47, 8, 268, - 43, 268, 3, 4, 72, 89, 90, 189, 268, 3, - 4, 5, 6, 7, 21, 25, 0, 44, 53, 43, - 31, 32, 49, 34, 34, 35, 69, 209, 39, 40, - 41, 42, 47, 34, 35, 43, 47, 47, 91, 89, - 90, 44, 49, 51, 55, 56, 49, 53, 103, 94, - 95, 31, 32, 145, 34, 44, 90, 31, 32, 47, - 34, 84, 72, 145, 38, 51, 53, 47, 91, 43, - 50, 72, 95, 47, 89, 90, 50, 51, 89, 90, - 262, 44, 44, 44, 94, 44, 49, 49, 49, 44, - 49, 90, 45, 185, 49, 44, 90, 189, 145, 44, - 49, 44, 43, 185, 49, 47, 49, 189, 88, 89, - 90, 51, 204, 205, 88, 89, 90, 209, 85, 86, - 87, 47, 204, 205, 57, 58, 136, 209, 51, 44, - 47, 44, 43, 143, 49, 145, 49, 406, 185, 406, - 150, 49, 189, 153, 145, 48, 406, 43, 43, 51, - 83, 84, 85, 86, 87, 44, 53, 204, 205, 43, - 49, 43, 209, 43, 240, 43, 43, 52, 18, 194, - 262, 181, 240, 43, 53, 185, 268, 53, 53, 189, - 262, 363, 43, 365, 185, 47, 268, 53, 189, 83, - 84, 85, 86, 87, 204, 205, 53, 53, 53, 209, - 53, 26, 43, 204, 205, 57, 58, 43, 209, 285, - 286, 63, 64, 65, 66, 262, 48, 285, 286, 52, - 45, 268, 404, 48, 49, 407, 95, 43, 52, 43, - 240, 83, 84, 85, 86, 87, 43, 43, 48, 240, - 48, 43, 43, 48, 53, 427, 428, 43, 43, 43, - 53, 16, 262, 53, 53, 331, 53, 21, 268, 269, - 53, 262, 53, 331, 53, 53, 44, 268, 369, 44, - 44, 363, 44, 365, 53, 285, 286, 53, 103, 8, - 53, 363, 8, 365, 285, 286, 8, 185, 406, 194, + 0, 46, 93, 3, 4, 20, 72, 55, 8, 268, + 51, 268, 3, 4, 72, 102, 103, 189, 268, 11, + 12, 13, 14, 15, 29, 25, 0, 52, 97, 98, + 39, 40, 57, 42, 34, 35, 77, 209, 47, 48, + 49, 50, 55, 34, 35, 51, 55, 47, 51, 97, + 98, 52, 57, 59, 63, 64, 57, 61, 103, 61, + 99, 39, 40, 145, 42, 98, 52, 39, 40, 98, + 42, 92, 72, 145, 46, 55, 59, 55, 99, 51, + 58, 72, 103, 55, 97, 98, 58, 59, 97, 98, + 262, 52, 52, 52, 94, 52, 57, 57, 57, 52, + 57, 53, 57, 185, 57, 52, 98, 189, 145, 52, + 57, 52, 61, 185, 57, 55, 57, 189, 96, 97, + 98, 51, 204, 205, 96, 97, 98, 209, 93, 94, + 95, 59, 204, 205, 65, 66, 136, 209, 55, 52, + 59, 52, 51, 143, 57, 145, 57, 406, 185, 406, + 150, 55, 189, 153, 145, 56, 406, 51, 51, 59, + 91, 92, 93, 94, 95, 52, 61, 204, 205, 51, + 57, 51, 209, 51, 240, 51, 51, 60, 26, 194, + 262, 181, 240, 51, 61, 185, 268, 61, 61, 189, + 262, 363, 51, 365, 185, 55, 268, 61, 189, 91, + 92, 93, 94, 95, 204, 205, 61, 61, 61, 209, + 61, 26, 51, 204, 205, 65, 66, 51, 209, 285, + 286, 71, 72, 73, 74, 262, 56, 285, 286, 60, + 45, 268, 404, 48, 49, 407, 103, 60, 51, 51, + 240, 91, 92, 93, 94, 95, 51, 51, 24, 240, + 56, 51, 51, 56, 56, 427, 428, 51, 51, 51, + 61, 29, 262, 61, 61, 331, 61, 8, 268, 269, + 61, 262, 61, 331, 61, 61, 61, 268, 369, 52, + 52, 363, 52, 365, 61, 285, 286, 52, 103, 8, + 61, 363, 61, 365, 285, 286, 8, 185, 406, -1, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, - 135, -1, 404, -1, 406, 407, 363, -1, 365, -1, + 135, -1, 404, 194, 406, 407, 363, -1, 365, -1, -1, 331, 404, 148, 406, 407, 151, 145, -1, 154, 331, 156, -1, 158, -1, 427, 428, -1, -1, -1, 395, -1, 397, -1, 399, 427, 428, -1, -1, -1, @@ -4131,265 +4132,265 @@ namespace xsk { namespace gsc { namespace iw7 { 427, 428, -1, -1, -1, -1, 204, 205, 145, -1, -1, 209, -1, -1, 404, -1, 406, 407, -1, -1, -1, -1, -1, 404, -1, 406, 407, -1, -1, -1, - -1, -1, -1, 31, 32, 185, 34, 427, 428, 189, - -1, 39, 40, 41, 42, -1, 427, 428, 185, 47, + -1, -1, -1, 39, 40, 185, 42, 427, 428, 189, + -1, 47, 48, 49, 50, -1, 427, 428, 185, 55, -1, 256, 189, -1, 204, 205, -1, -1, -1, 209, 265, -1, 267, -1, 262, 270, -1, 204, 205, -1, 268, -1, 209, 142, -1, -1, -1, 282, -1, -1, 149, -1, 145, 152, -1, -1, -1, -1, -1, -1, - -1, 89, 90, -1, -1, 300, 301, 302, 303, 304, + -1, 97, 98, -1, -1, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, -1, -1, -1, -1, - 145, -1, 262, 318, 31, 32, -1, 34, 268, -1, - 145, 38, 185, -1, -1, 262, 189, -1, -1, -1, - 47, 268, -1, 50, -1, 340, 341, 342, 343, -1, + 145, -1, 262, 318, 39, 40, -1, 42, 268, -1, + 145, 46, 185, -1, -1, 262, 189, -1, -1, -1, + 55, 268, -1, 58, -1, 340, 341, 342, 343, -1, -1, 204, 205, -1, -1, -1, 209, -1, -1, -1, 185, -1, -1, -1, 189, -1, -1, -1, -1, 364, 185, 366, 367, -1, 189, 363, -1, 365, -1, 204, - 205, 88, 89, 90, 209, -1, -1, -1, -1, 204, - 205, -1, 31, 32, 209, 34, -1, -1, -1, 38, - -1, 260, -1, -1, -1, -1, -1, -1, 47, 262, - -1, 50, -1, 408, -1, 268, 404, -1, 406, 407, - -1, 280, 281, 363, -1, 365, 31, 32, -1, 34, - -1, -1, -1, 38, -1, -1, 363, 262, 365, 427, - 428, -1, 47, 268, -1, 50, -1, 262, -1, 88, - 89, 90, -1, 268, 313, -1, -1, 316, -1, -1, + 205, 96, 97, 98, 209, -1, -1, -1, -1, 204, + 205, -1, 39, 40, 209, 42, -1, -1, -1, 46, + -1, 260, -1, -1, -1, -1, -1, -1, 55, 262, + -1, 58, -1, 408, -1, 268, 404, -1, 406, 407, + -1, 280, 281, 363, -1, 365, 39, 40, -1, 42, + -1, -1, -1, 46, -1, -1, 363, 262, 365, 427, + 428, -1, 55, 268, -1, 58, -1, 262, -1, 96, + 97, 98, -1, 268, 313, -1, -1, 316, -1, -1, -1, -1, -1, -1, 404, -1, 406, 407, -1, -1, - -1, -1, -1, -1, -1, 31, 32, 404, 34, 406, - 407, -1, 38, 88, 89, 90, -1, 427, 428, -1, - -1, 47, -1, -1, 50, -1, -1, -1, -1, -1, - 427, 428, 361, -1, 31, 32, -1, 34, -1, -1, - 363, 38, 365, -1, -1, -1, -1, 376, -1, 378, - 47, 380, -1, 50, -1, -1, -1, -1, 31, 32, - -1, 34, 88, 89, 90, 38, 31, 32, 363, 34, - 365, -1, -1, 38, 47, -1, -1, 50, 363, -1, - 365, 404, 47, 406, 407, 50, -1, -1, -1, -1, - -1, 88, 89, 90, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 39, 40, 404, 42, 406, + 407, -1, 46, 96, 97, 98, -1, 427, 428, -1, + -1, 55, -1, -1, 58, -1, -1, -1, -1, -1, + 427, 428, 361, -1, 39, 40, -1, 42, -1, -1, + 363, 46, 365, -1, -1, -1, -1, 376, -1, 378, + 55, 380, -1, 58, -1, -1, -1, -1, 39, 40, + -1, 42, 96, 97, 98, 46, 39, 40, 363, 42, + 365, -1, -1, 46, 55, -1, -1, 58, 363, -1, + 365, 404, 55, 406, 407, 58, -1, -1, -1, -1, + -1, 96, 97, 98, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 427, 428, -1, -1, -1, 404, - -1, 406, 407, -1, -1, 88, 89, 90, -1, 404, - -1, 406, 407, 88, 89, 90, -1, -1, -1, -1, - -1, -1, 427, 428, -1, -1, 3, -1, -1, -1, - -1, -1, 427, 428, 11, -1, -1, 14, 15, -1, - 17, 18, 19, 20, -1, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, -1, 34, -1, -1, - -1, -1, 39, 40, 41, 42, -1, -1, 45, 46, - 47, -1, 3, 4, -1, -1, -1, -1, 55, 56, - 11, -1, -1, 14, 15, -1, 17, 18, 19, 20, - -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, -1, 34, -1, -1, -1, -1, 39, 40, - 41, 42, 89, 90, 45, -1, 47, -1, 3, -1, - -1, -1, -1, -1, 55, 56, 11, -1, -1, 14, - 15, -1, 17, 18, 19, 20, -1, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, - -1, -1, -1, -1, 39, 40, 41, 42, 89, 90, - 45, 46, 47, -1, 3, 4, -1, -1, -1, -1, - 55, 56, 11, -1, -1, 14, 15, -1, 17, 18, - 19, 20, -1, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, -1, 34, -1, -1, -1, -1, - 39, 40, 41, 42, 89, 90, 45, -1, 47, -1, - 3, -1, -1, -1, -1, -1, 55, 56, 11, -1, - -1, 14, 15, -1, 17, 18, 19, 20, -1, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - -1, 34, 8, -1, -1, -1, 39, 40, 41, 42, - 89, 90, 45, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, 56, -1, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, - -1, 47, 48, -1, -1, 51, 57, 58, -1, -1, - 61, 62, 63, 64, 65, 66, 89, 90, -1, -1, - -1, 67, 68, 31, 32, -1, 34, 8, -1, -1, - 38, -1, 83, 84, 85, 86, 87, -1, 84, 47, - -1, 87, 50, 89, 90, 91, 92, 93, 94, 95, - 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, - 41, 42, 43, -1, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, - 88, 89, 90, -1, -1, -1, 67, 68, 31, 32, - -1, 34, 8, -1, -1, 38, -1, -1, -1, -1, - -1, -1, -1, 84, 47, -1, 87, 50, 89, 90, - 91, 92, 93, 94, 95, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, - -1, 47, 57, 58, -1, 51, 61, 62, 63, 64, - 65, 66, -1, -1, -1, 88, 89, 90, -1, -1, - -1, 67, 68, -1, -1, -1, 81, 8, 83, 84, - 85, 86, 87, -1, -1, -1, -1, -1, 84, -1, - -1, 87, -1, 89, 90, 91, 92, 93, 94, 95, - 31, 32, 33, 34, 35, 36, 37, -1, 39, 40, - 41, 42, 43, -1, -1, -1, 47, 57, 58, -1, - 51, 61, 62, 63, 64, 65, 66, 9, 10, -1, - 12, 13, -1, -1, -1, -1, 67, 68, -1, -1, - 80, 81, 82, 83, 84, 85, 86, 87, -1, 31, - 32, -1, 34, 84, -1, -1, 87, -1, 89, 90, - 91, 92, 93, 94, 95, 47, -1, -1, 50, -1, - -1, -1, -1, 55, 56, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 31, 32, - -1, 34, -1, -1, -1, -1, 88, 89, 90, -1, - -1, -1, -1, -1, 47, -1, -1, 50, -1, -1, - -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, -1, 44, -1, - -1, -1, -1, 49, -1, 88, 89, 90, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 44, -1, -1, -1, -1, 49, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 44, -1, -1, -1, - -1, 49, -1, -1, -1, -1, 54, -1, -1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -1, + -1, 406, 407, -1, -1, 96, 97, 98, -1, 404, + -1, 406, 407, 96, 97, 98, -1, -1, -1, -1, + -1, -1, 427, 428, -1, -1, 11, -1, -1, -1, + -1, -1, 427, 428, 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, -1, 47, 48, 49, 50, -1, -1, 53, 54, + 55, -1, 11, 12, -1, -1, -1, -1, 63, 64, + 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, -1, 47, 48, + 49, 50, 97, 98, 53, -1, 55, -1, 11, -1, + -1, -1, -1, -1, 63, 64, 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, -1, 47, 48, 49, 50, 97, 98, + 53, 54, 55, -1, 11, 12, -1, -1, -1, -1, + 63, 64, 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, -1, + 47, 48, 49, 50, 97, 98, 53, -1, 55, -1, + 11, -1, -1, -1, -1, -1, 63, 64, 19, -1, + -1, 22, 23, -1, 25, 26, 27, 28, -1, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + -1, 42, 16, -1, -1, -1, 47, 48, 49, 50, + 97, 98, 53, -1, 55, -1, -1, -1, -1, -1, + -1, -1, 63, 64, -1, 39, 40, 41, 42, 43, + 44, 45, -1, 47, 48, 49, 50, 51, -1, -1, + -1, 55, 56, -1, -1, 59, 65, 66, -1, -1, + 69, 70, 71, 72, 73, 74, 97, 98, -1, -1, + -1, 75, 76, 39, 40, -1, 42, 16, -1, -1, + 46, -1, 91, 92, 93, 94, 95, -1, 92, 55, + -1, 95, 58, 97, 98, 99, 100, 101, 102, 103, + 39, 40, 41, 42, 43, 44, 45, -1, 47, 48, + 49, 50, 51, -1, -1, -1, 55, -1, -1, -1, + 59, -1, 61, -1, -1, -1, -1, -1, -1, -1, + 96, 97, 98, -1, -1, -1, 75, 76, 39, 40, + -1, 42, 16, -1, -1, 46, -1, -1, -1, -1, + -1, -1, -1, 92, 55, -1, 95, 58, 97, 98, + 99, 100, 101, 102, 103, 39, 40, 41, 42, 43, + 44, 45, -1, 47, 48, 49, 50, 51, -1, -1, + -1, 55, 65, 66, -1, 59, 69, 70, 71, 72, + 73, 74, -1, -1, -1, 96, 97, 98, -1, -1, + -1, 75, 76, -1, -1, -1, 89, 16, 91, 92, + 93, 94, 95, -1, -1, -1, -1, -1, 92, -1, + -1, 95, -1, 97, 98, 99, 100, 101, 102, 103, + 39, 40, 41, 42, 43, 44, 45, -1, 47, 48, + 49, 50, 51, -1, -1, -1, 55, 65, 66, -1, + 59, 69, 70, 71, 72, 73, 74, 17, 18, -1, + 20, 21, -1, -1, -1, -1, 75, 76, -1, -1, + 88, 89, 90, 91, 92, 93, 94, 95, -1, 39, + 40, -1, 42, 92, -1, -1, 95, -1, 97, 98, + 99, 100, 101, 102, 103, 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, 39, 40, + -1, 42, -1, -1, -1, -1, 96, 97, 98, -1, + -1, -1, -1, -1, 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, 52, -1, + -1, -1, -1, 57, -1, 96, 97, 98, 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, - -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 44, -1, -1, -1, -1, 49, -1, -1, -1, -1, - 54, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 44, -1, 80, 81, 82, 83, - 84, 85, 86, 87, 54, -1, -1, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 44, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 54, -1, -1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, -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, - 44, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 54, -1, -1, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 44, -1, 80, 81, 82, 83, - 84, 85, 86, 87, 54, -1, -1, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 44, -1, - 80, 81, 82, 83, 84, 85, 86, 87, 54, -1, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 44, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 48, -1, -1, -1, - -1, -1, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 49, -1, -1, -1, - -1, 54, -1, -1, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 80, 81, 82, - 83, 84, 85, 86, 87, 52, -1, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 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, 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, 80, 81, 82, 83, 84, 85, 86, - 87, 53, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 80, 81, - 82, 83, 84, 85, 86, 87, 53, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + -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, 80, 81, 82, 83, 84, 85, 86, - 87, 53, 54, -1, -1, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 54, -1, -1, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 80, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, - -1, 80, 81, 82, 83, 84, 85, 86, 87, 57, - 58, -1, 60, 61, 62, 63, 64, 65, 66, 57, - 58, -1, -1, 61, 62, 63, 64, 65, 66, -1, - -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, - -1, -1, -1, 81, 82, 83, 84, 85, 86, 87 + -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, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, - 109, 110, 111, 112, 113, 175, 89, 175, 176, 176, - 43, 0, 108, 109, 110, 43, 69, 53, 53, 91, - 178, 157, 175, 8, 31, 32, 33, 34, 35, 36, - 37, 39, 40, 41, 42, 43, 47, 51, 67, 68, - 84, 87, 92, 93, 94, 95, 142, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 44, 44, 49, 47, 175, 176, 47, 175, - 176, 47, 142, 47, 48, 142, 158, 159, 175, 142, - 142, 94, 95, 90, 53, 54, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, - 84, 85, 86, 87, 38, 47, 50, 88, 154, 155, - 175, 176, 43, 51, 53, 45, 116, 175, 47, 43, - 51, 47, 43, 51, 47, 44, 49, 142, 49, 48, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 175, 51, 158, 159, 175, 3, 11, 14, 15, 17, - 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 46, 47, 55, 56, 114, 115, 116, 117, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 144, 145, 146, 152, 153, 161, 162, - 165, 169, 170, 171, 172, 175, 142, 158, 175, 142, - 158, 175, 142, 142, 48, 142, 52, 48, 175, 44, - 43, 4, 117, 142, 53, 43, 114, 43, 43, 43, - 43, 84, 178, 182, 52, 53, 53, 53, 142, 53, - 43, 43, 47, 152, 153, 165, 165, 46, 114, 53, - 53, 53, 53, 53, 9, 10, 12, 13, 55, 56, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 48, 44, 43, 48, 44, 43, 48, 49, 48, - 142, 158, 4, 53, 142, 18, 142, 118, 144, 145, - 146, 165, 175, 142, 52, 52, 53, 158, 158, 142, - 43, 43, 43, 43, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 48, 158, 48, 158, 48, - 142, 43, 44, 44, 43, 44, 53, 21, 49, 44, - 44, 44, 142, 142, 142, 142, 43, 44, 43, 44, - 43, 44, 158, 114, 142, 114, 142, 143, 142, 175, - 116, 53, 53, 44, 44, 49, 44, 49, 44, 49, - 158, 158, 158, 44, 16, 44, 53, 44, 21, 53, - 53, 159, 53, 159, 53, 159, 44, 44, 44, 114, - 53, 118, 114, 142, 44, 44, 44, 44, 44, 53, - 53, 53, 114, 114 + 0, 11, 12, 13, 14, 15, 98, 114, 115, 116, + 117, 118, 119, 120, 121, 183, 97, 183, 184, 184, + 51, 0, 116, 117, 118, 51, 77, 61, 61, 99, + 186, 165, 183, 16, 39, 40, 41, 42, 43, 44, + 45, 47, 48, 49, 50, 51, 55, 59, 75, 76, + 92, 95, 100, 101, 102, 103, 150, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 52, 52, 57, 55, 183, 184, 55, 183, + 184, 55, 150, 55, 56, 150, 166, 167, 183, 150, + 150, 102, 103, 98, 61, 62, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 88, 89, 90, 91, + 92, 93, 94, 95, 46, 55, 58, 96, 162, 163, + 183, 184, 51, 59, 61, 53, 124, 183, 55, 51, + 59, 55, 51, 59, 55, 52, 57, 150, 57, 56, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 183, 59, 166, 167, 183, 11, 19, 22, 23, 25, + 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 54, 55, 63, 64, 122, 123, 124, 125, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 152, 153, 154, 160, 161, 169, 170, + 173, 177, 178, 179, 180, 183, 150, 166, 183, 150, + 166, 183, 150, 150, 56, 150, 60, 56, 183, 52, + 51, 12, 125, 150, 61, 51, 122, 51, 51, 51, + 51, 92, 186, 190, 60, 61, 61, 61, 150, 61, + 51, 51, 55, 160, 161, 173, 173, 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, + 150, 166, 12, 61, 150, 26, 150, 126, 152, 153, + 154, 173, 183, 150, 60, 60, 61, 166, 166, 150, + 51, 51, 51, 51, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 56, 166, 56, 166, 56, + 150, 51, 52, 52, 51, 52, 61, 29, 57, 52, + 52, 52, 150, 150, 150, 150, 51, 52, 51, 52, + 51, 52, 166, 122, 150, 122, 150, 151, 150, 183, + 124, 61, 61, 52, 52, 57, 52, 57, 52, 57, + 166, 166, 166, 52, 24, 52, 61, 52, 29, 61, + 61, 167, 61, 167, 61, 167, 52, 52, 52, 122, + 61, 126, 122, 150, 52, 52, 52, 52, 52, 61, + 61, 61, 122, 122 }; const unsigned char parser::yyr1_[] = { - 0, 105, 106, 106, 107, 107, 107, 107, 107, 107, - 108, 109, 110, 110, 110, 110, 110, 111, 112, 113, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 115, 115, 116, 116, 117, - 117, 118, 118, 118, 118, 119, 119, 120, 120, 120, - 121, 122, 122, 123, 124, 124, 125, 125, 126, 127, - 128, 129, 130, 131, 132, 132, 133, 134, 134, 135, - 136, 137, 138, 138, 139, 140, 141, 142, 142, 142, - 143, 143, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 145, 145, 146, 146, 147, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 150, 151, 152, 152, 153, 153, - 154, 154, 154, 154, 154, 154, 155, 155, 155, 155, - 156, 157, 157, 157, 158, 158, 159, 159, 160, 160, - 161, 162, 162, 163, 164, 165, 165, 165, 165, 165, - 165, 165, 165, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 176, 177, 178, 179, 180, - 181, 181, 182, 182, 183, 184 + 0, 113, 114, 114, 115, 115, 115, 115, 115, 115, + 116, 117, 118, 118, 118, 118, 118, 119, 120, 121, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 123, 123, 124, 124, 125, + 125, 126, 126, 126, 126, 127, 127, 128, 128, 128, + 129, 130, 130, 131, 132, 132, 133, 133, 134, 135, + 136, 137, 138, 139, 140, 140, 141, 142, 142, 143, + 144, 145, 146, 146, 147, 148, 149, 150, 150, 150, + 151, 151, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 153, 153, 154, 154, 155, 156, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 158, 159, 160, 160, 161, 161, + 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, + 164, 165, 165, 165, 166, 166, 167, 167, 168, 168, + 169, 170, 170, 171, 172, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 184, 185, 186, 187, 188, + 189, 189, 190, 190, 191, 192 }; const signed char @@ -4426,28 +4427,28 @@ namespace xsk { namespace gsc { namespace iw7 { const short parser::yyrline_[] = { - 0, 244, 244, 245, 249, 251, 253, 255, 257, 259, - 264, 268, 273, 274, 275, 276, 277, 281, 286, 291, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 324, 325, 329, 330, 334, - 336, 341, 343, 345, 348, 352, 354, 359, 361, 363, - 368, 373, 375, 380, 385, 387, 392, 394, 399, 404, - 409, 414, 419, 424, 429, 431, 436, 441, 443, 448, - 453, 458, 463, 465, 470, 475, 480, 485, 486, 487, - 491, 492, 496, 498, 500, 502, 504, 506, 508, 510, - 512, 514, 516, 521, 523, 528, 530, 535, 540, 542, - 544, 546, 548, 550, 552, 554, 556, 558, 560, 562, - 564, 566, 568, 570, 572, 574, 579, 580, 581, 582, - 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, - 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, - 603, 604, 605, 606, 610, 615, 620, 621, 624, 625, - 629, 631, 633, 635, 637, 639, 644, 646, 648, 650, - 655, 660, 662, 665, 669, 672, 676, 678, 683, 685, - 690, 695, 697, 702, 707, 712, 713, 714, 715, 716, - 717, 718, 719, 720, 724, 729, 734, 739, 744, 749, - 754, 759, 764, 769, 774, 776, 781, 786, 791, 796, - 801, 803, 808, 810, 815, 820 + 0, 252, 252, 253, 257, 259, 261, 263, 265, 267, + 272, 276, 281, 282, 283, 284, 285, 289, 294, 299, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 332, 333, 337, 338, 342, + 344, 349, 351, 353, 356, 360, 362, 367, 369, 371, + 376, 381, 383, 388, 393, 395, 400, 402, 407, 412, + 417, 422, 427, 432, 437, 439, 444, 449, 451, 456, + 461, 466, 471, 473, 478, 483, 488, 493, 494, 495, + 499, 500, 504, 506, 508, 510, 512, 514, 516, 518, + 520, 522, 524, 529, 531, 536, 538, 543, 548, 550, + 552, 554, 556, 558, 560, 562, 564, 566, 568, 570, + 572, 574, 576, 578, 580, 582, 587, 588, 589, 590, + 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, + 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 614, 618, 623, 628, 629, 632, 633, + 637, 639, 641, 643, 645, 647, 652, 654, 656, 658, + 663, 668, 670, 673, 677, 680, 684, 686, 691, 693, + 698, 703, 705, 710, 715, 720, 721, 722, 723, 724, + 725, 726, 727, 728, 732, 737, 742, 747, 752, 757, + 762, 767, 772, 777, 782, 784, 789, 794, 799, 804, + 809, 811, 816, 818, 823, 828 }; void @@ -4480,9 +4481,9 @@ namespace xsk { namespace gsc { namespace iw7 { #line 13 "parser.ypp" } } } // xsk::gsc::iw7 -#line 4484 "parser.cpp" +#line 4485 "parser.cpp" -#line 824 "parser.ypp" +#line 832 "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 9dc3e1b0..c91192f7 100644 --- a/src/iw7/xsk/parser.hpp +++ b/src/iw7/xsk/parser.hpp @@ -674,108 +674,116 @@ namespace xsk { namespace gsc { namespace iw7 { IW7EOF = 0, // "end of file" IW7error = 1, // error IW7UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - IF = 15, // "if" - ELSE = 16, // "else" - DO = 17, // "do" - WHILE = 18, // "while" - FOR = 19, // "for" - FOREACH = 20, // "foreach" - IN = 21, // "in" - SWITCH = 22, // "switch" - CASE = 23, // "case" - DEFAULT = 24, // "default" - BREAK = 25, // "break" - CONTINUE = 26, // "continue" - RETURN = 27, // "return" - BREAKPOINT = 28, // "breakpoint" - PROFBEGIN = 29, // "prof_begin" - PROFEND = 30, // "prof_end" - THREAD = 31, // "thread" - CHILDTHREAD = 32, // "childthread" - THISTHREAD = 33, // "thisthread" - CALL = 34, // "call" - TRUE = 35, // "true" - FALSE = 36, // "false" - UNDEFINED = 37, // "undefined" - SIZE = 38, // ".size" - GAME = 39, // "game" - SELF = 40, // "self" - ANIM = 41, // "anim" - LEVEL = 42, // "level" - LPAREN = 43, // "(" - RPAREN = 44, // ")" - LBRACE = 45, // "{" - RBRACE = 46, // "}" - LBRACKET = 47, // "[" - RBRACKET = 48, // "]" - COMMA = 49, // "," - DOT = 50, // "." - DOUBLECOLON = 51, // "::" - COLON = 52, // ":" - SEMICOLON = 53, // ";" - QMARK = 54, // "?" - INCREMENT = 55, // "++" - DECREMENT = 56, // "--" - LSHIFT = 57, // "<<" - RSHIFT = 58, // ">>" - OR = 59, // "||" - AND = 60, // "&&" - EQUALITY = 61, // "==" - INEQUALITY = 62, // "!=" - LESS_EQUAL = 63, // "<=" - GREATER_EQUAL = 64, // ">=" - LESS = 65, // "<" - GREATER = 66, // ">" - NOT = 67, // "!" - COMPLEMENT = 68, // "~" - ASSIGN = 69, // "=" - ASSIGN_ADD = 70, // "+=" - ASSIGN_SUB = 71, // "-=" - ASSIGN_MUL = 72, // "*=" - ASSIGN_DIV = 73, // "/=" - ASSIGN_MOD = 74, // "%=" - ASSIGN_BW_OR = 75, // "|=" - ASSIGN_BW_AND = 76, // "&=" - ASSIGN_BW_EXOR = 77, // "^=" - ASSIGN_RSHIFT = 78, // ">>=" - ASSIGN_LSHIFT = 79, // "<<=" - BITWISE_OR = 80, // "|" - BITWISE_AND = 81, // "&" - BITWISE_EXOR = 82, // "^" - ADD = 83, // "+" - SUB = 84, // "-" - MUL = 85, // "*" - DIV = 86, // "/" - MOD = 87, // "%" - FIELD = 88, // "field" - PATH = 89, // "path" - IDENTIFIER = 90, // "identifier" - STRING = 91, // "string literal" - ISTRING = 92, // "localized string" - COLOR = 93, // "color" - FLOAT = 94, // "float" - INTEGER = 95, // "integer" - ADD_ARRAY = 96, // ADD_ARRAY - THEN = 97, // THEN - TERN = 98, // TERN - NEG = 99, // NEG - ANIMREF = 100, // ANIMREF - PREINC = 101, // PREINC - PREDEC = 102, // PREDEC - POSTINC = 103, // POSTINC - POSTDEC = 104 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + IF = 23, // "if" + ELSE = 24, // "else" + DO = 25, // "do" + WHILE = 26, // "while" + FOR = 27, // "for" + FOREACH = 28, // "foreach" + IN = 29, // "in" + SWITCH = 30, // "switch" + CASE = 31, // "case" + DEFAULT = 32, // "default" + BREAK = 33, // "break" + CONTINUE = 34, // "continue" + RETURN = 35, // "return" + BREAKPOINT = 36, // "breakpoint" + PROFBEGIN = 37, // "prof_begin" + PROFEND = 38, // "prof_end" + THREAD = 39, // "thread" + CHILDTHREAD = 40, // "childthread" + THISTHREAD = 41, // "thisthread" + CALL = 42, // "call" + TRUE = 43, // "true" + FALSE = 44, // "false" + UNDEFINED = 45, // "undefined" + SIZE = 46, // ".size" + GAME = 47, // "game" + SELF = 48, // "self" + ANIM = 49, // "anim" + LEVEL = 50, // "level" + LPAREN = 51, // "(" + RPAREN = 52, // ")" + LBRACE = 53, // "{" + RBRACE = 54, // "}" + LBRACKET = 55, // "[" + RBRACKET = 56, // "]" + COMMA = 57, // "," + DOT = 58, // "." + DOUBLECOLON = 59, // "::" + COLON = 60, // ":" + SEMICOLON = 61, // ";" + QMARK = 62, // "?" + INCREMENT = 63, // "++" + DECREMENT = 64, // "--" + LSHIFT = 65, // "<<" + RSHIFT = 66, // ">>" + OR = 67, // "||" + AND = 68, // "&&" + EQUALITY = 69, // "==" + INEQUALITY = 70, // "!=" + LESS_EQUAL = 71, // "<=" + GREATER_EQUAL = 72, // ">=" + LESS = 73, // "<" + GREATER = 74, // ">" + NOT = 75, // "!" + COMPLEMENT = 76, // "~" + ASSIGN = 77, // "=" + ASSIGN_ADD = 78, // "+=" + ASSIGN_SUB = 79, // "-=" + ASSIGN_MUL = 80, // "*=" + ASSIGN_DIV = 81, // "/=" + ASSIGN_MOD = 82, // "%=" + ASSIGN_BW_OR = 83, // "|=" + ASSIGN_BW_AND = 84, // "&=" + ASSIGN_BW_EXOR = 85, // "^=" + ASSIGN_RSHIFT = 86, // ">>=" + ASSIGN_LSHIFT = 87, // "<<=" + BITWISE_OR = 88, // "|" + BITWISE_AND = 89, // "&" + BITWISE_EXOR = 90, // "^" + ADD = 91, // "+" + SUB = 92, // "-" + MUL = 93, // "*" + DIV = 94, // "/" + MOD = 95, // "%" + FIELD = 96, // "field" + PATH = 97, // "path" + IDENTIFIER = 98, // "identifier" + STRING = 99, // "string literal" + ISTRING = 100, // "localized string" + COLOR = 101, // "color" + FLOAT = 102, // "float" + INTEGER = 103, // "integer" + ADD_ARRAY = 104, // ADD_ARRAY + THEN = 105, // THEN + TERN = 106, // TERN + NEG = 107, // NEG + ANIMREF = 108, // ANIMREF + PREINC = 109, // PREINC + PREDEC = 110, // PREDEC + POSTINC = 111, // POSTINC + POSTDEC = 112 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -792,193 +800,201 @@ namespace xsk { namespace gsc { namespace iw7 { { enum symbol_kind_type { - YYNTOKENS = 105, ///< Number of tokens. + YYNTOKENS = 113, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_IF = 15, // "if" - S_ELSE = 16, // "else" - S_DO = 17, // "do" - S_WHILE = 18, // "while" - S_FOR = 19, // "for" - S_FOREACH = 20, // "foreach" - S_IN = 21, // "in" - S_SWITCH = 22, // "switch" - S_CASE = 23, // "case" - S_DEFAULT = 24, // "default" - S_BREAK = 25, // "break" - S_CONTINUE = 26, // "continue" - S_RETURN = 27, // "return" - S_BREAKPOINT = 28, // "breakpoint" - S_PROFBEGIN = 29, // "prof_begin" - S_PROFEND = 30, // "prof_end" - S_THREAD = 31, // "thread" - S_CHILDTHREAD = 32, // "childthread" - S_THISTHREAD = 33, // "thisthread" - S_CALL = 34, // "call" - S_TRUE = 35, // "true" - S_FALSE = 36, // "false" - S_UNDEFINED = 37, // "undefined" - S_SIZE = 38, // ".size" - S_GAME = 39, // "game" - S_SELF = 40, // "self" - S_ANIM = 41, // "anim" - S_LEVEL = 42, // "level" - S_LPAREN = 43, // "(" - S_RPAREN = 44, // ")" - S_LBRACE = 45, // "{" - S_RBRACE = 46, // "}" - S_LBRACKET = 47, // "[" - S_RBRACKET = 48, // "]" - S_COMMA = 49, // "," - S_DOT = 50, // "." - S_DOUBLECOLON = 51, // "::" - S_COLON = 52, // ":" - S_SEMICOLON = 53, // ";" - S_QMARK = 54, // "?" - S_INCREMENT = 55, // "++" - S_DECREMENT = 56, // "--" - S_LSHIFT = 57, // "<<" - S_RSHIFT = 58, // ">>" - S_OR = 59, // "||" - S_AND = 60, // "&&" - S_EQUALITY = 61, // "==" - S_INEQUALITY = 62, // "!=" - S_LESS_EQUAL = 63, // "<=" - S_GREATER_EQUAL = 64, // ">=" - S_LESS = 65, // "<" - S_GREATER = 66, // ">" - S_NOT = 67, // "!" - S_COMPLEMENT = 68, // "~" - S_ASSIGN = 69, // "=" - S_ASSIGN_ADD = 70, // "+=" - S_ASSIGN_SUB = 71, // "-=" - S_ASSIGN_MUL = 72, // "*=" - S_ASSIGN_DIV = 73, // "/=" - S_ASSIGN_MOD = 74, // "%=" - S_ASSIGN_BW_OR = 75, // "|=" - S_ASSIGN_BW_AND = 76, // "&=" - S_ASSIGN_BW_EXOR = 77, // "^=" - S_ASSIGN_RSHIFT = 78, // ">>=" - S_ASSIGN_LSHIFT = 79, // "<<=" - S_BITWISE_OR = 80, // "|" - S_BITWISE_AND = 81, // "&" - S_BITWISE_EXOR = 82, // "^" - S_ADD = 83, // "+" - S_SUB = 84, // "-" - S_MUL = 85, // "*" - S_DIV = 86, // "/" - S_MOD = 87, // "%" - S_FIELD = 88, // "field" - S_PATH = 89, // "path" - S_IDENTIFIER = 90, // "identifier" - S_STRING = 91, // "string literal" - S_ISTRING = 92, // "localized string" - S_COLOR = 93, // "color" - S_FLOAT = 94, // "float" - S_INTEGER = 95, // "integer" - S_ADD_ARRAY = 96, // ADD_ARRAY - S_THEN = 97, // THEN - S_TERN = 98, // TERN - S_NEG = 99, // NEG - S_ANIMREF = 100, // ANIMREF - S_PREINC = 101, // PREINC - S_PREDEC = 102, // PREDEC - S_POSTINC = 103, // POSTINC - S_POSTDEC = 104, // POSTDEC - S_YYACCEPT = 105, // $accept - S_root = 106, // root - S_program = 107, // program - S_inline = 108, // inline - S_include = 109, // include - S_declaration = 110, // declaration - S_decl_usingtree = 111, // decl_usingtree - S_decl_constant = 112, // decl_constant - S_decl_thread = 113, // decl_thread - S_stmt = 114, // stmt - S_stmt_dev = 115, // stmt_dev - S_stmt_block = 116, // stmt_block - S_stmt_list = 117, // stmt_list - S_stmt_expr = 118, // stmt_expr - S_stmt_call = 119, // stmt_call - S_stmt_assign = 120, // stmt_assign - S_stmt_endon = 121, // stmt_endon - S_stmt_notify = 122, // stmt_notify - S_stmt_wait = 123, // stmt_wait - S_stmt_waittill = 124, // stmt_waittill - S_stmt_waittillmatch = 125, // stmt_waittillmatch - S_stmt_waittillframeend = 126, // stmt_waittillframeend - S_stmt_if = 127, // stmt_if - S_stmt_ifelse = 128, // stmt_ifelse - S_stmt_while = 129, // stmt_while - S_stmt_dowhile = 130, // stmt_dowhile - S_stmt_for = 131, // stmt_for - S_stmt_foreach = 132, // stmt_foreach - S_stmt_switch = 133, // stmt_switch - S_stmt_case = 134, // stmt_case - S_stmt_default = 135, // stmt_default - S_stmt_break = 136, // stmt_break - S_stmt_continue = 137, // stmt_continue - S_stmt_return = 138, // stmt_return - S_stmt_breakpoint = 139, // stmt_breakpoint - S_stmt_prof_begin = 140, // stmt_prof_begin - S_stmt_prof_end = 141, // stmt_prof_end - S_expr = 142, // expr - S_expr_or_empty = 143, // expr_or_empty - S_expr_assign = 144, // expr_assign - S_expr_increment = 145, // expr_increment - S_expr_decrement = 146, // expr_decrement - S_expr_ternary = 147, // expr_ternary - S_expr_binary = 148, // expr_binary - S_expr_primitive = 149, // expr_primitive - S_expr_complement = 150, // expr_complement - S_expr_not = 151, // expr_not - S_expr_call = 152, // expr_call - S_expr_method = 153, // expr_method - S_expr_function = 154, // expr_function - S_expr_pointer = 155, // expr_pointer - S_expr_add_array = 156, // expr_add_array - S_expr_parameters = 157, // expr_parameters - S_expr_arguments = 158, // expr_arguments - S_expr_arguments_no_empty = 159, // expr_arguments_no_empty - S_expr_reference = 160, // expr_reference - S_expr_array = 161, // expr_array - S_expr_field = 162, // expr_field - S_expr_size = 163, // expr_size - S_expr_paren = 164, // expr_paren - S_expr_object = 165, // expr_object - S_expr_thisthread = 166, // expr_thisthread - S_expr_empty_array = 167, // expr_empty_array - S_expr_undefined = 168, // expr_undefined - S_expr_game = 169, // expr_game - S_expr_self = 170, // expr_self - S_expr_anim = 171, // expr_anim - S_expr_level = 172, // expr_level - S_expr_animation = 173, // expr_animation - S_expr_animtree = 174, // expr_animtree - S_expr_identifier = 175, // expr_identifier - S_expr_path = 176, // expr_path - S_expr_istring = 177, // expr_istring - S_expr_string = 178, // expr_string - S_expr_color = 179, // expr_color - S_expr_vector = 180, // expr_vector - S_expr_float = 181, // expr_float - S_expr_integer = 182, // expr_integer - S_expr_false = 183, // expr_false - S_expr_true = 184 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_IF = 23, // "if" + S_ELSE = 24, // "else" + S_DO = 25, // "do" + S_WHILE = 26, // "while" + S_FOR = 27, // "for" + S_FOREACH = 28, // "foreach" + S_IN = 29, // "in" + S_SWITCH = 30, // "switch" + S_CASE = 31, // "case" + S_DEFAULT = 32, // "default" + S_BREAK = 33, // "break" + S_CONTINUE = 34, // "continue" + S_RETURN = 35, // "return" + S_BREAKPOINT = 36, // "breakpoint" + S_PROFBEGIN = 37, // "prof_begin" + S_PROFEND = 38, // "prof_end" + S_THREAD = 39, // "thread" + S_CHILDTHREAD = 40, // "childthread" + S_THISTHREAD = 41, // "thisthread" + S_CALL = 42, // "call" + S_TRUE = 43, // "true" + S_FALSE = 44, // "false" + S_UNDEFINED = 45, // "undefined" + S_SIZE = 46, // ".size" + S_GAME = 47, // "game" + S_SELF = 48, // "self" + S_ANIM = 49, // "anim" + S_LEVEL = 50, // "level" + S_LPAREN = 51, // "(" + S_RPAREN = 52, // ")" + S_LBRACE = 53, // "{" + S_RBRACE = 54, // "}" + S_LBRACKET = 55, // "[" + S_RBRACKET = 56, // "]" + S_COMMA = 57, // "," + S_DOT = 58, // "." + S_DOUBLECOLON = 59, // "::" + S_COLON = 60, // ":" + S_SEMICOLON = 61, // ";" + S_QMARK = 62, // "?" + S_INCREMENT = 63, // "++" + S_DECREMENT = 64, // "--" + S_LSHIFT = 65, // "<<" + S_RSHIFT = 66, // ">>" + S_OR = 67, // "||" + S_AND = 68, // "&&" + S_EQUALITY = 69, // "==" + S_INEQUALITY = 70, // "!=" + S_LESS_EQUAL = 71, // "<=" + S_GREATER_EQUAL = 72, // ">=" + S_LESS = 73, // "<" + S_GREATER = 74, // ">" + S_NOT = 75, // "!" + S_COMPLEMENT = 76, // "~" + S_ASSIGN = 77, // "=" + S_ASSIGN_ADD = 78, // "+=" + S_ASSIGN_SUB = 79, // "-=" + S_ASSIGN_MUL = 80, // "*=" + S_ASSIGN_DIV = 81, // "/=" + S_ASSIGN_MOD = 82, // "%=" + S_ASSIGN_BW_OR = 83, // "|=" + S_ASSIGN_BW_AND = 84, // "&=" + S_ASSIGN_BW_EXOR = 85, // "^=" + S_ASSIGN_RSHIFT = 86, // ">>=" + S_ASSIGN_LSHIFT = 87, // "<<=" + S_BITWISE_OR = 88, // "|" + S_BITWISE_AND = 89, // "&" + S_BITWISE_EXOR = 90, // "^" + S_ADD = 91, // "+" + S_SUB = 92, // "-" + S_MUL = 93, // "*" + S_DIV = 94, // "/" + S_MOD = 95, // "%" + S_FIELD = 96, // "field" + S_PATH = 97, // "path" + S_IDENTIFIER = 98, // "identifier" + S_STRING = 99, // "string literal" + S_ISTRING = 100, // "localized string" + S_COLOR = 101, // "color" + S_FLOAT = 102, // "float" + S_INTEGER = 103, // "integer" + S_ADD_ARRAY = 104, // ADD_ARRAY + S_THEN = 105, // THEN + S_TERN = 106, // TERN + S_NEG = 107, // NEG + S_ANIMREF = 108, // ANIMREF + S_PREINC = 109, // PREINC + S_PREDEC = 110, // PREDEC + S_POSTINC = 111, // POSTINC + S_POSTDEC = 112, // POSTDEC + S_YYACCEPT = 113, // $accept + S_root = 114, // root + S_program = 115, // program + S_inline = 116, // inline + S_include = 117, // include + S_declaration = 118, // declaration + S_decl_usingtree = 119, // decl_usingtree + S_decl_constant = 120, // decl_constant + S_decl_thread = 121, // decl_thread + S_stmt = 122, // stmt + S_stmt_dev = 123, // stmt_dev + S_stmt_block = 124, // stmt_block + S_stmt_list = 125, // stmt_list + S_stmt_expr = 126, // stmt_expr + S_stmt_call = 127, // stmt_call + S_stmt_assign = 128, // stmt_assign + S_stmt_endon = 129, // stmt_endon + S_stmt_notify = 130, // stmt_notify + S_stmt_wait = 131, // stmt_wait + S_stmt_waittill = 132, // stmt_waittill + S_stmt_waittillmatch = 133, // stmt_waittillmatch + S_stmt_waittillframeend = 134, // stmt_waittillframeend + S_stmt_if = 135, // stmt_if + S_stmt_ifelse = 136, // stmt_ifelse + S_stmt_while = 137, // stmt_while + S_stmt_dowhile = 138, // stmt_dowhile + S_stmt_for = 139, // stmt_for + S_stmt_foreach = 140, // stmt_foreach + S_stmt_switch = 141, // stmt_switch + S_stmt_case = 142, // stmt_case + S_stmt_default = 143, // stmt_default + S_stmt_break = 144, // stmt_break + S_stmt_continue = 145, // stmt_continue + S_stmt_return = 146, // stmt_return + S_stmt_breakpoint = 147, // stmt_breakpoint + S_stmt_prof_begin = 148, // stmt_prof_begin + S_stmt_prof_end = 149, // stmt_prof_end + S_expr = 150, // expr + S_expr_or_empty = 151, // expr_or_empty + S_expr_assign = 152, // expr_assign + S_expr_increment = 153, // expr_increment + S_expr_decrement = 154, // expr_decrement + S_expr_ternary = 155, // expr_ternary + S_expr_binary = 156, // expr_binary + S_expr_primitive = 157, // expr_primitive + S_expr_complement = 158, // expr_complement + S_expr_not = 159, // expr_not + S_expr_call = 160, // expr_call + S_expr_method = 161, // expr_method + S_expr_function = 162, // expr_function + S_expr_pointer = 163, // expr_pointer + S_expr_add_array = 164, // expr_add_array + S_expr_parameters = 165, // expr_parameters + S_expr_arguments = 166, // expr_arguments + S_expr_arguments_no_empty = 167, // expr_arguments_no_empty + S_expr_reference = 168, // expr_reference + S_expr_array = 169, // expr_array + S_expr_field = 170, // expr_field + S_expr_size = 171, // expr_size + S_expr_paren = 172, // expr_paren + S_expr_object = 173, // expr_object + S_expr_thisthread = 174, // expr_thisthread + S_expr_empty_array = 175, // expr_empty_array + S_expr_undefined = 176, // expr_undefined + S_expr_game = 177, // expr_game + S_expr_self = 178, // expr_self + S_expr_anim = 179, // expr_anim + S_expr_level = 180, // expr_level + S_expr_animation = 181, // expr_animation + S_expr_animtree = 182, // expr_animtree + S_expr_identifier = 183, // expr_identifier + S_expr_path = 184, // expr_path + S_expr_istring = 185, // expr_istring + S_expr_string = 186, // expr_string + S_expr_color = 187, // expr_color + S_expr_vector = 188, // expr_vector + S_expr_float = 189, // expr_float + S_expr_integer = 190, // expr_integer + S_expr_false = 191, // expr_false + S_expr_true = 192 // expr_true }; }; @@ -2751,6 +2767,126 @@ switch (yykind) return symbol_type (token::IW7UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5311,7 +5447,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw7 -#line 5315 "parser.hpp" +#line 5451 "parser.hpp" diff --git a/src/iw8/xsk/lexer.cpp b/src/iw8/xsk/lexer.cpp index ee2262af..333af505 100644 --- a/src/iw8/xsk/lexer.cpp +++ b/src/iw8/xsk/lexer.cpp @@ -16,60 +16,6 @@ xsk::gsc::iw8::parser::symbol_type IW8lex(xsk::gsc::iw8::lexer& lexer) namespace xsk::gsc::iw8 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_waitframe, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_isdefined, - KW_istrue, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -132,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -143,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -154,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -167,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -175,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -196,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type if (header_top_ > 0) pop_header(); else - return iw8::parser::make_IW8EOF(loc_); + return parser::make_IW8EOF(loc_); } reader_.advance(); @@ -214,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return iw8::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return iw8::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return iw8::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -293,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type indev_ = false; reader_.advance(); - return iw8::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -306,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return iw8::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return iw8::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -326,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::iw8::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return iw8::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return iw8::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return iw8::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return iw8::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return iw8::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return iw8::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return iw8::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return iw8::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return iw8::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return iw8::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return iw8::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return iw8::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return iw8::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return iw8::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return iw8::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return iw8::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return iw8::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return iw8::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return iw8::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return iw8::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return iw8::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return iw8::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return iw8::parser::make_OR(loc_); + return parser::make_OR(loc_); - return iw8::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return iw8::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return iw8::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return iw8::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return iw8::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return iw8::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return iw8::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return iw8::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return iw8::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return iw8::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return iw8::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return iw8::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return iw8::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return iw8::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return iw8::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return iw8::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return iw8::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -499,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return iw8::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return iw8::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -536,22 +482,32 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return iw8::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return iw8::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::IW8UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; @@ -569,22 +525,23 @@ lex_name: } } - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return iw8::parser::make_PATH(xsk::gsc::iw8::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw8::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return iw8::parser::make_IDENTIFIER(xsk::gsc::iw8::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return iw8::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -635,9 +592,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return iw8::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return iw8::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -669,7 +626,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return iw8::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -703,7 +660,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return iw8::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -737,185 +694,62 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return iw8::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::iw8::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return iw8::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return iw8::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return iw8::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return iw8::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return iw8::parser::make_ENDON(loc_); - case keyword::KW_notify: - return iw8::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return iw8::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return iw8::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return iw8::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return iw8::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_waitframe: - return iw8::parser::make_WAITFRAME(loc_); - case keyword::KW_if: - return iw8::parser::make_IF(loc_); - case keyword::KW_else: - return iw8::parser::make_ELSE(loc_); - case keyword::KW_do: - return iw8::parser::make_DO(loc_); - case keyword::KW_while: - return iw8::parser::make_WHILE(loc_); - case keyword::KW_for: - return iw8::parser::make_FOR(loc_); - case keyword::KW_foreach: - return iw8::parser::make_FOREACH(loc_); - case keyword::KW_in: - return iw8::parser::make_IN(loc_); - case keyword::KW_switch: - return iw8::parser::make_SWITCH(loc_); - case keyword::KW_case: - return iw8::parser::make_CASE(loc_); - case keyword::KW_default: - return iw8::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return iw8::parser::make_BREAK(loc_); - case keyword::KW_continue: - return iw8::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return iw8::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return iw8::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return iw8::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return iw8::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return iw8::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return iw8::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return iw8::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return iw8::parser::make_CALL(loc_); - case keyword::KW_true: - return iw8::parser::make_TRUE(loc_); - case keyword::KW_false: - return iw8::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return iw8::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return iw8::parser::make_SIZE(loc_); - case keyword::KW_game: - return iw8::parser::make_GAME(loc_); - case keyword::KW_self: - return iw8::parser::make_SELF(loc_); - case keyword::KW_anim: - return iw8::parser::make_ANIM(loc_); - case keyword::KW_level: - return iw8::parser::make_LEVEL(loc_); - case keyword::KW_isdefined: - return iw8::parser::make_ISDEFINED(loc_); - case keyword::KW_istrue: - return iw8::parser::make_ISTRUE(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "waitframe", keyword::KW_waitframe }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, - { "isdefined", keyword::KW_isdefined }, - { "istrue", keyword::KW_istrue }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "waitframe", parser::token::WAITFRAME }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, + { "isdefined", parser::token::ISDEFINED }, + { "istrue", parser::token::ISTRUE }, }}; } // namespace xsk::gsc::iw8 diff --git a/src/iw8/xsk/lexer.hpp b/src/iw8/xsk/lexer.hpp index 5f93437d..3e2a8183 100644 --- a/src/iw8/xsk/lexer.hpp +++ b/src/iw8/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::iw8 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::iw8::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::iw8::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::iw8 diff --git a/src/iw8/xsk/parser.cpp b/src/iw8/xsk/parser.cpp index 49c97e0f..211fdf84 100644 --- a/src/iw8/xsk/parser.cpp +++ b/src/iw8/xsk/parser.cpp @@ -2024,1327 +2024,1327 @@ namespace xsk { namespace gsc { namespace iw8 { switch (yyn) { case 2: // root: program -#line 250 "parser.ypp" +#line 258 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 2030 "parser.cpp" break; case 3: // root: %empty -#line 251 "parser.ypp" +#line 259 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 2036 "parser.cpp" break; case 4: // program: program inline -#line 256 "parser.ypp" +#line 264 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2042 "parser.cpp" break; case 5: // program: program include -#line 258 "parser.ypp" +#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 2048 "parser.cpp" break; case 6: // program: program declaration -#line 260 "parser.ypp" +#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 2054 "parser.cpp" break; case 7: // program: inline -#line 262 "parser.ypp" +#line 270 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2060 "parser.cpp" break; case 8: // program: include -#line 264 "parser.ypp" +#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 > ())); } #line 2066 "parser.cpp" break; case 9: // program: declaration -#line 266 "parser.ypp" +#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 > ())); } #line 2072 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 270 "parser.ypp" +#line 278 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2078 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 275 "parser.ypp" +#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 > ())); } #line 2084 "parser.cpp" break; case 12: // declaration: "/#" -#line 279 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2090 "parser.cpp" break; case 13: // declaration: "#/" -#line 280 "parser.ypp" +#line 288 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2096 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 281 "parser.ypp" +#line 289 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2102 "parser.cpp" break; case 15: // declaration: decl_constant -#line 282 "parser.ypp" +#line 290 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2108 "parser.cpp" break; case 16: // declaration: decl_thread -#line 283 "parser.ypp" +#line 291 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2114 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 288 "parser.ypp" - { lexer.restrict_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 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 > ())); } #line 2120 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 293 "parser.ypp" +#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 > ())); } #line 2126 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 298 "parser.ypp" - { lexer.restrict_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 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 > ())); } #line 2132 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2138 "parser.cpp" break; case 21: // stmt: stmt_block -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2144 "parser.cpp" break; case 22: // stmt: stmt_call -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2150 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2156 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2162 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2168 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2174 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2180 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2186 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2192 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2198 "parser.cpp" break; case 31: // stmt: stmt_if -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2204 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2210 "parser.cpp" break; case 33: // stmt: stmt_while -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2216 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2222 "parser.cpp" break; case 35: // stmt: stmt_for -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2228 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2234 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2240 "parser.cpp" break; case 38: // stmt: stmt_case -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2246 "parser.cpp" break; case 39: // stmt: stmt_default -#line 321 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2252 "parser.cpp" break; case 40: // stmt: stmt_break -#line 322 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2258 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 323 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2264 "parser.cpp" break; case 42: // stmt: stmt_return -#line 324 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2270 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 325 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2276 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 326 "parser.ypp" +#line 334 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2282 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 327 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2288 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 331 "parser.ypp" +#line 339 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2294 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 332 "parser.ypp" +#line 340 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2300 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 336 "parser.ypp" +#line 344 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2306 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 337 "parser.ypp" +#line 345 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2312 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 342 "parser.ypp" +#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 > ())); } #line 2318 "parser.cpp" break; case 51: // stmt_list: stmt -#line 344 "parser.ypp" +#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 > ())); } #line 2324 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 349 "parser.ypp" +#line 357 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2330 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 351 "parser.ypp" +#line 359 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2336 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 353 "parser.ypp" +#line 361 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2342 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 355 "parser.ypp" +#line 363 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2348 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 360 "parser.ypp" +#line 368 "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 2354 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 362 "parser.ypp" +#line 370 "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 2360 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 367 "parser.ypp" +#line 375 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2366 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 369 "parser.ypp" +#line 377 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2372 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 371 "parser.ypp" +#line 379 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2378 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 376 "parser.ypp" +#line 384 "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 2384 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 381 "parser.ypp" +#line 389 "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 2390 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 383 "parser.ypp" +#line 391 "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 2396 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 388 "parser.ypp" +#line 396 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2402 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 393 "parser.ypp" +#line 401 "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 2408 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 395 "parser.ypp" +#line 403 "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 2414 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 400 "parser.ypp" +#line 408 "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 2420 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 402 "parser.ypp" +#line 410 "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 2426 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 407 "parser.ypp" +#line 415 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2432 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 412 "parser.ypp" +#line 420 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2438 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 414 "parser.ypp" +#line 422 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2444 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 419 "parser.ypp" +#line 427 "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 2450 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 424 "parser.ypp" +#line 432 "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 2456 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 429 "parser.ypp" +#line 437 "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 2462 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 434 "parser.ypp" +#line 442 "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 2468 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 439 "parser.ypp" +#line 447 "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 2474 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 444 "parser.ypp" +#line 452 "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 2480 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 446 "parser.ypp" +#line 454 "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 2486 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 451 "parser.ypp" +#line 459 "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 2492 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 456 "parser.ypp" +#line 464 "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 2498 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 458 "parser.ypp" +#line 466 "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 2504 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 463 "parser.ypp" +#line 471 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2510 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 468 "parser.ypp" +#line 476 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2516 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 473 "parser.ypp" +#line 481 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2522 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 478 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2528 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 480 "parser.ypp" +#line 488 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2534 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 485 "parser.ypp" +#line 493 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2540 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 490 "parser.ypp" +#line 498 "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 2546 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 495 "parser.ypp" +#line 503 "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 2552 "parser.cpp" break; case 90: // expr: expr_ternary -#line 499 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2558 "parser.cpp" break; case 91: // expr: expr_binary -#line 500 "parser.ypp" +#line 508 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2564 "parser.cpp" break; case 92: // expr: expr_primitive -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2570 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 505 "parser.ypp" +#line 513 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2576 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 506 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2582 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2588 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2594 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2600 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 517 "parser.ypp" +#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 2606 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 519 "parser.ypp" +#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 2612 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 521 "parser.ypp" +#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 2618 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 523 "parser.ypp" +#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 2624 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 525 "parser.ypp" +#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 2630 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 527 "parser.ypp" +#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 2636 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 529 "parser.ypp" +#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 2642 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 531 "parser.ypp" +#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 2648 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 536 "parser.ypp" +#line 544 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2654 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 538 "parser.ypp" +#line 546 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2660 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 543 "parser.ypp" +#line 551 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2666 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 545 "parser.ypp" +#line 553 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2672 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 550 "parser.ypp" +#line 558 "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 2678 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2684 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2690 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2696 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2702 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 563 "parser.ypp" +#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 2708 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 565 "parser.ypp" +#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 2714 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 567 "parser.ypp" +#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 2720 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 569 "parser.ypp" +#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 2726 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 571 "parser.ypp" +#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 2732 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 573 "parser.ypp" +#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 2738 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 575 "parser.ypp" +#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 2744 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 577 "parser.ypp" +#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 2750 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 579 "parser.ypp" +#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 2756 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 581 "parser.ypp" +#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 2762 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 583 "parser.ypp" +#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 2768 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 585 "parser.ypp" +#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 2774 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 587 "parser.ypp" +#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 2780 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 589 "parser.ypp" +#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 2786 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2792 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2798 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2804 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2810 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2816 "parser.cpp" break; case 134: // expr_primitive: expr_isdefined -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } #line 2822 "parser.cpp" break; case 135: // expr_primitive: expr_istrue -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } #line 2828 "parser.cpp" break; case 136: // expr_primitive: expr_reference -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2834 "parser.cpp" break; case 137: // expr_primitive: expr_array -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2840 "parser.cpp" break; case 138: // expr_primitive: expr_field -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2846 "parser.cpp" break; case 139: // expr_primitive: expr_size -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2852 "parser.cpp" break; case 140: // expr_primitive: expr_paren -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2858 "parser.cpp" break; case 141: // expr_primitive: expr_thisthread -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2864 "parser.cpp" break; case 142: // expr_primitive: expr_empty_array -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2870 "parser.cpp" break; case 143: // expr_primitive: expr_undefined -#line 607 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2876 "parser.cpp" break; case 144: // expr_primitive: expr_game -#line 608 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2882 "parser.cpp" break; case 145: // expr_primitive: expr_self -#line 609 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2888 "parser.cpp" break; case 146: // expr_primitive: expr_anim -#line 610 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2894 "parser.cpp" break; case 147: // expr_primitive: expr_level -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2900 "parser.cpp" break; case 148: // expr_primitive: expr_animation -#line 612 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2906 "parser.cpp" break; case 149: // expr_primitive: expr_animtree -#line 613 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2912 "parser.cpp" break; case 150: // expr_primitive: expr_identifier -#line 614 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2918 "parser.cpp" break; case 151: // expr_primitive: expr_istring -#line 615 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2924 "parser.cpp" break; case 152: // expr_primitive: expr_string -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2930 "parser.cpp" break; case 153: // expr_primitive: expr_color -#line 617 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2936 "parser.cpp" break; case 154: // expr_primitive: expr_vector -#line 618 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2942 "parser.cpp" break; case 155: // expr_primitive: expr_float -#line 619 "parser.ypp" +#line 627 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2948 "parser.cpp" break; case 156: // expr_primitive: expr_integer -#line 620 "parser.ypp" +#line 628 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2954 "parser.cpp" break; case 157: // expr_primitive: expr_false -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2960 "parser.cpp" break; case 158: // expr_primitive: expr_true -#line 622 "parser.ypp" +#line 630 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2966 "parser.cpp" break; case 159: // expr_complement: "~" expr -#line 627 "parser.ypp" +#line 635 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2972 "parser.cpp" break; case 160: // expr_not: "!" expr -#line 632 "parser.ypp" +#line 640 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2978 "parser.cpp" break; case 161: // expr_call: expr_function -#line 636 "parser.ypp" +#line 644 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2984 "parser.cpp" break; case 162: // expr_call: expr_pointer -#line 637 "parser.ypp" +#line 645 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2990 "parser.cpp" break; case 163: // expr_method: expr_object expr_function -#line 640 "parser.ypp" +#line 648 "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 2996 "parser.cpp" break; case 164: // expr_method: expr_object expr_pointer -#line 641 "parser.ypp" +#line 649 "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 3002 "parser.cpp" break; case 165: // expr_function: expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 654 "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 3008 "parser.cpp" break; case 166: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 656 "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 3014 "parser.cpp" break; case 167: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 658 "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 3020 "parser.cpp" break; case 168: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 660 "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 3026 "parser.cpp" break; case 169: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 662 "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 3032 "parser.cpp" break; case 170: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 664 "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 3038 "parser.cpp" break; case 171: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 661 "parser.ypp" +#line 669 "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 3044 "parser.cpp" break; case 172: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 671 "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 3050 "parser.cpp" break; case 173: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 665 "parser.ypp" +#line 673 "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 3056 "parser.cpp" break; case 174: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 667 "parser.ypp" +#line 675 "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 3062 "parser.cpp" break; case 175: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 672 "parser.ypp" +#line 680 "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 3068 "parser.cpp" break; case 176: // expr_parameters: expr_parameters "," expr_identifier -#line 677 "parser.ypp" +#line 685 "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 3074 "parser.cpp" break; case 177: // expr_parameters: expr_identifier -#line 679 "parser.ypp" +#line 687 "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 3080 "parser.cpp" break; case 178: // expr_parameters: %empty -#line 681 "parser.ypp" +#line 689 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3086 "parser.cpp" break; case 179: // expr_arguments: expr_arguments_no_empty -#line 686 "parser.ypp" +#line 694 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3092 "parser.cpp" break; case 180: // expr_arguments: %empty -#line 688 "parser.ypp" +#line 696 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3098 "parser.cpp" break; case 181: // expr_arguments_no_empty: expr_arguments "," expr -#line 693 "parser.ypp" +#line 701 "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 3104 "parser.cpp" break; case 182: // expr_arguments_no_empty: expr -#line 695 "parser.ypp" +#line 703 "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 3110 "parser.cpp" break; case 183: // expr_isdefined: "isdefined" "(" expr ")" -#line 700 "parser.ypp" +#line 708 "parser.ypp" { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3116 "parser.cpp" break; case 184: // expr_istrue: "istrue" "(" expr ")" -#line 705 "parser.ypp" +#line 713 "parser.ypp" { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3122 "parser.cpp" break; case 185: // expr_reference: "::" expr_identifier -#line 710 "parser.ypp" +#line 718 "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 3128 "parser.cpp" break; case 186: // expr_reference: expr_path "::" expr_identifier -#line 712 "parser.ypp" +#line 720 "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 3134 "parser.cpp" break; case 187: // expr_array: expr_object "[" expr "]" -#line 717 "parser.ypp" +#line 725 "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 3140 "parser.cpp" break; case 188: // expr_field: expr_object "." expr_identifier -#line 722 "parser.ypp" +#line 730 "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 3146 "parser.cpp" break; case 189: // expr_field: expr_object "field" -#line 724 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3152 "parser.cpp" break; case 190: // expr_size: expr_object ".size" -#line 729 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3158 "parser.cpp" break; case 191: // expr_paren: "(" expr ")" -#line 734 "parser.ypp" +#line 742 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3164 "parser.cpp" break; case 192: // expr_object: expr_call -#line 738 "parser.ypp" +#line 746 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3170 "parser.cpp" break; case 193: // expr_object: expr_method -#line 739 "parser.ypp" +#line 747 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3176 "parser.cpp" break; case 194: // expr_object: expr_array -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3182 "parser.cpp" break; case 195: // expr_object: expr_field -#line 741 "parser.ypp" +#line 749 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3188 "parser.cpp" break; case 196: // expr_object: expr_game -#line 742 "parser.ypp" +#line 750 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3194 "parser.cpp" break; case 197: // expr_object: expr_self -#line 743 "parser.ypp" +#line 751 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3200 "parser.cpp" break; case 198: // expr_object: expr_anim -#line 744 "parser.ypp" +#line 752 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3206 "parser.cpp" break; case 199: // expr_object: expr_level -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3212 "parser.cpp" break; case 200: // expr_object: expr_identifier -#line 746 "parser.ypp" +#line 754 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3218 "parser.cpp" break; case 201: // expr_thisthread: "thisthread" -#line 751 "parser.ypp" +#line 759 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3224 "parser.cpp" break; case 202: // expr_empty_array: "[" "]" -#line 756 "parser.ypp" +#line 764 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3230 "parser.cpp" break; case 203: // expr_undefined: "undefined" -#line 761 "parser.ypp" +#line 769 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3236 "parser.cpp" break; case 204: // expr_game: "game" -#line 766 "parser.ypp" +#line 774 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3242 "parser.cpp" break; case 205: // expr_self: "self" -#line 771 "parser.ypp" +#line 779 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3248 "parser.cpp" break; case 206: // expr_anim: "anim" -#line 776 "parser.ypp" +#line 784 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3254 "parser.cpp" break; case 207: // expr_level: "level" -#line 781 "parser.ypp" +#line 789 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3260 "parser.cpp" break; case 208: // expr_animation: "%" "identifier" -#line 786 "parser.ypp" +#line 794 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3266 "parser.cpp" break; case 209: // expr_animtree: "#animtree" -#line 791 "parser.ypp" +#line 799 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3272 "parser.cpp" break; case 210: // expr_identifier: "identifier" -#line 796 "parser.ypp" +#line 804 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3278 "parser.cpp" break; case 211: // expr_path: "path" -#line 801 "parser.ypp" +#line 809 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3284 "parser.cpp" break; case 212: // expr_path: expr_identifier -#line 803 "parser.ypp" +#line 811 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3290 "parser.cpp" break; case 213: // expr_istring: "localized string" -#line 808 "parser.ypp" +#line 816 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3296 "parser.cpp" break; case 214: // expr_string: "string literal" -#line 813 "parser.ypp" +#line 821 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3302 "parser.cpp" break; case 215: // expr_color: "color" -#line 818 "parser.ypp" +#line 826 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3308 "parser.cpp" break; case 216: // expr_vector: "(" expr "," expr "," expr ")" -#line 823 "parser.ypp" +#line 831 "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 3314 "parser.cpp" break; case 217: // expr_float: "-" "float" -#line 828 "parser.ypp" +#line 836 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3320 "parser.cpp" break; case 218: // expr_float: "float" -#line 830 "parser.ypp" +#line 838 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3326 "parser.cpp" break; case 219: // expr_integer: "-" "integer" -#line 835 "parser.ypp" +#line 843 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3332 "parser.cpp" break; case 220: // expr_integer: "integer" -#line 837 "parser.ypp" +#line 845 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3338 "parser.cpp" break; case 221: // expr_false: "false" -#line 842 "parser.ypp" +#line 850 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3344 "parser.cpp" break; case 222: // expr_true: "true" -#line 847 "parser.ypp" +#line 855 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3350 "parser.cpp" break; @@ -3534,7 +3534,8 @@ namespace xsk { namespace gsc { namespace iw8 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "waitframe", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", @@ -3838,51 +3839,51 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yypact_[] = { - 40, -277, -277, -40, -40, -22, -277, 30, 40, -277, - -277, -277, -277, -277, -277, -39, -277, -277, -24, -20, - -52, -277, -277, -277, -277, -54, 1143, -277, -277, -277, - 3, -30, -277, -277, -38, -35, -277, 60, -277, -277, - -277, -277, -277, -277, -277, 68, 82, 1143, 1009, -54, - 1143, 1143, 63, -13, -277, -277, -277, -277, 2139, -277, - -277, -277, -277, -277, 570, 712, -277, -277, -277, -277, - -277, -277, 1032, 1103, -277, -277, 1166, -277, -277, -277, - 1288, 1300, 1310, 1319, -277, -277, 457, 17, -277, -277, - -277, -277, -277, -277, -277, -277, 73, 89, -54, 91, - 97, 96, 105, 112, 108, 114, 1143, 1143, 1357, 1009, - -277, 2222, 113, 115, -277, -277, -277, -277, -277, -277, - -277, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, - 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, - -277, 1210, -54, -277, -277, -277, 121, 117, 1143, -54, - -277, 76, -277, -277, 1143, 1143, -54, 1143, 1143, -54, - 1143, 1523, 1557, -277, 1143, 1869, 1143, -277, 2104, 88, - 88, 2253, 2263, 2335, 2335, -23, -23, -23, -23, 2294, - 720, 2304, -29, -29, -277, -277, -277, 1909, -277, -54, - -21, -277, 135, 809, 1143, 127, -27, 138, 981, 141, - 144, 146, 148, -71, 154, 140, 145, 1076, 159, 156, - 157, -277, 171, 228, 228, -277, -277, -277, 855, -277, + 32, -277, -277, -48, -48, -34, -277, 7, 32, -277, + -277, -277, -277, -277, -277, -38, -277, -277, -41, -25, + -69, -277, -277, -277, -277, -51, 1135, -277, -277, -277, + -19, -29, -277, -277, -46, -43, -277, 22, -277, -277, + -277, -277, -277, -277, -277, 56, 60, 1135, 1001, -51, + 1135, 1135, 55, -30, -277, -277, -277, -277, 2131, -277, + -277, -277, -277, -277, 562, 704, -277, -277, -277, -277, + -277, -277, 1024, 1095, -277, -277, 1158, -277, -277, -277, + 1280, 1292, 1302, 1311, -277, -277, 449, 66, -277, -277, + -277, -277, -277, -277, -277, -277, 65, 81, -51, 83, + 89, 88, 97, 104, 100, 106, 1135, 1135, 1349, 1001, + -277, 2214, 105, 107, -277, -277, -277, -277, -277, -277, + -277, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, + 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, + -277, 1202, -51, -277, -277, -277, 113, 109, 1135, -51, + -277, 68, -277, -277, 1135, 1135, -51, 1135, 1135, -51, + 1135, 1515, 1549, -277, 1135, 1861, 1135, -277, 2096, 80, + 80, 2245, 2255, 2327, 2327, -31, -31, -31, -31, 2286, + 712, 2296, -37, -37, -277, -277, -277, 1901, -277, -51, + -28, -277, 127, 801, 1135, 119, -35, 130, 973, 133, + 136, 138, 140, -78, 146, 132, 137, 1068, 151, 148, + 149, -277, 163, 220, 220, -277, -277, -277, 847, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, - -277, -277, -277, 166, 167, 172, 173, 175, -277, -277, - 657, -277, -277, -277, -277, -26, 1949, 4, 190, 1989, - 21, 195, 2029, -277, -277, 2068, 191, 2222, 1143, -277, - 135, -277, 1143, -277, 935, 2174, -277, 199, -277, 1143, - 224, 1143, 80, -54, 1143, 149, 194, 198, -277, -277, - -277, -277, 2209, -277, 1143, 1143, 1143, -277, -277, 147, - 147, -277, -277, -277, -277, -277, -277, -277, 208, 209, - 211, 212, -277, -277, 1143, 1143, 1143, 1143, 1143, 1143, - 1143, 1143, 1143, 1143, 1143, 213, -277, 1143, 214, -277, - 1143, 215, 1143, 216, 2222, 22, -277, -277, 203, 1591, - 226, 1625, 217, -277, -277, -277, 1237, -4, 1659, -277, - -277, -277, 23, 25, 1869, 1143, 1143, 1143, 1143, 2222, - 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222, - 230, 31, 231, 34, 233, 1693, 1143, -277, -277, 981, - 1143, 981, 1143, 1143, -54, 89, 229, 236, 1727, 1401, - 1445, 1489, 1143, -277, 1143, -277, 1143, -277, 37, 267, - 1761, -277, 2222, 239, 1795, 265, -277, -277, -277, 240, - 241, 1143, 242, 1143, 246, 1143, 41, 84, 93, -277, - 981, 247, 80, 981, 1143, -277, -277, 257, -277, 262, - -277, 264, -277, -277, -277, -277, -277, 269, -277, 1829, - 256, 258, 261, 981, 981, -277, -277, -277, -277, -277 + -277, -277, -277, 158, 159, 164, 165, 167, -277, -277, + 649, -277, -277, -277, -277, -32, 1941, -4, 182, 1981, + 13, 187, 2021, -277, -277, 2060, 183, 2214, 1135, -277, + 127, -277, 1135, -277, 927, 2166, -277, 188, -277, 1135, + 219, 1135, 72, -51, 1135, 141, 186, 190, -277, -277, + -277, -277, 2201, -277, 1135, 1135, 1135, -277, -277, 139, + 139, -277, -277, -277, -277, -277, -277, -277, 200, 203, + 204, 205, -277, -277, 1135, 1135, 1135, 1135, 1135, 1135, + 1135, 1135, 1135, 1135, 1135, 206, -277, 1135, 213, -277, + 1135, 214, 1135, 208, 2214, 14, -277, -277, 191, 1583, + 210, 1617, 202, -277, -277, -277, 1229, -12, 1651, -277, + -277, -277, 15, 17, 1861, 1135, 1135, 1135, 1135, 2214, + 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, + 222, 23, 223, 26, 225, 1685, 1135, -277, -277, 973, + 1135, 973, 1135, 1135, -51, 81, 221, 228, 1719, 1393, + 1437, 1481, 1135, -277, 1135, -277, 1135, -277, 29, 259, + 1753, -277, 2214, 231, 1787, 257, -277, -277, -277, 232, + 233, 1135, 234, 1135, 238, 1135, 33, 76, 85, -277, + 973, 239, 72, 973, 1135, -277, -277, 249, -277, 254, + -277, 256, -277, -277, -277, -277, -277, 261, -277, 1821, + 248, 250, 255, 973, 973, -277, -277, -277, -277, -277 }; const unsigned char @@ -3938,7 +3939,7 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yypgoto_[] = { - -277, -277, -277, 281, 310, 311, -277, -277, -277, 207, + -277, -277, -277, 281, 309, 310, -277, -277, -277, 207, -277, -95, 150, -81, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 201, -277, @@ -3966,19 +3967,19 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yytable_[] = { - 15, 113, 152, 17, 17, 30, 343, 25, 15, 18, - 19, 144, 99, 344, 345, 102, 285, 97, 383, 277, - 148, 145, 98, 29, 20, 32, 271, 57, -212, 278, - 21, 166, 27, 26, 100, 103, 28, 122, 123, 6, - 101, 104, 29, 1, 2, 3, 4, 5, 384, 114, - 96, 326, 16, 6, 16, 6, 166, 16, 6, 137, + 15, 113, 152, 17, 17, 30, 343, 21, 15, 18, + 19, 144, 99, 344, 345, 102, 25, 285, 383, 277, + 20, 145, 148, 27, 29, 32, 97, 271, 57, 278, + -212, 98, 166, 29, 100, 103, 96, 122, 123, 28, + 101, 104, 26, 1, 2, 3, 4, 5, 384, 114, + 6, 326, 16, 6, 16, 6, 166, 16, 6, 137, 138, 139, 113, 135, 136, 137, 138, 139, 329, 377, - 386, 149, 387, 166, 166, 166, 146, 166, 393, 193, - 119, 395, 147, 166, 419, 246, 166, 194, 432, 166, + 386, 119, 387, 166, 166, 166, 146, 166, 393, 193, + 105, 395, 147, 166, 419, 246, 166, 194, 432, 166, 195, 196, 197, 166, 198, 199, 200, 201, 153, 202, 203, 204, 205, 206, 207, 208, 209, 210, 34, 35, - 105, 37, 34, 35, 106, 37, 41, 42, 43, 44, - 41, 42, 43, 44, 151, 211, 212, 246, 107, 150, + 106, 37, 34, 35, 107, 37, 41, 42, 43, 44, + 41, 42, 43, 44, 151, 211, 212, 246, 149, 150, 212, 433, 246, 6, 213, 214, 166, 151, 213, 214, 434, 154, 188, 155, 247, 166, 343, 297, 297, 192, 156, 255, 246, 344, 345, 157, 258, 147, 158, 261, @@ -3990,14 +3991,14 @@ namespace xsk { namespace gsc { namespace iw8 { 248, 247, 249, 255, 255, 293, 297, 249, 255, 147, 147, 296, 303, 304, 147, 248, 248, 58, 305, 306, 248, 307, 249, 249, 144, 144, 327, 249, 143, 16, - 6, 330, 333, 340, 145, 145, 338, 118, 108, 349, - 146, 115, 116, 350, 355, 356, 147, 357, 358, 378, - 34, 35, 376, 37, 370, 372, 374, 247, 41, 42, - 43, 44, 380, 382, 255, 298, 392, 394, 212, 396, + 6, 330, 333, 338, 145, 145, 340, 118, 108, 349, + 146, 115, 116, 350, 355, 378, 147, 356, 357, 358, + 34, 35, 376, 37, 380, 370, 382, 247, 41, 42, + 43, 44, 372, 374, 255, 298, 392, 394, 212, 396, 147, 144, 255, 347, 420, 407, 248, 424, 147, 22, 406, 145, 408, 249, 248, 422, 425, 426, 428, 146, 146, 249, 430, 436, 440, 147, 147, 161, 162, 441, - 165, 442, 445, 246, 446, 246, 443, 447, 23, 24, + 165, 442, 445, 246, 446, 246, 443, 23, 24, 447, 16, 6, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 437, 187, 274, 0, 287, 146, 250, 0, 0, @@ -4214,39 +4215,39 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yycheck_[] = { - 0, 48, 97, 3, 4, 20, 282, 46, 8, 3, - 4, 76, 50, 282, 282, 50, 87, 47, 22, 46, - 46, 76, 52, 94, 46, 25, 47, 98, 54, 56, - 0, 52, 56, 72, 34, 35, 56, 60, 61, 93, - 34, 35, 94, 3, 4, 5, 6, 7, 52, 49, - 47, 47, 92, 93, 92, 93, 52, 92, 93, 88, - 89, 90, 109, 86, 87, 88, 89, 90, 47, 47, - 47, 54, 47, 52, 52, 52, 76, 52, 47, 3, - 93, 47, 76, 52, 47, 151, 52, 11, 47, 52, - 14, 15, 16, 52, 18, 19, 20, 21, 98, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 50, 35, 32, 33, 46, 35, 40, 41, 42, 43, - 40, 41, 42, 43, 48, 49, 50, 193, 46, 56, - 50, 47, 198, 93, 58, 59, 52, 48, 58, 59, - 47, 50, 142, 46, 151, 52, 422, 213, 214, 149, - 54, 151, 218, 422, 422, 50, 156, 151, 46, 159, - 97, 98, 54, 151, 50, 52, 51, 46, 92, 93, - 151, 54, 92, 93, 86, 87, 88, 89, 90, 32, - 33, 46, 35, 56, 46, 250, 193, 46, 203, 189, - 46, 198, 46, 193, 46, 250, 56, 50, 198, 193, - 53, 56, 46, 46, 198, 193, 213, 214, 274, 55, - 198, 218, 193, 213, 214, 56, 282, 198, 218, 213, - 214, 50, 56, 56, 218, 213, 214, 26, 56, 56, - 218, 56, 213, 214, 299, 300, 46, 218, 91, 92, - 93, 46, 51, 19, 299, 300, 47, 98, 47, 55, - 250, 50, 51, 55, 46, 46, 250, 46, 46, 56, - 32, 33, 46, 35, 51, 51, 51, 274, 40, 41, - 42, 43, 46, 56, 274, 282, 46, 46, 50, 46, - 274, 346, 282, 283, 17, 56, 274, 22, 282, 8, - 385, 346, 56, 274, 282, 56, 56, 56, 56, 299, - 300, 282, 56, 56, 47, 299, 300, 106, 107, 47, - 109, 47, 56, 379, 56, 381, 47, 56, 8, 8, - 92, 93, 121, 122, 123, 124, 125, 126, 127, 128, + 0, 48, 97, 3, 4, 20, 282, 0, 8, 3, + 4, 76, 58, 282, 282, 58, 54, 95, 30, 54, + 54, 76, 54, 64, 102, 25, 55, 55, 106, 64, + 62, 60, 60, 102, 34, 35, 55, 68, 69, 64, + 34, 35, 80, 11, 12, 13, 14, 15, 60, 49, + 101, 55, 100, 101, 100, 101, 60, 100, 101, 96, + 97, 98, 109, 94, 95, 96, 97, 98, 55, 55, + 55, 101, 55, 60, 60, 60, 76, 60, 55, 11, + 58, 55, 76, 60, 55, 151, 60, 19, 55, 60, + 22, 23, 24, 60, 26, 27, 28, 29, 98, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 54, 43, 40, 41, 54, 43, 48, 49, 50, 51, + 48, 49, 50, 51, 56, 57, 58, 193, 62, 64, + 58, 55, 198, 101, 66, 67, 60, 56, 66, 67, + 55, 58, 142, 54, 151, 60, 422, 213, 214, 149, + 62, 151, 218, 422, 422, 58, 156, 151, 54, 159, + 105, 106, 62, 151, 58, 60, 59, 54, 100, 101, + 151, 62, 100, 101, 94, 95, 96, 97, 98, 40, + 41, 54, 43, 64, 54, 250, 193, 54, 203, 189, + 54, 198, 54, 193, 54, 250, 64, 58, 198, 193, + 61, 64, 54, 54, 198, 193, 213, 214, 274, 63, + 198, 218, 193, 213, 214, 64, 282, 198, 218, 213, + 214, 58, 64, 64, 218, 213, 214, 26, 64, 64, + 218, 64, 213, 214, 299, 300, 54, 218, 99, 100, + 101, 54, 59, 55, 299, 300, 27, 106, 47, 63, + 250, 50, 51, 63, 54, 64, 250, 54, 54, 54, + 40, 41, 54, 43, 54, 59, 64, 274, 48, 49, + 50, 51, 59, 59, 274, 282, 54, 54, 58, 54, + 274, 346, 282, 283, 25, 64, 274, 30, 282, 8, + 385, 346, 64, 274, 282, 64, 64, 64, 64, 299, + 300, 282, 64, 64, 55, 299, 300, 106, 107, 55, + 109, 55, 64, 379, 64, 381, 55, 8, 8, 64, + 100, 101, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 422, 141, 193, -1, 203, 346, 151, -1, -1, -1, -1, 346, -1, 420, 154, 422, 423, 157, -1, @@ -4262,279 +4263,279 @@ namespace xsk { namespace gsc { namespace iw8 { 444, 198, -1, -1, 148, 443, 444, -1, -1, -1, -1, 155, 443, 444, 158, -1, 213, 214, -1, 268, 274, 218, -1, -1, -1, -1, -1, -1, 282, -1, - 279, 274, 281, -1, 151, 284, -1, -1, -1, 32, - 33, -1, 35, -1, -1, -1, 39, 296, 151, -1, - -1, -1, -1, 46, -1, -1, -1, 50, -1, -1, - 53, 54, -1, -1, -1, 314, 315, 316, 317, 318, + 279, 274, 281, -1, 151, 284, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 47, 296, 151, -1, + -1, -1, -1, 54, -1, -1, -1, 58, -1, -1, + 61, 62, -1, -1, -1, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 193, 274, -1, 151, -1, 198, -1, 332, -1, 282, -1, -1, -1, -1, - 193, -1, -1, -1, -1, 198, 213, 214, 91, 92, - 93, 218, -1, -1, -1, -1, 355, 356, 357, 358, + 193, -1, -1, -1, -1, 198, 213, 214, 99, 100, + 101, 218, -1, -1, -1, -1, 355, 356, 357, 358, 213, 214, -1, -1, -1, 218, -1, -1, -1, -1, -1, 193, -1, -1, -1, 379, 198, 381, 272, -1, -1, 380, -1, 382, 383, -1, 379, -1, 381, -1, -1, 213, 214, -1, -1, -1, 218, -1, -1, -1, - 294, 295, 32, 33, -1, 35, -1, 274, -1, 39, + 294, 295, 40, 41, -1, 43, -1, 274, -1, 47, -1, -1, -1, -1, -1, 282, 420, -1, 422, 423, - 50, 274, -1, 53, -1, 424, -1, 420, -1, 282, + 58, 274, -1, 61, -1, 424, -1, 420, -1, 282, 423, -1, 379, 327, 381, -1, 330, -1, -1, 443, 444, -1, -1, -1, -1, -1, -1, -1, -1, -1, 443, 444, 274, -1, -1, -1, -1, -1, -1, -1, - 282, 91, 92, 93, -1, -1, 9, 10, -1, 12, - 13, -1, -1, 420, -1, 422, 423, -1, -1, -1, - -1, -1, 376, -1, -1, -1, -1, -1, -1, 32, - 33, -1, 35, -1, -1, -1, 443, 444, 392, -1, - 394, -1, 396, -1, -1, -1, -1, 50, -1, -1, - 53, -1, 379, -1, 381, 58, 59, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 379, -1, 381, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - -1, -1, -1, -1, 32, 33, -1, 35, 91, 92, - 93, 39, -1, 420, -1, 422, 423, 379, -1, 381, - -1, -1, 50, -1, -1, 53, -1, 420, -1, 422, + 282, 99, 100, 101, -1, -1, 17, 18, -1, 20, + 21, -1, -1, 420, -1, 422, 423, -1, -1, -1, + -1, -1, 376, -1, -1, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 443, 444, 392, -1, + 394, -1, 396, -1, -1, -1, -1, 58, -1, -1, + 61, -1, 379, -1, 381, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 379, -1, 381, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + -1, -1, -1, -1, 40, 41, -1, 43, 99, 100, + 101, 47, -1, 420, -1, 422, 423, 379, -1, 381, + -1, -1, 58, -1, -1, 61, -1, 420, -1, 422, 423, -1, -1, -1, -1, -1, 443, 444, -1, -1, - 60, 61, -1, -1, 64, 65, 66, 67, 68, 69, + 68, 69, -1, -1, 72, 73, 74, 75, 76, 77, 443, 444, -1, -1, -1, -1, -1, -1, 420, -1, - 422, 423, -1, 91, 92, 93, 86, 87, 88, 89, - 90, -1, 3, 4, -1, -1, -1, -1, -1, -1, - 11, 443, 444, 14, 15, 16, -1, 18, 19, 20, - 21, -1, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, -1, 35, -1, -1, -1, -1, 40, - 41, 42, 43, -1, -1, -1, -1, 48, 3, 50, - -1, -1, -1, -1, -1, -1, 11, 58, 59, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, - -1, 92, 93, 48, 49, 50, -1, -1, -1, -1, - -1, -1, -1, 58, 59, -1, -1, -1, -1, -1, + 422, 423, -1, 99, 100, 101, 94, 95, 96, 97, + 98, -1, 11, 12, -1, -1, -1, -1, -1, -1, + 19, 443, 444, 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, -1, 48, + 49, 50, 51, -1, -1, -1, -1, 56, 11, 58, + -1, -1, -1, -1, -1, -1, 19, 66, 67, 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, -1, 48, 49, 50, 51, -1, + -1, 100, 101, 56, 57, 58, -1, -1, -1, -1, + -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 92, 93, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, - -1, -1, -1, 48, 3, 50, -1, -1, -1, -1, - -1, -1, 11, 58, 59, 14, 15, 16, -1, 18, - 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, -1, 35, 8, -1, -1, - -1, 40, 41, 42, 43, -1, -1, 92, 93, 48, - -1, 50, -1, -1, -1, -1, -1, -1, -1, 58, - 59, 32, 33, 34, 35, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, 46, -1, -1, -1, 50, - 51, -1, -1, 54, 32, 33, -1, 35, -1, -1, - -1, 39, -1, 92, 93, -1, -1, -1, -1, 70, - 71, -1, 50, -1, 8, 53, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 87, -1, -1, 90, - -1, 92, 93, 94, 95, 96, 97, 98, 32, 33, - 34, 35, 36, 37, 38, -1, 40, 41, 42, 43, - 44, 45, 46, 91, 92, 93, 50, -1, -1, -1, - 54, -1, 56, -1, -1, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, 70, 71, -1, -1, - -1, 8, -1, 50, -1, -1, 53, -1, -1, -1, - -1, -1, -1, 87, -1, -1, 90, -1, 92, 93, - 94, 95, 96, 97, 98, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, 45, 46, - -1, -1, -1, 50, 91, 92, 93, 54, 32, 33, - -1, 35, -1, -1, -1, 39, -1, -1, -1, -1, - -1, -1, -1, 70, 71, -1, 50, -1, 8, 53, + -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 100, 101, 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, -1, 48, 49, 50, 51, -1, + -1, -1, -1, 56, 11, 58, -1, -1, -1, -1, + -1, -1, 19, 66, 67, 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, + -1, 48, 49, 50, 51, -1, -1, 100, 101, 56, + -1, 58, -1, -1, -1, -1, -1, -1, -1, 66, + 67, 40, 41, 42, 43, 44, 45, 46, -1, 48, + 49, 50, 51, 52, 53, 54, -1, -1, -1, 58, + 59, -1, -1, 62, 40, 41, -1, 43, -1, -1, + -1, 47, -1, 100, 101, -1, -1, -1, -1, 78, + 79, -1, 58, -1, 16, 61, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, 98, + -1, 100, 101, 102, 103, 104, 105, 106, 40, 41, + 42, 43, 44, 45, 46, -1, 48, 49, 50, 51, + 52, 53, 54, 99, 100, 101, 58, -1, -1, -1, + 62, -1, 64, -1, -1, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, 78, 79, -1, -1, + -1, 16, -1, 58, -1, -1, 61, -1, -1, -1, + -1, -1, -1, 95, -1, -1, 98, -1, 100, 101, + 102, 103, 104, 105, 106, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, + -1, -1, -1, 58, 99, 100, 101, 62, 40, 41, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, + -1, -1, -1, 78, 79, -1, 58, -1, 16, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 87, -1, -1, 90, -1, 92, 93, 94, 95, 96, - 97, 98, 32, 33, 34, 35, 36, 37, 38, -1, - 40, 41, 42, 43, 44, 45, 46, 91, 92, 93, - 50, -1, -1, -1, 54, -1, -1, -1, -1, 32, - 33, -1, 35, -1, -1, -1, -1, -1, -1, -1, - 70, 71, -1, -1, -1, -1, -1, 50, -1, -1, - 53, -1, -1, -1, -1, 58, 59, 87, -1, -1, - 90, -1, 92, 93, 94, 95, 96, 97, 98, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 32, 33, -1, 35, -1, -1, -1, 39, 91, 92, - 93, -1, 32, 33, -1, 35, -1, -1, 50, 39, - -1, 53, 32, 33, -1, 35, -1, -1, -1, 39, - 50, 32, 33, 53, 35, -1, -1, -1, 39, -1, - 50, -1, -1, 53, -1, -1, -1, -1, -1, 50, - -1, -1, 53, -1, -1, -1, -1, -1, -1, 91, - 92, 93, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, 92, 93, -1, -1, -1, -1, -1, -1, - -1, 91, 92, 93, 47, -1, -1, -1, -1, 52, - 91, 92, 93, -1, 57, -1, -1, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, -1, -1, -1, + 95, -1, -1, 98, -1, 100, 101, 102, 103, 104, + 105, 106, 40, 41, 42, 43, 44, 45, 46, -1, + 48, 49, 50, 51, 52, 53, 54, 99, 100, 101, + 58, -1, -1, -1, 62, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, -1, -1, -1, -1, + 78, 79, -1, -1, -1, -1, -1, 58, -1, -1, + 61, -1, -1, -1, -1, 66, 67, 95, -1, -1, + 98, -1, 100, 101, 102, 103, 104, 105, 106, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 40, 41, -1, 43, -1, -1, -1, 47, 99, 100, + 101, -1, 40, 41, -1, 43, -1, -1, 58, 47, + -1, 61, 40, 41, -1, 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, + -1, -1, 61, -1, -1, -1, -1, -1, -1, 99, + 100, 101, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 99, 100, 101, -1, -1, -1, -1, -1, -1, + -1, 99, 100, 101, 55, -1, -1, -1, -1, 60, + 99, 100, 101, -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, - 83, 84, 85, 86, 87, 88, 89, 90, 47, -1, - -1, -1, -1, 52, -1, -1, -1, -1, 57, -1, - -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 83, 84, 85, 86, 87, 88, - 89, 90, 47, -1, -1, -1, -1, 52, -1, -1, - -1, -1, 57, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 83, 84, - 85, 86, 87, 88, 89, 90, 47, -1, -1, -1, - -1, 52, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, - 47, -1, 83, 84, 85, 86, 87, 88, 89, 90, - 57, -1, -1, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 47, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 57, -1, -1, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, - 83, 84, 85, 86, 87, 88, 89, 90, 57, -1, - -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 47, -1, 83, 84, 85, 86, 87, 88, - 89, 90, 57, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 47, -1, 83, 84, - 85, 86, 87, 88, 89, 90, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, - 47, -1, 83, 84, 85, 86, 87, 88, 89, 90, - 57, -1, -1, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 47, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 57, -1, -1, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, - 83, 84, 85, 86, 87, 88, 89, 90, 57, -1, - -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 47, -1, 83, 84, 85, 86, 87, 88, - 89, 90, 57, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 47, -1, 83, 84, - 85, 86, 87, 88, 89, 90, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 52, -1, -1, -1, -1, 57, -1, -1, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, 55, - -1, 57, -1, -1, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 83, 84, 85, - 86, 87, 88, 89, 90, 56, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, + -1, 91, 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, 83, 84, 85, 86, 87, 88, 89, 90, - 56, 57, -1, -1, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 83, 84, 85, - 86, 87, 88, 89, 90, 56, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 57, - -1, -1, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 83, 84, 85, 86, 87, 88, 89, 90, - -1, -1, -1, -1, -1, 83, 84, 85, 86, 87, - 88, 89, 90, 60, 61, -1, 63, 64, 65, 66, - 67, 68, 69, 60, 61, -1, -1, 64, 65, 66, - 67, 68, 69, -1, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 60, 61, -1, -1, 64, 65, - 66, 67, 68, 69, 60, 61, -1, -1, 64, 65, - 66, 67, 68, 69, -1, -1, -1, -1, 84, 85, - 86, 87, 88, 89, 90, -1, -1, -1, 84, -1, - 86, 87, 88, 89, 90, 60, 61, -1, -1, -1, - -1, 66, 67, 68, 69, -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, -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, 68, 69, -1, -1, 72, 73, + 74, 75, 76, 77, -1, -1, -1, -1, 92, 93, + 94, 95, 96, 97, 98, -1, -1, -1, 92, -1, + 94, 95, 96, 97, 98, 68, 69, -1, -1, -1, + -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 86, 87, 88, 89, 90 + -1, 94, 95, 96, 97, 98 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 93, 109, 110, 111, - 112, 113, 114, 115, 116, 181, 92, 181, 182, 182, - 46, 0, 111, 112, 113, 46, 72, 56, 56, 94, - 184, 161, 181, 8, 32, 33, 34, 35, 36, 37, - 38, 40, 41, 42, 43, 44, 45, 46, 50, 54, - 70, 71, 87, 90, 95, 96, 97, 98, 146, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 47, 47, 52, 50, - 181, 182, 50, 181, 182, 50, 46, 46, 146, 50, - 51, 146, 162, 163, 181, 146, 146, 97, 98, 93, - 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 83, 84, 85, 86, 87, 88, 89, 90, - 39, 50, 53, 91, 158, 159, 181, 182, 46, 54, - 56, 48, 119, 181, 50, 46, 54, 50, 46, 54, - 50, 146, 146, 47, 52, 146, 52, 51, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 181, 54, - 162, 163, 181, 3, 11, 14, 15, 16, 18, 19, - 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 49, 50, 58, 59, 117, 118, 119, 120, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 148, 149, 150, 156, 157, 167, 168, - 171, 175, 176, 177, 178, 181, 146, 162, 181, 146, - 162, 181, 146, 47, 47, 146, 51, 146, 55, 51, - 181, 47, 46, 4, 120, 146, 56, 46, 56, 46, - 117, 46, 46, 46, 46, 87, 184, 188, 55, 56, - 56, 56, 146, 56, 46, 46, 50, 156, 157, 171, - 171, 49, 117, 56, 56, 56, 56, 56, 9, 10, - 12, 13, 58, 59, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 51, 47, 46, 51, 47, - 46, 51, 52, 51, 146, 162, 4, 56, 47, 146, - 19, 146, 121, 148, 149, 150, 171, 181, 146, 55, - 55, 56, 162, 162, 146, 46, 46, 46, 46, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 51, 162, 51, 162, 51, 146, 46, 47, 56, 47, - 46, 47, 56, 22, 52, 47, 47, 47, 146, 146, - 146, 146, 46, 47, 46, 47, 46, 47, 162, 117, - 146, 117, 146, 147, 146, 181, 119, 56, 56, 47, - 47, 52, 47, 52, 47, 52, 162, 162, 162, 47, - 17, 47, 56, 47, 22, 56, 56, 163, 56, 163, - 56, 163, 47, 47, 47, 117, 56, 121, 117, 146, - 47, 47, 47, 47, 47, 56, 56, 56, 117, 117 + 0, 11, 12, 13, 14, 15, 101, 117, 118, 119, + 120, 121, 122, 123, 124, 189, 100, 189, 190, 190, + 54, 0, 119, 120, 121, 54, 80, 64, 64, 102, + 192, 169, 189, 16, 40, 41, 42, 43, 44, 45, + 46, 48, 49, 50, 51, 52, 53, 54, 58, 62, + 78, 79, 95, 98, 103, 104, 105, 106, 154, 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, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 55, 55, 60, 58, + 189, 190, 58, 189, 190, 58, 54, 54, 154, 58, + 59, 154, 170, 171, 189, 154, 154, 105, 106, 101, + 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 91, 92, 93, 94, 95, 96, 97, 98, + 47, 58, 61, 99, 166, 167, 189, 190, 54, 62, + 64, 56, 127, 189, 58, 54, 62, 58, 54, 62, + 58, 154, 154, 55, 60, 154, 60, 59, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 189, 62, + 170, 171, 189, 11, 19, 22, 23, 24, 26, 27, + 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 57, 58, 66, 67, 125, 126, 127, 128, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 156, 157, 158, 164, 165, 175, 176, + 179, 183, 184, 185, 186, 189, 154, 170, 189, 154, + 170, 189, 154, 55, 55, 154, 59, 154, 63, 59, + 189, 55, 54, 12, 128, 154, 64, 54, 64, 54, + 125, 54, 54, 54, 54, 95, 192, 196, 63, 64, + 64, 64, 154, 64, 54, 54, 58, 164, 165, 179, + 179, 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, 154, 170, 12, 64, 55, 154, + 27, 154, 129, 156, 157, 158, 179, 189, 154, 63, + 63, 64, 170, 170, 154, 54, 54, 54, 54, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 59, 170, 59, 170, 59, 154, 54, 55, 64, 55, + 54, 55, 64, 30, 60, 55, 55, 55, 154, 154, + 154, 154, 54, 55, 54, 55, 54, 55, 170, 125, + 154, 125, 154, 155, 154, 189, 127, 64, 64, 55, + 55, 60, 55, 60, 55, 60, 170, 170, 170, 55, + 25, 55, 64, 55, 30, 64, 64, 171, 64, 171, + 64, 171, 55, 55, 55, 125, 64, 129, 125, 154, + 55, 55, 55, 55, 55, 64, 64, 64, 125, 125 }; const unsigned char parser::yyr1_[] = { - 0, 108, 109, 109, 110, 110, 110, 110, 110, 110, - 111, 112, 113, 113, 113, 113, 113, 114, 115, 116, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 118, 118, 119, 119, - 120, 120, 121, 121, 121, 121, 122, 122, 123, 123, - 123, 124, 125, 125, 126, 127, 127, 128, 128, 129, - 130, 130, 131, 132, 133, 134, 135, 136, 136, 137, - 138, 138, 139, 140, 141, 142, 142, 143, 144, 145, - 146, 146, 146, 147, 147, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 149, 149, 150, 150, - 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 154, - 155, 156, 156, 157, 157, 158, 158, 158, 158, 158, - 158, 159, 159, 159, 159, 160, 161, 161, 161, 162, - 162, 163, 163, 164, 165, 166, 166, 167, 168, 168, - 169, 170, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 182, 183, 184, 185, 186, 187, 187, 188, - 188, 189, 190 + 0, 116, 117, 117, 118, 118, 118, 118, 118, 118, + 119, 120, 121, 121, 121, 121, 121, 122, 123, 124, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 126, 126, 127, 127, + 128, 128, 129, 129, 129, 129, 130, 130, 131, 131, + 131, 132, 133, 133, 134, 135, 135, 136, 136, 137, + 138, 138, 139, 140, 141, 142, 143, 144, 144, 145, + 146, 146, 147, 148, 149, 150, 150, 151, 152, 153, + 154, 154, 154, 155, 155, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 157, 157, 158, 158, + 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 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, 173, 174, 174, 175, 176, 176, + 177, 178, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 190, 191, 192, 193, 194, 195, 195, 196, + 196, 197, 198 }; const signed char @@ -4572,29 +4573,29 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yyrline_[] = { - 0, 250, 250, 251, 255, 257, 259, 261, 263, 265, - 270, 274, 279, 280, 281, 282, 283, 287, 292, 297, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 331, 332, 336, 337, - 341, 343, 348, 350, 352, 355, 359, 361, 366, 368, - 370, 375, 380, 382, 387, 392, 394, 399, 401, 406, - 411, 413, 418, 423, 428, 433, 438, 443, 445, 450, - 455, 457, 462, 467, 472, 477, 479, 484, 489, 494, - 499, 500, 501, 505, 506, 510, 512, 514, 516, 518, - 520, 522, 524, 526, 528, 530, 535, 537, 542, 544, - 549, 554, 556, 558, 560, 562, 564, 566, 568, 570, - 572, 574, 576, 578, 580, 582, 584, 586, 588, 593, - 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, - 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, - 614, 615, 616, 617, 618, 619, 620, 621, 622, 626, - 631, 636, 637, 640, 641, 645, 647, 649, 651, 653, - 655, 660, 662, 664, 666, 671, 676, 678, 681, 685, - 688, 692, 694, 699, 704, 709, 711, 716, 721, 723, - 728, 733, 738, 739, 740, 741, 742, 743, 744, 745, - 746, 750, 755, 760, 765, 770, 775, 780, 785, 790, - 795, 800, 802, 807, 812, 817, 822, 827, 829, 834, - 836, 841, 846 + 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, 334, 335, 339, 340, 344, 345, + 349, 351, 356, 358, 360, 363, 367, 369, 374, 376, + 378, 383, 388, 390, 395, 400, 402, 407, 409, 414, + 419, 421, 426, 431, 436, 441, 446, 451, 453, 458, + 463, 465, 470, 475, 480, 485, 487, 492, 497, 502, + 507, 508, 509, 513, 514, 518, 520, 522, 524, 526, + 528, 530, 532, 534, 536, 538, 543, 545, 550, 552, + 557, 562, 564, 566, 568, 570, 572, 574, 576, 578, + 580, 582, 584, 586, 588, 590, 592, 594, 596, 601, + 602, 603, 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, 634, + 639, 644, 645, 648, 649, 653, 655, 657, 659, 661, + 663, 668, 670, 672, 674, 679, 684, 686, 689, 693, + 696, 700, 702, 707, 712, 717, 719, 724, 729, 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, 820, 825, 830, 835, 837, 842, + 844, 849, 854 }; void @@ -4627,9 +4628,9 @@ namespace xsk { namespace gsc { namespace iw8 { #line 13 "parser.ypp" } } } // xsk::gsc::iw8 -#line 4631 "parser.cpp" +#line 4632 "parser.cpp" -#line 850 "parser.ypp" +#line 858 "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 4581cca8..b8455412 100644 --- a/src/iw8/xsk/parser.hpp +++ b/src/iw8/xsk/parser.hpp @@ -683,111 +683,119 @@ namespace xsk { namespace gsc { namespace iw8 { IW8EOF = 0, // "end of file" IW8error = 1, // error IW8UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - WAITFRAME = 15, // "waitframe" - IF = 16, // "if" - ELSE = 17, // "else" - DO = 18, // "do" - WHILE = 19, // "while" - FOR = 20, // "for" - FOREACH = 21, // "foreach" - IN = 22, // "in" - SWITCH = 23, // "switch" - CASE = 24, // "case" - DEFAULT = 25, // "default" - BREAK = 26, // "break" - CONTINUE = 27, // "continue" - RETURN = 28, // "return" - BREAKPOINT = 29, // "breakpoint" - PROFBEGIN = 30, // "prof_begin" - PROFEND = 31, // "prof_end" - THREAD = 32, // "thread" - CHILDTHREAD = 33, // "childthread" - THISTHREAD = 34, // "thisthread" - CALL = 35, // "call" - TRUE = 36, // "true" - FALSE = 37, // "false" - UNDEFINED = 38, // "undefined" - SIZE = 39, // ".size" - GAME = 40, // "game" - SELF = 41, // "self" - ANIM = 42, // "anim" - LEVEL = 43, // "level" - ISDEFINED = 44, // "isdefined" - ISTRUE = 45, // "istrue" - LPAREN = 46, // "(" - RPAREN = 47, // ")" - LBRACE = 48, // "{" - RBRACE = 49, // "}" - LBRACKET = 50, // "[" - RBRACKET = 51, // "]" - COMMA = 52, // "," - DOT = 53, // "." - DOUBLECOLON = 54, // "::" - COLON = 55, // ":" - SEMICOLON = 56, // ";" - QMARK = 57, // "?" - INCREMENT = 58, // "++" - DECREMENT = 59, // "--" - LSHIFT = 60, // "<<" - RSHIFT = 61, // ">>" - OR = 62, // "||" - AND = 63, // "&&" - EQUALITY = 64, // "==" - INEQUALITY = 65, // "!=" - LESS_EQUAL = 66, // "<=" - GREATER_EQUAL = 67, // ">=" - LESS = 68, // "<" - GREATER = 69, // ">" - NOT = 70, // "!" - COMPLEMENT = 71, // "~" - ASSIGN = 72, // "=" - ASSIGN_ADD = 73, // "+=" - ASSIGN_SUB = 74, // "-=" - ASSIGN_MUL = 75, // "*=" - ASSIGN_DIV = 76, // "/=" - ASSIGN_MOD = 77, // "%=" - ASSIGN_BW_OR = 78, // "|=" - ASSIGN_BW_AND = 79, // "&=" - ASSIGN_BW_EXOR = 80, // "^=" - ASSIGN_RSHIFT = 81, // ">>=" - ASSIGN_LSHIFT = 82, // "<<=" - BITWISE_OR = 83, // "|" - BITWISE_AND = 84, // "&" - BITWISE_EXOR = 85, // "^" - ADD = 86, // "+" - SUB = 87, // "-" - MUL = 88, // "*" - DIV = 89, // "/" - MOD = 90, // "%" - FIELD = 91, // "field" - PATH = 92, // "path" - IDENTIFIER = 93, // "identifier" - STRING = 94, // "string literal" - ISTRING = 95, // "localized string" - COLOR = 96, // "color" - FLOAT = 97, // "float" - INTEGER = 98, // "integer" - ADD_ARRAY = 99, // ADD_ARRAY - THEN = 100, // THEN - TERN = 101, // TERN - NEG = 102, // NEG - ANIMREF = 103, // ANIMREF - PREINC = 104, // PREINC - PREDEC = 105, // PREDEC - POSTINC = 106, // POSTINC - POSTDEC = 107 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + WAITFRAME = 23, // "waitframe" + IF = 24, // "if" + ELSE = 25, // "else" + DO = 26, // "do" + WHILE = 27, // "while" + FOR = 28, // "for" + FOREACH = 29, // "foreach" + IN = 30, // "in" + SWITCH = 31, // "switch" + CASE = 32, // "case" + DEFAULT = 33, // "default" + BREAK = 34, // "break" + CONTINUE = 35, // "continue" + RETURN = 36, // "return" + BREAKPOINT = 37, // "breakpoint" + PROFBEGIN = 38, // "prof_begin" + PROFEND = 39, // "prof_end" + THREAD = 40, // "thread" + CHILDTHREAD = 41, // "childthread" + THISTHREAD = 42, // "thisthread" + CALL = 43, // "call" + TRUE = 44, // "true" + FALSE = 45, // "false" + UNDEFINED = 46, // "undefined" + SIZE = 47, // ".size" + GAME = 48, // "game" + SELF = 49, // "self" + ANIM = 50, // "anim" + LEVEL = 51, // "level" + ISDEFINED = 52, // "isdefined" + ISTRUE = 53, // "istrue" + LPAREN = 54, // "(" + RPAREN = 55, // ")" + LBRACE = 56, // "{" + RBRACE = 57, // "}" + LBRACKET = 58, // "[" + RBRACKET = 59, // "]" + COMMA = 60, // "," + DOT = 61, // "." + DOUBLECOLON = 62, // "::" + COLON = 63, // ":" + SEMICOLON = 64, // ";" + QMARK = 65, // "?" + INCREMENT = 66, // "++" + DECREMENT = 67, // "--" + LSHIFT = 68, // "<<" + RSHIFT = 69, // ">>" + OR = 70, // "||" + AND = 71, // "&&" + EQUALITY = 72, // "==" + INEQUALITY = 73, // "!=" + LESS_EQUAL = 74, // "<=" + GREATER_EQUAL = 75, // ">=" + LESS = 76, // "<" + GREATER = 77, // ">" + NOT = 78, // "!" + COMPLEMENT = 79, // "~" + ASSIGN = 80, // "=" + ASSIGN_ADD = 81, // "+=" + ASSIGN_SUB = 82, // "-=" + ASSIGN_MUL = 83, // "*=" + ASSIGN_DIV = 84, // "/=" + ASSIGN_MOD = 85, // "%=" + ASSIGN_BW_OR = 86, // "|=" + ASSIGN_BW_AND = 87, // "&=" + ASSIGN_BW_EXOR = 88, // "^=" + ASSIGN_RSHIFT = 89, // ">>=" + ASSIGN_LSHIFT = 90, // "<<=" + BITWISE_OR = 91, // "|" + BITWISE_AND = 92, // "&" + BITWISE_EXOR = 93, // "^" + ADD = 94, // "+" + SUB = 95, // "-" + MUL = 96, // "*" + DIV = 97, // "/" + MOD = 98, // "%" + FIELD = 99, // "field" + PATH = 100, // "path" + IDENTIFIER = 101, // "identifier" + STRING = 102, // "string literal" + ISTRING = 103, // "localized string" + COLOR = 104, // "color" + FLOAT = 105, // "float" + INTEGER = 106, // "integer" + ADD_ARRAY = 107, // ADD_ARRAY + THEN = 108, // THEN + TERN = 109, // TERN + NEG = 110, // NEG + ANIMREF = 111, // ANIMREF + PREINC = 112, // PREINC + PREDEC = 113, // PREDEC + POSTINC = 114, // POSTINC + POSTDEC = 115 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -804,199 +812,207 @@ namespace xsk { namespace gsc { namespace iw8 { { enum symbol_kind_type { - YYNTOKENS = 108, ///< Number of tokens. + YYNTOKENS = 116, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_WAITFRAME = 15, // "waitframe" - S_IF = 16, // "if" - S_ELSE = 17, // "else" - S_DO = 18, // "do" - S_WHILE = 19, // "while" - S_FOR = 20, // "for" - S_FOREACH = 21, // "foreach" - S_IN = 22, // "in" - S_SWITCH = 23, // "switch" - S_CASE = 24, // "case" - S_DEFAULT = 25, // "default" - S_BREAK = 26, // "break" - S_CONTINUE = 27, // "continue" - S_RETURN = 28, // "return" - S_BREAKPOINT = 29, // "breakpoint" - S_PROFBEGIN = 30, // "prof_begin" - S_PROFEND = 31, // "prof_end" - S_THREAD = 32, // "thread" - S_CHILDTHREAD = 33, // "childthread" - S_THISTHREAD = 34, // "thisthread" - S_CALL = 35, // "call" - S_TRUE = 36, // "true" - S_FALSE = 37, // "false" - S_UNDEFINED = 38, // "undefined" - S_SIZE = 39, // ".size" - S_GAME = 40, // "game" - S_SELF = 41, // "self" - S_ANIM = 42, // "anim" - S_LEVEL = 43, // "level" - S_ISDEFINED = 44, // "isdefined" - S_ISTRUE = 45, // "istrue" - S_LPAREN = 46, // "(" - S_RPAREN = 47, // ")" - S_LBRACE = 48, // "{" - S_RBRACE = 49, // "}" - S_LBRACKET = 50, // "[" - S_RBRACKET = 51, // "]" - S_COMMA = 52, // "," - S_DOT = 53, // "." - S_DOUBLECOLON = 54, // "::" - S_COLON = 55, // ":" - S_SEMICOLON = 56, // ";" - S_QMARK = 57, // "?" - S_INCREMENT = 58, // "++" - S_DECREMENT = 59, // "--" - S_LSHIFT = 60, // "<<" - S_RSHIFT = 61, // ">>" - S_OR = 62, // "||" - S_AND = 63, // "&&" - S_EQUALITY = 64, // "==" - S_INEQUALITY = 65, // "!=" - S_LESS_EQUAL = 66, // "<=" - S_GREATER_EQUAL = 67, // ">=" - S_LESS = 68, // "<" - S_GREATER = 69, // ">" - S_NOT = 70, // "!" - S_COMPLEMENT = 71, // "~" - S_ASSIGN = 72, // "=" - S_ASSIGN_ADD = 73, // "+=" - S_ASSIGN_SUB = 74, // "-=" - S_ASSIGN_MUL = 75, // "*=" - S_ASSIGN_DIV = 76, // "/=" - S_ASSIGN_MOD = 77, // "%=" - S_ASSIGN_BW_OR = 78, // "|=" - S_ASSIGN_BW_AND = 79, // "&=" - S_ASSIGN_BW_EXOR = 80, // "^=" - S_ASSIGN_RSHIFT = 81, // ">>=" - S_ASSIGN_LSHIFT = 82, // "<<=" - S_BITWISE_OR = 83, // "|" - S_BITWISE_AND = 84, // "&" - S_BITWISE_EXOR = 85, // "^" - S_ADD = 86, // "+" - S_SUB = 87, // "-" - S_MUL = 88, // "*" - S_DIV = 89, // "/" - S_MOD = 90, // "%" - S_FIELD = 91, // "field" - S_PATH = 92, // "path" - S_IDENTIFIER = 93, // "identifier" - S_STRING = 94, // "string literal" - S_ISTRING = 95, // "localized string" - S_COLOR = 96, // "color" - S_FLOAT = 97, // "float" - S_INTEGER = 98, // "integer" - S_ADD_ARRAY = 99, // ADD_ARRAY - S_THEN = 100, // THEN - S_TERN = 101, // TERN - S_NEG = 102, // NEG - S_ANIMREF = 103, // ANIMREF - S_PREINC = 104, // PREINC - S_PREDEC = 105, // PREDEC - S_POSTINC = 106, // POSTINC - S_POSTDEC = 107, // POSTDEC - S_YYACCEPT = 108, // $accept - S_root = 109, // root - S_program = 110, // program - S_inline = 111, // inline - S_include = 112, // include - S_declaration = 113, // declaration - S_decl_usingtree = 114, // decl_usingtree - S_decl_constant = 115, // decl_constant - S_decl_thread = 116, // decl_thread - S_stmt = 117, // stmt - S_stmt_dev = 118, // stmt_dev - S_stmt_block = 119, // stmt_block - S_stmt_list = 120, // stmt_list - S_stmt_expr = 121, // stmt_expr - S_stmt_call = 122, // stmt_call - S_stmt_assign = 123, // stmt_assign - S_stmt_endon = 124, // stmt_endon - S_stmt_notify = 125, // stmt_notify - S_stmt_wait = 126, // stmt_wait - S_stmt_waittill = 127, // stmt_waittill - S_stmt_waittillmatch = 128, // stmt_waittillmatch - S_stmt_waittillframeend = 129, // stmt_waittillframeend - S_stmt_waitframe = 130, // stmt_waitframe - S_stmt_if = 131, // stmt_if - S_stmt_ifelse = 132, // stmt_ifelse - S_stmt_while = 133, // stmt_while - S_stmt_dowhile = 134, // stmt_dowhile - S_stmt_for = 135, // stmt_for - S_stmt_foreach = 136, // stmt_foreach - S_stmt_switch = 137, // stmt_switch - S_stmt_case = 138, // stmt_case - S_stmt_default = 139, // stmt_default - S_stmt_break = 140, // stmt_break - S_stmt_continue = 141, // stmt_continue - S_stmt_return = 142, // stmt_return - S_stmt_breakpoint = 143, // stmt_breakpoint - S_stmt_prof_begin = 144, // stmt_prof_begin - S_stmt_prof_end = 145, // stmt_prof_end - S_expr = 146, // expr - S_expr_or_empty = 147, // expr_or_empty - S_expr_assign = 148, // expr_assign - S_expr_increment = 149, // expr_increment - S_expr_decrement = 150, // expr_decrement - S_expr_ternary = 151, // expr_ternary - S_expr_binary = 152, // expr_binary - S_expr_primitive = 153, // expr_primitive - S_expr_complement = 154, // expr_complement - S_expr_not = 155, // expr_not - S_expr_call = 156, // expr_call - S_expr_method = 157, // expr_method - S_expr_function = 158, // expr_function - S_expr_pointer = 159, // expr_pointer - S_expr_add_array = 160, // expr_add_array - S_expr_parameters = 161, // expr_parameters - S_expr_arguments = 162, // expr_arguments - S_expr_arguments_no_empty = 163, // expr_arguments_no_empty - S_expr_isdefined = 164, // expr_isdefined - S_expr_istrue = 165, // expr_istrue - S_expr_reference = 166, // expr_reference - S_expr_array = 167, // expr_array - S_expr_field = 168, // expr_field - S_expr_size = 169, // expr_size - S_expr_paren = 170, // expr_paren - S_expr_object = 171, // expr_object - S_expr_thisthread = 172, // expr_thisthread - S_expr_empty_array = 173, // expr_empty_array - S_expr_undefined = 174, // expr_undefined - S_expr_game = 175, // expr_game - S_expr_self = 176, // expr_self - S_expr_anim = 177, // expr_anim - S_expr_level = 178, // expr_level - S_expr_animation = 179, // expr_animation - S_expr_animtree = 180, // expr_animtree - S_expr_identifier = 181, // expr_identifier - S_expr_path = 182, // expr_path - S_expr_istring = 183, // expr_istring - S_expr_string = 184, // expr_string - S_expr_color = 185, // expr_color - S_expr_vector = 186, // expr_vector - S_expr_float = 187, // expr_float - S_expr_integer = 188, // expr_integer - S_expr_false = 189, // expr_false - S_expr_true = 190 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_WAITFRAME = 23, // "waitframe" + S_IF = 24, // "if" + S_ELSE = 25, // "else" + S_DO = 26, // "do" + S_WHILE = 27, // "while" + S_FOR = 28, // "for" + S_FOREACH = 29, // "foreach" + S_IN = 30, // "in" + S_SWITCH = 31, // "switch" + S_CASE = 32, // "case" + S_DEFAULT = 33, // "default" + S_BREAK = 34, // "break" + S_CONTINUE = 35, // "continue" + S_RETURN = 36, // "return" + S_BREAKPOINT = 37, // "breakpoint" + S_PROFBEGIN = 38, // "prof_begin" + S_PROFEND = 39, // "prof_end" + S_THREAD = 40, // "thread" + S_CHILDTHREAD = 41, // "childthread" + S_THISTHREAD = 42, // "thisthread" + S_CALL = 43, // "call" + S_TRUE = 44, // "true" + S_FALSE = 45, // "false" + S_UNDEFINED = 46, // "undefined" + S_SIZE = 47, // ".size" + S_GAME = 48, // "game" + S_SELF = 49, // "self" + S_ANIM = 50, // "anim" + S_LEVEL = 51, // "level" + S_ISDEFINED = 52, // "isdefined" + S_ISTRUE = 53, // "istrue" + S_LPAREN = 54, // "(" + S_RPAREN = 55, // ")" + S_LBRACE = 56, // "{" + S_RBRACE = 57, // "}" + S_LBRACKET = 58, // "[" + S_RBRACKET = 59, // "]" + S_COMMA = 60, // "," + S_DOT = 61, // "." + S_DOUBLECOLON = 62, // "::" + S_COLON = 63, // ":" + S_SEMICOLON = 64, // ";" + S_QMARK = 65, // "?" + S_INCREMENT = 66, // "++" + S_DECREMENT = 67, // "--" + S_LSHIFT = 68, // "<<" + S_RSHIFT = 69, // ">>" + S_OR = 70, // "||" + S_AND = 71, // "&&" + S_EQUALITY = 72, // "==" + S_INEQUALITY = 73, // "!=" + S_LESS_EQUAL = 74, // "<=" + S_GREATER_EQUAL = 75, // ">=" + S_LESS = 76, // "<" + S_GREATER = 77, // ">" + S_NOT = 78, // "!" + S_COMPLEMENT = 79, // "~" + S_ASSIGN = 80, // "=" + S_ASSIGN_ADD = 81, // "+=" + S_ASSIGN_SUB = 82, // "-=" + S_ASSIGN_MUL = 83, // "*=" + S_ASSIGN_DIV = 84, // "/=" + S_ASSIGN_MOD = 85, // "%=" + S_ASSIGN_BW_OR = 86, // "|=" + S_ASSIGN_BW_AND = 87, // "&=" + S_ASSIGN_BW_EXOR = 88, // "^=" + S_ASSIGN_RSHIFT = 89, // ">>=" + S_ASSIGN_LSHIFT = 90, // "<<=" + S_BITWISE_OR = 91, // "|" + S_BITWISE_AND = 92, // "&" + S_BITWISE_EXOR = 93, // "^" + S_ADD = 94, // "+" + S_SUB = 95, // "-" + S_MUL = 96, // "*" + S_DIV = 97, // "/" + S_MOD = 98, // "%" + S_FIELD = 99, // "field" + S_PATH = 100, // "path" + S_IDENTIFIER = 101, // "identifier" + S_STRING = 102, // "string literal" + S_ISTRING = 103, // "localized string" + S_COLOR = 104, // "color" + S_FLOAT = 105, // "float" + S_INTEGER = 106, // "integer" + S_ADD_ARRAY = 107, // ADD_ARRAY + S_THEN = 108, // THEN + S_TERN = 109, // TERN + S_NEG = 110, // NEG + S_ANIMREF = 111, // ANIMREF + S_PREINC = 112, // PREINC + S_PREDEC = 113, // PREDEC + S_POSTINC = 114, // POSTINC + S_POSTDEC = 115, // POSTDEC + S_YYACCEPT = 116, // $accept + S_root = 117, // root + S_program = 118, // program + S_inline = 119, // inline + S_include = 120, // include + S_declaration = 121, // declaration + S_decl_usingtree = 122, // decl_usingtree + S_decl_constant = 123, // decl_constant + S_decl_thread = 124, // decl_thread + S_stmt = 125, // stmt + S_stmt_dev = 126, // stmt_dev + S_stmt_block = 127, // stmt_block + S_stmt_list = 128, // stmt_list + S_stmt_expr = 129, // stmt_expr + S_stmt_call = 130, // stmt_call + S_stmt_assign = 131, // stmt_assign + S_stmt_endon = 132, // stmt_endon + S_stmt_notify = 133, // stmt_notify + S_stmt_wait = 134, // stmt_wait + S_stmt_waittill = 135, // stmt_waittill + S_stmt_waittillmatch = 136, // stmt_waittillmatch + S_stmt_waittillframeend = 137, // stmt_waittillframeend + S_stmt_waitframe = 138, // stmt_waitframe + S_stmt_if = 139, // stmt_if + S_stmt_ifelse = 140, // stmt_ifelse + S_stmt_while = 141, // stmt_while + S_stmt_dowhile = 142, // stmt_dowhile + S_stmt_for = 143, // stmt_for + S_stmt_foreach = 144, // stmt_foreach + S_stmt_switch = 145, // stmt_switch + S_stmt_case = 146, // stmt_case + S_stmt_default = 147, // stmt_default + S_stmt_break = 148, // stmt_break + S_stmt_continue = 149, // stmt_continue + S_stmt_return = 150, // stmt_return + S_stmt_breakpoint = 151, // stmt_breakpoint + S_stmt_prof_begin = 152, // stmt_prof_begin + S_stmt_prof_end = 153, // stmt_prof_end + S_expr = 154, // expr + S_expr_or_empty = 155, // expr_or_empty + S_expr_assign = 156, // expr_assign + S_expr_increment = 157, // expr_increment + S_expr_decrement = 158, // expr_decrement + S_expr_ternary = 159, // expr_ternary + S_expr_binary = 160, // expr_binary + S_expr_primitive = 161, // expr_primitive + S_expr_complement = 162, // expr_complement + S_expr_not = 163, // expr_not + S_expr_call = 164, // expr_call + S_expr_method = 165, // expr_method + S_expr_function = 166, // expr_function + S_expr_pointer = 167, // expr_pointer + S_expr_add_array = 168, // expr_add_array + S_expr_parameters = 169, // expr_parameters + S_expr_arguments = 170, // expr_arguments + S_expr_arguments_no_empty = 171, // expr_arguments_no_empty + S_expr_isdefined = 172, // expr_isdefined + S_expr_istrue = 173, // expr_istrue + S_expr_reference = 174, // expr_reference + S_expr_array = 175, // expr_array + S_expr_field = 176, // expr_field + S_expr_size = 177, // expr_size + S_expr_paren = 178, // expr_paren + S_expr_object = 179, // expr_object + S_expr_thisthread = 180, // expr_thisthread + S_expr_empty_array = 181, // expr_empty_array + S_expr_undefined = 182, // expr_undefined + S_expr_game = 183, // expr_game + S_expr_self = 184, // expr_self + S_expr_anim = 185, // expr_anim + S_expr_level = 186, // expr_level + S_expr_animation = 187, // expr_animation + S_expr_animtree = 188, // expr_animtree + 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_color = 193, // expr_color + S_expr_vector = 194, // expr_vector + S_expr_float = 195, // expr_float + S_expr_integer = 196, // expr_integer + S_expr_false = 197, // expr_false + S_expr_true = 198 // expr_true }; }; @@ -2835,6 +2851,126 @@ switch (yykind) return symbol_type (token::IW8UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5464,7 +5600,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw8 -#line 5468 "parser.hpp" +#line 5604 "parser.hpp" diff --git a/src/s1/xsk/lexer.cpp b/src/s1/xsk/lexer.cpp index 0947105a..c9d6dcc8 100644 --- a/src/s1/xsk/lexer.cpp +++ b/src/s1/xsk/lexer.cpp @@ -16,58 +16,6 @@ xsk::gsc::s1::parser::symbol_type S1lex(xsk::gsc::s1::lexer& lexer) namespace xsk::gsc::s1 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_waitframe, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -130,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -141,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -152,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -165,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -173,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -194,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type if (header_top_ > 0) pop_header(); else - return s1::parser::make_S1EOF(loc_); + return parser::make_S1EOF(loc_); } reader_.advance(); @@ -212,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return s1::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return s1::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return s1::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -291,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type indev_ = false; reader_.advance(); - return s1::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -304,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return s1::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return s1::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -324,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::s1::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return s1::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return s1::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return s1::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return s1::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return s1::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return s1::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return s1::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return s1::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return s1::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return s1::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return s1::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return s1::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return s1::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return s1::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return s1::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return s1::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return s1::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return s1::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return s1::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return s1::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return s1::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return s1::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return s1::parser::make_OR(loc_); + return parser::make_OR(loc_); - return s1::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return s1::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return s1::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return s1::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return s1::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return s1::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return s1::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return s1::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return s1::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return s1::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return s1::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return s1::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return s1::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return s1::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return s1::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return s1::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return s1::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -497,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return s1::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return s1::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -534,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return s1::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return s1::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::S1UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return s1::parser::make_PATH(xsk::gsc::s1::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return s1::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return s1::parser::make_IDENTIFIER(xsk::gsc::s1::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return s1::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -622,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return s1::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return s1::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -656,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return s1::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -690,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return s1::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -724,179 +683,60 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return s1::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::s1::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return s1::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return s1::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return s1::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return s1::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return s1::parser::make_ENDON(loc_); - case keyword::KW_notify: - return s1::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return s1::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return s1::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return s1::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return s1::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_waitframe: - return s1::parser::make_WAITFRAME(loc_); - case keyword::KW_if: - return s1::parser::make_IF(loc_); - case keyword::KW_else: - return s1::parser::make_ELSE(loc_); - case keyword::KW_do: - return s1::parser::make_DO(loc_); - case keyword::KW_while: - return s1::parser::make_WHILE(loc_); - case keyword::KW_for: - return s1::parser::make_FOR(loc_); - case keyword::KW_foreach: - return s1::parser::make_FOREACH(loc_); - case keyword::KW_in: - return s1::parser::make_IN(loc_); - case keyword::KW_switch: - return s1::parser::make_SWITCH(loc_); - case keyword::KW_case: - return s1::parser::make_CASE(loc_); - case keyword::KW_default: - return s1::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return s1::parser::make_BREAK(loc_); - case keyword::KW_continue: - return s1::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return s1::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return s1::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return s1::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return s1::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return s1::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return s1::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return s1::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return s1::parser::make_CALL(loc_); - case keyword::KW_true: - return s1::parser::make_TRUE(loc_); - case keyword::KW_false: - return s1::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return s1::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return s1::parser::make_SIZE(loc_); - case keyword::KW_game: - return s1::parser::make_GAME(loc_); - case keyword::KW_self: - return s1::parser::make_SELF(loc_); - case keyword::KW_anim: - return s1::parser::make_ANIM(loc_); - case keyword::KW_level: - return s1::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "waitframe", keyword::KW_waitframe }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "waitframe", parser::token::WAITFRAME }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::s1 diff --git a/src/s1/xsk/lexer.hpp b/src/s1/xsk/lexer.hpp index 53d4957c..572607b7 100644 --- a/src/s1/xsk/lexer.hpp +++ b/src/s1/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::s1 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::s1::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::s1::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::s1 diff --git a/src/s1/xsk/parser.cpp b/src/s1/xsk/parser.cpp index ba78ccef..0a993b97 100644 --- a/src/s1/xsk/parser.cpp +++ b/src/s1/xsk/parser.cpp @@ -1984,1303 +1984,1303 @@ namespace xsk { namespace gsc { namespace s1 { switch (yyn) { case 2: // root: program -#line 246 "parser.ypp" +#line 254 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1990 "parser.cpp" break; case 3: // root: %empty -#line 247 "parser.ypp" +#line 255 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1996 "parser.cpp" break; case 4: // program: program inline -#line 252 "parser.ypp" +#line 260 "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 254 "parser.ypp" +#line 262 "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 256 "parser.ypp" +#line 264 "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 258 "parser.ypp" +#line 266 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; case 8: // program: include -#line 260 "parser.ypp" +#line 268 "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 2026 "parser.cpp" break; case 9: // program: declaration -#line 262 "parser.ypp" +#line 270 "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 2032 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 266 "parser.ypp" +#line 274 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2038 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 271 "parser.ypp" +#line 279 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2044 "parser.cpp" break; case 12: // declaration: "/#" -#line 275 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; case 13: // declaration: "#/" -#line 276 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2056 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2062 "parser.cpp" break; case 15: // declaration: decl_constant -#line 278 "parser.ypp" +#line 286 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2068 "parser.cpp" break; case 16: // declaration: decl_thread -#line 279 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2074 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 284 "parser.ypp" - { lexer.restrict_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 292 "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 2080 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 289 "parser.ypp" +#line 297 "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 2086 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 294 "parser.ypp" - { lexer.restrict_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 302 "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 2092 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 298 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2098 "parser.cpp" break; case 21: // stmt: stmt_block -#line 299 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2104 "parser.cpp" break; case 22: // stmt: stmt_call -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2110 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2116 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2122 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2128 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2134 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2140 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2146 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2152 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2158 "parser.cpp" break; case 31: // stmt: stmt_if -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2164 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2170 "parser.cpp" break; case 33: // stmt: stmt_while -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2176 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2182 "parser.cpp" break; case 35: // stmt: stmt_for -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2188 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2194 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2200 "parser.cpp" break; case 38: // stmt: stmt_case -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2206 "parser.cpp" break; case 39: // stmt: stmt_default -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2212 "parser.cpp" break; case 40: // stmt: stmt_break -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2218 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2224 "parser.cpp" break; case 42: // stmt: stmt_return -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2230 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 321 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2236 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 322 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2242 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 323 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2248 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 327 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2254 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 328 "parser.ypp" +#line 336 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2260 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 332 "parser.ypp" +#line 340 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2266 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 333 "parser.ypp" +#line 341 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2272 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 338 "parser.ypp" +#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 2278 "parser.cpp" break; case 51: // stmt_list: stmt -#line 340 "parser.ypp" +#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 2284 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 345 "parser.ypp" +#line 353 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2290 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 347 "parser.ypp" +#line 355 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2296 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 349 "parser.ypp" +#line 357 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2302 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 351 "parser.ypp" +#line 359 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2308 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 356 "parser.ypp" +#line 364 "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 2314 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 358 "parser.ypp" +#line 366 "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 2320 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 363 "parser.ypp" +#line 371 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2326 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 365 "parser.ypp" +#line 373 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 367 "parser.ypp" +#line 375 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 372 "parser.ypp" +#line 380 "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 2344 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 377 "parser.ypp" +#line 385 "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 2350 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 379 "parser.ypp" +#line 387 "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 2356 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 384 "parser.ypp" +#line 392 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2362 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 389 "parser.ypp" +#line 397 "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 2368 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 391 "parser.ypp" +#line 399 "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 2374 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 396 "parser.ypp" +#line 404 "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 2380 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 398 "parser.ypp" +#line 406 "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 2386 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 403 "parser.ypp" +#line 411 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2392 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 408 "parser.ypp" +#line 416 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2398 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 410 "parser.ypp" +#line 418 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2404 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 415 "parser.ypp" +#line 423 "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 2410 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 420 "parser.ypp" +#line 428 "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 2416 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 425 "parser.ypp" +#line 433 "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 2422 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 430 "parser.ypp" +#line 438 "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 2428 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 435 "parser.ypp" +#line 443 "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 2434 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 440 "parser.ypp" +#line 448 "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 2440 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 442 "parser.ypp" +#line 450 "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 2446 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 447 "parser.ypp" +#line 455 "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 2452 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 452 "parser.ypp" +#line 460 "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 2458 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 454 "parser.ypp" +#line 462 "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 2464 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 459 "parser.ypp" +#line 467 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2470 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 464 "parser.ypp" +#line 472 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2476 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 469 "parser.ypp" +#line 477 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2482 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 474 "parser.ypp" +#line 482 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2488 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 476 "parser.ypp" +#line 484 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 481 "parser.ypp" +#line 489 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2500 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 486 "parser.ypp" +#line 494 "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 2506 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 491 "parser.ypp" +#line 499 "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 2512 "parser.cpp" break; case 90: // expr: expr_ternary -#line 495 "parser.ypp" +#line 503 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2518 "parser.cpp" break; case 91: // expr: expr_binary -#line 496 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2524 "parser.cpp" break; case 92: // expr: expr_primitive -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2530 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2536 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 502 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2542 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 507 "parser.ypp" +#line 515 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2572 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 517 "parser.ypp" +#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 519 "parser.ypp" +#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 521 "parser.ypp" +#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 523 "parser.ypp" +#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 525 "parser.ypp" +#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 527 "parser.ypp" +#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 532 "parser.ypp" +#line 540 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2614 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 534 "parser.ypp" +#line 542 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2620 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 539 "parser.ypp" +#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); } #line 2626 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 541 "parser.ypp" +#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); } #line 2632 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 546 "parser.ypp" +#line 554 "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 2638 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 551 "parser.ypp" +#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 2644 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 553 "parser.ypp" +#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 2650 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().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 114: // expr_binary: expr "!=" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().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 115: // expr_binary: expr "<=" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().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 116: // expr_binary: expr ">=" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().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 117: // expr_binary: expr "<" expr -#line 563 "parser.ypp" +#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 565 "parser.ypp" +#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 567 "parser.ypp" +#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 569 "parser.ypp" +#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 571 "parser.ypp" +#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 573 "parser.ypp" +#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 575 "parser.ypp" +#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 577 "parser.ypp" +#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 579 "parser.ypp" +#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 581 "parser.ypp" +#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 583 "parser.ypp" +#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 585 "parser.ypp" +#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 589 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2752 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 590 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2758 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2764 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2770 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2776 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2782 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2788 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2794 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2800 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2806 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2812 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2818 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2824 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2830 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2836 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2842 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2848 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2854 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 607 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2860 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 608 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2866 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 609 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2872 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 610 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2878 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2884 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 612 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2890 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 613 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2896 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 614 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2902 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 615 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2908 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2914 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2920 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 626 "parser.ypp" +#line 634 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2926 "parser.cpp" break; case 159: // expr_call: expr_function -#line 630 "parser.ypp" +#line 638 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2932 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 631 "parser.ypp" +#line 639 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2938 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 634 "parser.ypp" +#line 642 "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 2944 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 635 "parser.ypp" +#line 643 "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 2950 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 648 "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 2956 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 650 "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 2962 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 652 "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 2968 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 654 "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 2974 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 656 "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 2980 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 658 "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 2986 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 655 "parser.ypp" +#line 663 "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 2992 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 665 "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 2998 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 667 "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 3004 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 661 "parser.ypp" +#line 669 "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 3010 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 666 "parser.ypp" +#line 674 "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 3016 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 671 "parser.ypp" +#line 679 "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 3022 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 673 "parser.ypp" +#line 681 "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 3028 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 675 "parser.ypp" +#line 683 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3034 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 680 "parser.ypp" +#line 688 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3040 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 682 "parser.ypp" +#line 690 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3046 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 687 "parser.ypp" +#line 695 "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 3052 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 689 "parser.ypp" +#line 697 "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 3058 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 694 "parser.ypp" +#line 702 "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 3064 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3070 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 701 "parser.ypp" +#line 709 "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 3076 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 706 "parser.ypp" +#line 714 "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 3082 "parser.cpp" break; case 185: // expr_field: expr_object "field" -#line 708 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3088 "parser.cpp" break; case 186: // expr_size: expr_object ".size" -#line 713 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3094 "parser.cpp" break; case 187: // expr_paren: "(" expr ")" -#line 718 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3100 "parser.cpp" break; case 188: // expr_object: expr_call -#line 722 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3106 "parser.cpp" break; case 189: // expr_object: expr_method -#line 723 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3112 "parser.cpp" break; case 190: // expr_object: expr_array -#line 724 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3118 "parser.cpp" break; case 191: // expr_object: expr_field -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3124 "parser.cpp" break; case 192: // expr_object: expr_game -#line 726 "parser.ypp" +#line 734 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3130 "parser.cpp" break; case 193: // expr_object: expr_self -#line 727 "parser.ypp" +#line 735 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3136 "parser.cpp" break; case 194: // expr_object: expr_anim -#line 728 "parser.ypp" +#line 736 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3142 "parser.cpp" break; case 195: // expr_object: expr_level -#line 729 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3148 "parser.cpp" break; case 196: // expr_object: expr_identifier -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3154 "parser.cpp" break; case 197: // expr_thisthread: "thisthread" -#line 735 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3160 "parser.cpp" break; case 198: // expr_empty_array: "[" "]" -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3166 "parser.cpp" break; case 199: // expr_undefined: "undefined" -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3172 "parser.cpp" break; case 200: // expr_game: "game" -#line 750 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3178 "parser.cpp" break; case 201: // expr_self: "self" -#line 755 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3184 "parser.cpp" break; case 202: // expr_anim: "anim" -#line 760 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3190 "parser.cpp" break; case 203: // expr_level: "level" -#line 765 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3196 "parser.cpp" break; case 204: // expr_animation: "%" "identifier" -#line 770 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3202 "parser.cpp" break; case 205: // expr_animtree: "#animtree" -#line 775 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3208 "parser.cpp" break; case 206: // expr_identifier: "identifier" -#line 780 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3214 "parser.cpp" break; case 207: // expr_path: "path" -#line 785 "parser.ypp" +#line 793 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3220 "parser.cpp" break; case 208: // expr_path: expr_identifier -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3226 "parser.cpp" break; case 209: // expr_istring: "localized string" -#line 792 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3232 "parser.cpp" break; case 210: // expr_string: "string literal" -#line 797 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3238 "parser.cpp" break; case 211: // expr_color: "color" -#line 802 "parser.ypp" +#line 810 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3244 "parser.cpp" break; case 212: // expr_vector: "(" expr "," expr "," expr ")" -#line 807 "parser.ypp" +#line 815 "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 3250 "parser.cpp" break; case 213: // expr_float: "-" "float" -#line 812 "parser.ypp" +#line 820 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3256 "parser.cpp" break; case 214: // expr_float: "float" -#line 814 "parser.ypp" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3262 "parser.cpp" break; case 215: // expr_integer: "-" "integer" -#line 819 "parser.ypp" +#line 827 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3268 "parser.cpp" break; case 216: // expr_integer: "integer" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3274 "parser.cpp" break; case 217: // expr_false: "false" -#line 826 "parser.ypp" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; case 218: // expr_true: "true" -#line 831 "parser.ypp" +#line 839 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; @@ -3470,7 +3470,8 @@ namespace xsk { namespace gsc { namespace s1 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "waitframe", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", @@ -3773,50 +3774,50 @@ namespace xsk { namespace gsc { namespace s1 { const short parser::yypact_[] = { - 13, -267, -267, 8, 8, -11, -267, 27, 13, -267, - -267, -267, -267, -267, -267, -31, -267, -267, -16, -10, - -42, -267, -267, -267, -267, -38, 1203, -267, -267, -267, - 20, -21, -267, -267, -17, -5, -267, 29, -267, -267, - -267, -267, -267, -267, -267, 1203, 1073, -38, 1203, 1203, - 52, -2, -267, -267, -267, -267, 2007, -267, -267, -267, - -267, -267, 31, 354, -267, -267, -267, -267, 440, 813, - -267, -267, 943, -267, -267, -267, 1169, 1234, 1282, 1296, - -267, -267, 556, 49, -267, -267, -267, -267, -267, -267, - -267, -267, 43, 35, -38, 69, 79, 85, 93, 113, - 110, 119, 1333, 1073, -267, 2090, 118, 120, -267, -267, - -267, -267, -267, -267, -267, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, -267, 1268, -38, -267, -267, -267, - 126, 122, 1203, -38, -267, 787, -267, -267, 1203, 1203, - -38, 1203, 1203, -38, 1203, -267, 1203, 1069, 1203, -267, - 1972, 142, 142, 2121, 2131, 617, 617, 44, 44, 44, - 44, 2162, 2203, 2172, 73, 73, -267, -267, -267, 1777, - -267, -38, -8, -267, 128, 865, 1203, 129, -18, 132, - 1047, 136, 138, 143, 144, -64, 148, 135, 141, 1138, - 149, 153, 158, -267, 159, 123, 123, -267, -267, -267, - 917, -267, -267, -267, -267, -267, -267, -267, -267, -267, + 5, -267, -267, 49, 49, -28, -267, 26, 5, -267, + -267, -267, -267, -267, -267, -39, -267, -267, -34, -32, + -64, -267, -267, -267, -267, -61, 1195, -267, -267, -267, + 8, -26, -267, -267, -25, -13, -267, -3, -267, -267, + -267, -267, -267, -267, -267, 1195, 1065, -61, 1195, 1195, + -14, -55, -267, -267, -267, -267, 1999, -267, -267, -267, + -267, -267, 23, 346, -267, -267, -267, -267, 432, 805, + -267, -267, 935, -267, -267, -267, 1161, 1226, 1274, 1288, + -267, -267, 548, 17, -267, -267, -267, -267, -267, -267, + -267, -267, 3, 27, -61, 41, 31, 57, 42, 71, + 77, 45, 1325, 1065, -267, 2082, 83, 111, -267, -267, + -267, -267, -267, -267, -267, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, -267, 1260, -61, -267, -267, -267, + 117, 110, 1195, -61, -267, 779, -267, -267, 1195, 1195, + -61, 1195, 1195, -61, 1195, -267, 1195, 1061, 1195, -267, + 1964, 134, 134, 2113, 2123, 609, 609, 36, 36, 36, + 36, 2154, 2195, 2164, 65, 65, -267, -267, -267, 1769, + -267, -61, -16, -267, 122, 857, 1195, 118, -29, 124, + 1039, 130, 131, 135, 136, -5, 128, 133, 139, 1130, + 140, 145, 151, -267, 152, 115, 115, -267, -267, -267, + 909, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, - -267, -267, -267, -267, -267, 154, 155, 161, 165, 177, - -267, -267, 36, -267, -267, -267, -267, -22, 1817, 7, - 188, 1857, 9, 190, 1897, 1936, 186, 2090, 1203, -267, - 128, -267, 1203, -267, 995, 2042, -267, 192, -267, 1203, - 219, 1203, 542, -38, 1203, 150, 194, 196, -267, -267, - -267, -267, 2077, -267, 1203, 1203, 1203, -267, -267, 185, - 185, -267, -267, -267, -267, -267, -267, -267, 201, 206, - 207, 209, -267, -267, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 205, -267, 1203, 208, -267, - 1203, 210, 1203, 211, 2090, 11, -267, -267, 202, 1499, - 217, 1533, 213, -267, -267, -267, 677, 1, 1567, -267, - -267, -267, 17, 38, 1069, 1203, 1203, 1203, 1203, 2090, - 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, - 218, 45, 221, 46, 224, 1601, 1203, -267, -267, 1047, - 1203, 1047, 1203, 1203, -38, 35, 223, 225, 1635, 1377, - 1421, 1465, 1203, -267, 1203, -267, 1203, -267, 55, 264, - 1669, -267, 2090, 231, 1703, 241, -267, -267, -267, 232, - 233, 1203, 234, 1203, 237, 1203, 74, 90, 99, -267, - 1047, 238, 542, 1047, 1203, -267, -267, 248, -267, 249, - -267, 255, -267, -267, -267, -267, -267, 256, -267, 1737, - 251, 253, 254, 1047, 1047, -267, -267, -267, -267, -267 + -267, -267, -267, -267, -267, 147, 153, 157, 169, 170, + -267, -267, 28, -267, -267, -267, -267, -31, 1809, -2, + 155, 1849, -1, 182, 1889, 1928, 178, 2082, 1195, -267, + 122, -267, 1195, -267, 987, 2034, -267, 184, -267, 1195, + 211, 1195, 534, -61, 1195, 141, 185, 186, -267, -267, + -267, -267, 2069, -267, 1195, 1195, 1195, -267, -267, 177, + 177, -267, -267, -267, -267, -267, -267, -267, 197, 198, + 199, 201, -267, -267, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 200, -267, 1195, 202, -267, + 1195, 204, 1195, 203, 2082, 1, -267, -267, 192, 1491, + 210, 1525, 194, -267, -267, -267, 669, -8, 1559, -267, + -267, -267, 9, 38, 1061, 1195, 1195, 1195, 1195, 2082, + 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, + 213, 47, 215, 66, 216, 1593, 1195, -267, -267, 1039, + 1195, 1039, 1195, 1195, -61, 27, 217, 219, 1627, 1369, + 1413, 1457, 1195, -267, 1195, -267, 1195, -267, 82, 238, + 1661, -267, 2082, 223, 1695, 247, -267, -267, -267, 224, + 225, 1195, 226, 1195, 229, 1195, 91, 104, 114, -267, + 1039, 230, 534, 1039, 1195, -267, -267, 240, -267, 241, + -267, 248, -267, -267, -267, -267, -267, 249, -267, 1729, + 243, 244, 245, 1039, 1039, -267, -267, -267, -267, -267 }; const unsigned char @@ -3871,8 +3872,8 @@ namespace xsk { namespace gsc { namespace s1 { const short parser::yypgoto_[] = { - -267, -267, -267, 294, 298, 301, -267, -267, -267, -72, - -267, -91, 146, -83, -267, -267, -267, -267, -267, -267, + -267, -267, -267, 292, 300, 301, -267, -267, -267, -72, + -267, -91, 144, -81, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 195, -267, -266, -260, -258, -267, -267, -267, -267, -267, -130, -12, @@ -3901,38 +3902,38 @@ namespace xsk { namespace gsc { namespace s1 { { 15, 107, 146, 17, 17, 138, 333, 139, 15, 18, 19, 30, 334, 25, 335, 238, 1, 2, 3, 4, - 5, 275, 142, 373, 93, 32, 267, 21, 29, 94, - -208, 95, 55, 20, 96, 99, 268, 261, 27, 26, - 97, 100, 158, 98, 28, 298, 299, 108, 300, 301, - 29, 374, 316, 6, 319, 238, 367, 158, 107, 158, - 238, 158, 376, -188, -188, 92, -188, 158, 34, 35, - -188, 37, 140, 16, 6, 287, 287, 101, 141, -188, - 238, 145, -188, 377, 135, 16, 6, 136, 158, 113, - 383, 385, 302, 303, 147, 158, 158, 144, 16, 6, - 409, 143, 116, 117, 6, 158, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 148, 270, 422, - -188, -188, -188, 149, 158, 137, 16, 6, 129, 130, - 131, 132, 133, 239, 238, 423, 180, 150, 292, 240, - 158, 151, 287, 184, 424, 247, 333, 111, 112, 158, - 250, 141, 334, 253, 335, 34, 35, 152, 37, 131, - 132, 133, 153, 41, 42, 43, 44, 154, 158, 159, - 142, 204, 262, 239, 181, 138, 269, 139, 239, 240, - 271, 260, 272, 266, 240, 247, 276, 273, 274, 279, - 247, 141, 292, 288, 288, 280, 141, 284, 239, 240, - 240, 278, 285, 283, 240, 247, 247, 286, 293, 294, - 247, 141, 141, 16, 6, 295, 141, 34, 35, 296, + 5, 142, 373, 267, 20, 32, 21, 93, 27, -208, + 28, 95, 94, 268, 96, 99, 29, 261, 6, 26, + 97, 100, 158, 98, 113, 298, 299, 108, 300, 301, + 374, 316, 319, 101, 367, 238, 158, 158, 107, 158, + 238, 92, 376, -188, -188, 144, -188, 158, 34, 35, + -188, 37, 140, 16, 6, 287, 287, 143, 141, -188, + 238, 145, -188, 149, 135, 16, 6, 136, 275, 111, + 112, 377, 302, 303, 147, 29, 158, 148, 151, 55, + 383, 154, 116, 117, 6, 158, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 150, 270, 385, + -188, -188, -188, 152, 158, 137, 16, 6, 129, 130, + 131, 132, 133, 239, 238, 409, 180, 153, 292, 240, + 158, 158, 287, 184, 422, 247, 333, 16, 6, 158, + 250, 141, 334, 253, 335, 34, 35, 423, 37, 131, + 132, 133, 158, 41, 42, 43, 44, 424, 159, 142, + 181, 204, 158, 239, 262, 138, 269, 139, 239, 240, + 266, 260, 271, 272, 240, 247, 276, 273, 274, 278, + 247, 141, 292, 288, 288, 279, 141, 284, 239, 240, + 240, 280, 283, 285, 240, 247, 247, 317, 286, 293, + 247, 141, 141, 16, 6, 294, 141, 34, 35, 295, 37, 56, 138, 138, 139, 139, 129, 130, 131, 132, - 133, 297, 317, 135, 320, 323, 136, 328, 330, 238, - 102, 238, 140, 109, 110, 345, 112, 339, 141, 340, - 346, 347, 239, 348, 360, 366, 368, 362, 240, 364, - 288, 370, 382, 414, 247, 384, 240, 372, 386, 138, - 141, 139, 247, 337, 137, 16, 6, 397, 141, 398, - 238, 410, 287, 238, 396, 412, 415, 416, 418, 140, + 133, 296, 297, 135, 320, 323, 136, 328, 330, 238, + 102, 238, 140, 109, 110, 112, 339, 340, 141, 345, + 346, 347, 239, 348, 368, 366, 372, 360, 240, 362, + 288, 364, 370, 410, 247, 382, 240, 384, 386, 138, + 141, 139, 247, 337, 137, 16, 6, 414, 141, 397, + 238, 398, 287, 238, 396, 412, 415, 416, 418, 140, 140, 420, 426, 430, 431, 141, 141, 389, 157, 391, - 432, 433, 22, 238, 238, 435, 23, 436, 437, 24, + 22, 432, 433, 238, 238, 435, 436, 437, 23, 24, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 427, - 179, 264, 277, 0, 0, 0, 140, 0, 425, 0, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 264, + 179, 427, 277, 0, 0, 0, 140, 0, 425, 0, 0, 428, 141, 248, 0, 0, 251, 0, 0, 254, 0, 255, 0, 257, 0, 0, 417, 239, 419, 239, 421, 438, 439, 240, 0, 240, 0, 0, 0, 247, @@ -4135,311 +4136,311 @@ namespace xsk { namespace gsc { namespace s1 { parser::yycheck_[] = { 0, 46, 93, 3, 4, 72, 272, 72, 8, 3, - 4, 20, 272, 44, 272, 145, 3, 4, 5, 6, - 7, 85, 44, 22, 45, 25, 44, 0, 92, 50, - 52, 48, 96, 44, 34, 35, 54, 45, 54, 70, - 34, 35, 50, 48, 54, 9, 10, 47, 12, 13, - 92, 50, 45, 91, 45, 185, 45, 50, 103, 50, - 190, 50, 45, 32, 33, 45, 35, 50, 32, 33, - 39, 35, 72, 90, 91, 205, 206, 48, 72, 48, - 210, 46, 51, 45, 48, 90, 91, 51, 50, 91, - 45, 45, 56, 57, 94, 50, 50, 54, 90, 91, - 45, 52, 58, 59, 91, 50, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 190, 45, - 89, 90, 91, 44, 50, 89, 90, 91, 84, 85, - 86, 87, 88, 145, 264, 45, 136, 52, 210, 145, - 50, 48, 272, 143, 45, 145, 412, 95, 96, 50, - 150, 145, 412, 153, 412, 32, 33, 44, 35, 86, - 87, 88, 52, 40, 41, 42, 43, 48, 50, 49, - 44, 48, 44, 185, 52, 242, 44, 242, 190, 185, - 44, 181, 44, 54, 190, 185, 195, 44, 44, 54, - 190, 185, 264, 205, 206, 54, 190, 44, 210, 205, - 206, 53, 44, 54, 210, 205, 206, 48, 54, 54, - 210, 205, 206, 90, 91, 54, 210, 32, 33, 54, - 35, 26, 289, 290, 289, 290, 84, 85, 86, 87, - 88, 54, 44, 48, 44, 49, 51, 45, 19, 369, - 45, 371, 242, 48, 49, 44, 96, 53, 242, 53, - 44, 44, 264, 44, 49, 44, 54, 49, 264, 49, - 272, 44, 44, 22, 264, 44, 272, 54, 44, 336, - 264, 336, 272, 273, 89, 90, 91, 54, 272, 54, - 410, 17, 412, 413, 375, 54, 54, 54, 54, 289, - 290, 54, 54, 45, 45, 289, 290, 369, 103, 371, - 45, 45, 8, 433, 434, 54, 8, 54, 54, 8, + 4, 20, 272, 52, 272, 145, 11, 12, 13, 14, + 15, 52, 30, 52, 52, 25, 0, 53, 62, 60, + 62, 56, 58, 62, 34, 35, 100, 53, 99, 78, + 34, 35, 58, 56, 99, 17, 18, 47, 20, 21, + 58, 53, 53, 56, 53, 185, 58, 58, 103, 58, + 190, 53, 53, 40, 41, 62, 43, 58, 40, 41, + 47, 43, 72, 98, 99, 205, 206, 60, 72, 56, + 210, 54, 59, 52, 56, 98, 99, 59, 93, 103, + 104, 53, 64, 65, 94, 100, 58, 56, 56, 104, + 53, 56, 66, 67, 99, 58, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 60, 190, 53, + 97, 98, 99, 52, 58, 97, 98, 99, 92, 93, + 94, 95, 96, 145, 264, 53, 136, 60, 210, 145, + 58, 58, 272, 143, 53, 145, 412, 98, 99, 58, + 150, 145, 412, 153, 412, 40, 41, 53, 43, 94, + 95, 96, 58, 48, 49, 50, 51, 53, 57, 52, + 60, 56, 58, 185, 52, 242, 52, 242, 190, 185, + 62, 181, 52, 52, 190, 185, 195, 52, 52, 61, + 190, 185, 264, 205, 206, 62, 190, 52, 210, 205, + 206, 62, 62, 52, 210, 205, 206, 52, 56, 62, + 210, 205, 206, 98, 99, 62, 210, 40, 41, 62, + 43, 26, 289, 290, 289, 290, 92, 93, 94, 95, + 96, 62, 62, 56, 52, 57, 59, 53, 27, 369, + 45, 371, 242, 48, 49, 104, 61, 61, 242, 52, + 52, 52, 264, 52, 62, 52, 62, 57, 264, 57, + 272, 57, 52, 25, 264, 52, 272, 52, 52, 336, + 264, 336, 272, 273, 97, 98, 99, 30, 272, 62, + 410, 62, 412, 413, 375, 62, 62, 62, 62, 289, + 290, 62, 62, 53, 53, 289, 290, 369, 103, 371, + 8, 53, 53, 433, 434, 62, 62, 62, 8, 8, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 412, - 135, 185, 195, -1, -1, -1, 336, -1, 410, -1, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 185, + 135, 412, 195, -1, -1, -1, 336, -1, 410, -1, -1, 413, 336, 148, -1, -1, 151, -1, -1, 154, -1, 156, -1, 158, -1, -1, 401, 369, 403, 371, 405, 433, 434, 369, -1, 371, -1, -1, -1, 369, -1, 371, -1, -1, 374, 369, -1, 371, -1, -1, - -1, 186, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 145, -1, 39, 199, -1, -1, 145, 410, -1, - 412, 413, 48, -1, 410, 51, 412, 413, -1, -1, + -1, 186, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 145, -1, 47, 199, -1, -1, 145, 410, -1, + 412, 413, 56, -1, 410, 59, 412, 413, -1, -1, 410, -1, 412, 413, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, 145, -1, 433, 434, -1, -1, 185, -1, 433, 434, -1, 190, 185, -1, 433, - 434, -1, 190, 89, 90, 91, -1, -1, -1, -1, + 434, -1, 190, 97, 98, 99, -1, -1, -1, -1, -1, 205, 206, 258, -1, -1, 210, 205, 206, -1, -1, -1, 210, -1, 269, 185, 271, -1, -1, 274, - 190, -1, 32, 33, 145, 35, -1, -1, -1, 39, - -1, 286, 142, -1, -1, 205, 206, -1, 48, 149, - 210, 51, 152, 145, -1, -1, -1, -1, -1, 304, + 190, -1, 40, 41, 145, 43, -1, -1, -1, 47, + -1, 286, 142, -1, -1, 205, 206, -1, 56, 149, + 210, 59, 152, 145, -1, -1, -1, -1, -1, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 264, 145, -1, -1, 185, -1, 264, 322, 272, 190, - -1, -1, -1, -1, 272, -1, -1, -1, -1, 89, - 90, 91, -1, 185, 205, 206, -1, -1, 190, 210, + -1, -1, -1, -1, 272, -1, -1, -1, -1, 97, + 98, 99, -1, 185, 205, 206, -1, -1, 190, 210, 345, 346, 347, 348, 264, -1, -1, -1, -1, -1, -1, 185, 272, 205, 206, -1, 190, -1, 210, -1, -1, -1, -1, -1, -1, 370, -1, 372, 373, -1, - -1, 205, 206, -1, 32, 33, 210, 35, -1, -1, - -1, -1, 40, 41, 42, 43, -1, -1, 32, 33, - 48, 35, -1, 264, -1, 39, -1, -1, 56, 57, - 44, 272, 262, -1, 48, -1, -1, 51, 52, 414, + -1, 205, 206, -1, 40, 41, 210, 43, -1, -1, + -1, -1, 48, 49, 50, 51, -1, -1, 40, 41, + 56, 43, -1, 264, -1, 47, -1, -1, 64, 65, + 52, 272, 262, -1, 56, -1, -1, 59, 60, 414, -1, -1, 264, -1, -1, 369, -1, 371, -1, -1, 272, 369, -1, 371, 284, 285, -1, -1, -1, -1, - 264, -1, 90, 91, -1, -1, -1, -1, 272, -1, - -1, -1, -1, -1, -1, 89, 90, 91, -1, 369, + 264, -1, 98, 99, -1, -1, -1, -1, 272, -1, + -1, -1, -1, -1, -1, 97, 98, 99, -1, 369, -1, 371, -1, -1, -1, -1, 410, 317, 412, 413, 320, -1, 410, -1, 412, 413, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 58, 59, -1, -1, 433, - 434, 64, 65, 66, 67, 433, 434, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, -1, -1, 433, + 434, 72, 73, 74, 75, 433, 434, -1, -1, -1, 410, -1, 412, 413, -1, -1, -1, -1, 369, -1, - 371, 84, 85, 86, 87, 88, 366, -1, -1, 32, - 33, -1, 35, 433, 434, -1, -1, 369, -1, 371, - -1, -1, 382, -1, 384, 48, 386, -1, 51, -1, - -1, -1, -1, 56, 57, 369, -1, 371, -1, 410, - -1, 412, 413, -1, -1, -1, -1, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 410, -1, - 412, 413, 433, 434, -1, -1, 89, 90, 91, -1, + 371, 92, 93, 94, 95, 96, 366, -1, -1, 40, + 41, -1, 43, 433, 434, -1, -1, 369, -1, 371, + -1, -1, 382, -1, 384, 56, 386, -1, 59, -1, + -1, -1, -1, 64, 65, 369, -1, 371, -1, 410, + -1, 412, 413, -1, -1, -1, -1, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 410, -1, + 412, 413, 433, 434, -1, -1, 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, -1, -1, -1, -1, -1, - 3, -1, -1, -1, -1, -1, -1, -1, 11, 433, - 434, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, -1, -1, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 8, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, -1, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, 49, -1, - -1, 48, 49, -1, 55, 52, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 90, 91, -1, - -1, 68, 69, -1, -1, -1, 8, -1, -1, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, -1, -1, 48, -1, -1, -1, - 52, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, 32, 33, -1, 35, -1, 68, 69, 39, -1, - -1, 8, -1, -1, -1, -1, -1, 48, -1, -1, - 51, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, - -1, 48, -1, -1, -1, 52, -1, -1, 89, 90, - 91, -1, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 68, 69, 39, -1, -1, 8, -1, -1, -1, - -1, -1, 48, -1, -1, 51, -1, -1, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, 32, 33, 48, 35, -1, -1, - 52, 39, -1, 89, 90, 91, -1, -1, 32, 33, - 48, 35, -1, 51, -1, 39, 68, 69, -1, -1, - -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, -1, -1, -1, -1, -1, - -1, 89, 90, 91, -1, -1, -1, -1, 45, -1, - -1, -1, -1, 50, -1, 89, 90, 91, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 45, -1, -1, -1, -1, 50, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 45, -1, -1, -1, - -1, 50, -1, -1, -1, -1, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 11, -1, -1, -1, -1, -1, -1, -1, 19, 433, + 434, 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, -1, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, -1, 43, -1, -1, 98, 99, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, 98, 99, 48, 49, 50, + 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, 57, -1, + -1, 56, 57, -1, 63, 60, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 98, 99, -1, + -1, 76, 77, -1, -1, -1, 16, -1, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, -1, -1, -1, + -1, 40, 41, -1, 43, -1, 76, 77, 47, -1, + -1, 16, -1, -1, -1, -1, -1, 56, -1, -1, + 59, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, -1, -1, + -1, 56, -1, -1, -1, 60, -1, -1, 97, 98, + 99, -1, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 76, 77, 47, -1, -1, 16, -1, -1, -1, + -1, -1, 56, -1, -1, 59, -1, -1, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, 40, 41, 56, 43, -1, -1, + 60, 47, -1, 97, 98, 99, -1, -1, 40, 41, + 56, 43, -1, 59, -1, 47, 76, 77, -1, -1, + -1, -1, -1, -1, 56, -1, -1, 59, -1, -1, + -1, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, 97, 98, 99, -1, -1, -1, -1, 53, -1, + -1, -1, -1, 58, -1, 97, 98, 99, 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, -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, 81, 82, 83, 84, 85, 86, 87, 88, - 45, -1, -1, -1, -1, 50, -1, -1, -1, -1, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 45, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -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, 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, - 45, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 50, -1, -1, -1, - -1, 55, -1, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 53, -1, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 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, 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, 61, -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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 54, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 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, 62, 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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 55, -1, -1, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 81, 82, - 83, 84, 85, 86, 87, 88, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, 58, - 59, -1, 61, 62, 63, 64, 65, 66, 67, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, -1, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, 82, -1, 84, 85, 86, 87, - 88, 58, 59, -1, -1, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 84, 85, 86, - 87, 88 + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 63, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, + 91, 92, 93, 94, 95, 96, -1, -1, -1, -1, + -1, 89, 90, 91, 92, 93, 94, 95, 96, 66, + 67, -1, 69, 70, 71, 72, 73, 74, 75, 66, + 67, -1, -1, 70, 71, 72, 73, 74, 75, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 66, 67, -1, -1, 70, 71, 72, 73, 74, 75, + 66, 67, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, + 95, 96 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 91, 107, 108, 109, - 110, 111, 112, 113, 114, 177, 90, 177, 178, 178, - 44, 0, 109, 110, 111, 44, 70, 54, 54, 92, - 180, 159, 177, 8, 32, 33, 34, 35, 36, 37, - 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 93, 94, 95, 96, 144, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 45, 45, 50, 48, 177, 178, 48, 177, - 178, 48, 144, 48, 49, 144, 160, 161, 177, 144, - 144, 95, 96, 91, 54, 55, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, - 85, 86, 87, 88, 39, 48, 51, 89, 156, 157, - 177, 178, 44, 52, 54, 46, 117, 177, 48, 44, - 52, 48, 44, 52, 48, 45, 50, 144, 50, 49, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 177, 52, 160, 161, 177, 3, 11, 14, 15, 16, - 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 47, 48, 56, 57, 115, 116, 117, - 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 146, 147, 148, 154, 155, - 163, 164, 167, 171, 172, 173, 174, 177, 144, 160, - 177, 144, 160, 177, 144, 144, 49, 144, 53, 49, - 177, 45, 44, 4, 118, 144, 54, 44, 54, 44, - 115, 44, 44, 44, 44, 85, 180, 184, 53, 54, - 54, 54, 144, 54, 44, 44, 48, 154, 155, 167, - 167, 47, 115, 54, 54, 54, 54, 54, 9, 10, - 12, 13, 56, 57, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 49, 45, 44, 49, 45, - 44, 49, 50, 49, 144, 160, 4, 54, 45, 144, - 19, 144, 119, 146, 147, 148, 167, 177, 144, 53, - 53, 54, 160, 160, 144, 44, 44, 44, 44, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 49, 160, 49, 160, 49, 144, 44, 45, 54, 45, - 44, 45, 54, 22, 50, 45, 45, 45, 144, 144, - 144, 144, 44, 45, 44, 45, 44, 45, 160, 115, - 144, 115, 144, 145, 144, 177, 117, 54, 54, 45, - 45, 50, 45, 50, 45, 50, 160, 160, 160, 45, - 17, 45, 54, 45, 22, 54, 54, 161, 54, 161, - 54, 161, 45, 45, 45, 115, 54, 119, 115, 144, - 45, 45, 45, 45, 45, 54, 54, 54, 115, 115 + 0, 11, 12, 13, 14, 15, 99, 115, 116, 117, + 118, 119, 120, 121, 122, 185, 98, 185, 186, 186, + 52, 0, 117, 118, 119, 52, 78, 62, 62, 100, + 188, 167, 185, 16, 40, 41, 42, 43, 44, 45, + 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, + 93, 96, 101, 102, 103, 104, 152, 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, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 53, 53, 58, 56, 185, 186, 56, 185, + 186, 56, 152, 56, 57, 152, 168, 169, 185, 152, + 152, 103, 104, 99, 62, 63, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, + 93, 94, 95, 96, 47, 56, 59, 97, 164, 165, + 185, 186, 52, 60, 62, 54, 125, 185, 56, 52, + 60, 56, 52, 60, 56, 53, 58, 152, 58, 57, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 185, 60, 168, 169, 185, 11, 19, 22, 23, 24, + 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 55, 56, 64, 65, 123, 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, 151, 154, 155, 156, 162, 163, + 171, 172, 175, 179, 180, 181, 182, 185, 152, 168, + 185, 152, 168, 185, 152, 152, 57, 152, 61, 57, + 185, 53, 52, 12, 126, 152, 62, 52, 62, 52, + 123, 52, 52, 52, 52, 93, 188, 192, 61, 62, + 62, 62, 152, 62, 52, 52, 56, 162, 163, 175, + 175, 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, 152, 168, 12, 62, 53, 152, + 27, 152, 127, 154, 155, 156, 175, 185, 152, 61, + 61, 62, 168, 168, 152, 52, 52, 52, 52, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 57, 168, 57, 168, 57, 152, 52, 53, 62, 53, + 52, 53, 62, 30, 58, 53, 53, 53, 152, 152, + 152, 152, 52, 53, 52, 53, 52, 53, 168, 123, + 152, 123, 152, 153, 152, 185, 125, 62, 62, 53, + 53, 58, 53, 58, 53, 58, 168, 168, 168, 53, + 25, 53, 62, 53, 30, 62, 62, 169, 62, 169, + 62, 169, 53, 53, 53, 123, 62, 127, 123, 152, + 53, 53, 53, 53, 53, 62, 62, 62, 123, 123 }; const unsigned char parser::yyr1_[] = { - 0, 106, 107, 107, 108, 108, 108, 108, 108, 108, - 109, 110, 111, 111, 111, 111, 111, 112, 113, 114, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 116, 116, 117, 117, - 118, 118, 119, 119, 119, 119, 120, 120, 121, 121, - 121, 122, 123, 123, 124, 125, 125, 126, 126, 127, - 128, 128, 129, 130, 131, 132, 133, 134, 134, 135, - 136, 136, 137, 138, 139, 140, 140, 141, 142, 143, - 144, 144, 144, 145, 145, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 147, 147, 148, 148, - 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 152, 153, 154, - 154, 155, 155, 156, 156, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 159, 159, 159, 160, 160, 161, - 161, 162, 162, 163, 164, 164, 165, 166, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 178, 179, - 180, 181, 182, 183, 183, 184, 184, 185, 186 + 0, 114, 115, 115, 116, 116, 116, 116, 116, 116, + 117, 118, 119, 119, 119, 119, 119, 120, 121, 122, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 124, 124, 125, 125, + 126, 126, 127, 127, 127, 127, 128, 128, 129, 129, + 129, 130, 131, 131, 132, 133, 133, 134, 134, 135, + 136, 136, 137, 138, 139, 140, 141, 142, 142, 143, + 144, 144, 145, 146, 147, 148, 148, 149, 150, 151, + 152, 152, 152, 153, 153, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 155, 155, 156, 156, + 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 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, 174, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 186, 187, + 188, 189, 190, 191, 191, 192, 192, 193, 194 }; const signed char @@ -4476,28 +4477,28 @@ namespace xsk { namespace gsc { namespace s1 { const short parser::yyrline_[] = { - 0, 246, 246, 247, 251, 253, 255, 257, 259, 261, - 266, 270, 275, 276, 277, 278, 279, 283, 288, 293, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 327, 328, 332, 333, - 337, 339, 344, 346, 348, 351, 355, 357, 362, 364, - 366, 371, 376, 378, 383, 388, 390, 395, 397, 402, - 407, 409, 414, 419, 424, 429, 434, 439, 441, 446, - 451, 453, 458, 463, 468, 473, 475, 480, 485, 490, - 495, 496, 497, 501, 502, 506, 508, 510, 512, 514, - 516, 518, 520, 522, 524, 526, 531, 533, 538, 540, - 545, 550, 552, 554, 556, 558, 560, 562, 564, 566, - 568, 570, 572, 574, 576, 578, 580, 582, 584, 589, - 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, - 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, - 610, 611, 612, 613, 614, 615, 616, 620, 625, 630, - 631, 634, 635, 639, 641, 643, 645, 647, 649, 654, - 656, 658, 660, 665, 670, 672, 675, 679, 682, 686, - 688, 693, 695, 700, 705, 707, 712, 717, 722, 723, - 724, 725, 726, 727, 728, 729, 730, 734, 739, 744, - 749, 754, 759, 764, 769, 774, 779, 784, 786, 791, - 796, 801, 806, 811, 813, 818, 820, 825, 830 + 0, 254, 254, 255, 259, 261, 263, 265, 267, 269, + 274, 278, 283, 284, 285, 286, 287, 291, 296, 301, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 335, 336, 340, 341, + 345, 347, 352, 354, 356, 359, 363, 365, 370, 372, + 374, 379, 384, 386, 391, 396, 398, 403, 405, 410, + 415, 417, 422, 427, 432, 437, 442, 447, 449, 454, + 459, 461, 466, 471, 476, 481, 483, 488, 493, 498, + 503, 504, 505, 509, 510, 514, 516, 518, 520, 522, + 524, 526, 528, 530, 532, 534, 539, 541, 546, 548, + 553, 558, 560, 562, 564, 566, 568, 570, 572, 574, + 576, 578, 580, 582, 584, 586, 588, 590, 592, 597, + 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, + 618, 619, 620, 621, 622, 623, 624, 628, 633, 638, + 639, 642, 643, 647, 649, 651, 653, 655, 657, 662, + 664, 666, 668, 673, 678, 680, 683, 687, 690, 694, + 696, 701, 703, 708, 713, 715, 720, 725, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 792, 794, 799, + 804, 809, 814, 819, 821, 826, 828, 833, 838 }; void @@ -4530,9 +4531,9 @@ namespace xsk { namespace gsc { namespace s1 { #line 13 "parser.ypp" } } } // xsk::gsc::s1 -#line 4534 "parser.cpp" +#line 4535 "parser.cpp" -#line 834 "parser.ypp" +#line 842 "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 488486c4..ec35a13f 100644 --- a/src/s1/xsk/parser.hpp +++ b/src/s1/xsk/parser.hpp @@ -677,109 +677,117 @@ namespace xsk { namespace gsc { namespace s1 { S1EOF = 0, // "end of file" S1error = 1, // error S1UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - WAITFRAME = 15, // "waitframe" - IF = 16, // "if" - ELSE = 17, // "else" - DO = 18, // "do" - WHILE = 19, // "while" - FOR = 20, // "for" - FOREACH = 21, // "foreach" - IN = 22, // "in" - SWITCH = 23, // "switch" - CASE = 24, // "case" - DEFAULT = 25, // "default" - BREAK = 26, // "break" - CONTINUE = 27, // "continue" - RETURN = 28, // "return" - BREAKPOINT = 29, // "breakpoint" - PROFBEGIN = 30, // "prof_begin" - PROFEND = 31, // "prof_end" - THREAD = 32, // "thread" - CHILDTHREAD = 33, // "childthread" - THISTHREAD = 34, // "thisthread" - CALL = 35, // "call" - TRUE = 36, // "true" - FALSE = 37, // "false" - UNDEFINED = 38, // "undefined" - SIZE = 39, // ".size" - GAME = 40, // "game" - SELF = 41, // "self" - ANIM = 42, // "anim" - LEVEL = 43, // "level" - LPAREN = 44, // "(" - RPAREN = 45, // ")" - LBRACE = 46, // "{" - RBRACE = 47, // "}" - LBRACKET = 48, // "[" - RBRACKET = 49, // "]" - COMMA = 50, // "," - DOT = 51, // "." - DOUBLECOLON = 52, // "::" - COLON = 53, // ":" - SEMICOLON = 54, // ";" - QMARK = 55, // "?" - INCREMENT = 56, // "++" - DECREMENT = 57, // "--" - LSHIFT = 58, // "<<" - RSHIFT = 59, // ">>" - OR = 60, // "||" - AND = 61, // "&&" - EQUALITY = 62, // "==" - INEQUALITY = 63, // "!=" - LESS_EQUAL = 64, // "<=" - GREATER_EQUAL = 65, // ">=" - LESS = 66, // "<" - GREATER = 67, // ">" - NOT = 68, // "!" - COMPLEMENT = 69, // "~" - ASSIGN = 70, // "=" - ASSIGN_ADD = 71, // "+=" - ASSIGN_SUB = 72, // "-=" - ASSIGN_MUL = 73, // "*=" - ASSIGN_DIV = 74, // "/=" - ASSIGN_MOD = 75, // "%=" - ASSIGN_BW_OR = 76, // "|=" - ASSIGN_BW_AND = 77, // "&=" - ASSIGN_BW_EXOR = 78, // "^=" - ASSIGN_RSHIFT = 79, // ">>=" - ASSIGN_LSHIFT = 80, // "<<=" - BITWISE_OR = 81, // "|" - BITWISE_AND = 82, // "&" - BITWISE_EXOR = 83, // "^" - ADD = 84, // "+" - SUB = 85, // "-" - MUL = 86, // "*" - DIV = 87, // "/" - MOD = 88, // "%" - FIELD = 89, // "field" - PATH = 90, // "path" - IDENTIFIER = 91, // "identifier" - STRING = 92, // "string literal" - ISTRING = 93, // "localized string" - COLOR = 94, // "color" - FLOAT = 95, // "float" - INTEGER = 96, // "integer" - ADD_ARRAY = 97, // ADD_ARRAY - THEN = 98, // THEN - TERN = 99, // TERN - NEG = 100, // NEG - ANIMREF = 101, // ANIMREF - PREINC = 102, // PREINC - PREDEC = 103, // PREDEC - POSTINC = 104, // POSTINC - POSTDEC = 105 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + WAITFRAME = 23, // "waitframe" + IF = 24, // "if" + ELSE = 25, // "else" + DO = 26, // "do" + WHILE = 27, // "while" + FOR = 28, // "for" + FOREACH = 29, // "foreach" + IN = 30, // "in" + SWITCH = 31, // "switch" + CASE = 32, // "case" + DEFAULT = 33, // "default" + BREAK = 34, // "break" + CONTINUE = 35, // "continue" + RETURN = 36, // "return" + BREAKPOINT = 37, // "breakpoint" + PROFBEGIN = 38, // "prof_begin" + PROFEND = 39, // "prof_end" + THREAD = 40, // "thread" + CHILDTHREAD = 41, // "childthread" + THISTHREAD = 42, // "thisthread" + CALL = 43, // "call" + TRUE = 44, // "true" + FALSE = 45, // "false" + UNDEFINED = 46, // "undefined" + SIZE = 47, // ".size" + GAME = 48, // "game" + SELF = 49, // "self" + ANIM = 50, // "anim" + LEVEL = 51, // "level" + LPAREN = 52, // "(" + RPAREN = 53, // ")" + LBRACE = 54, // "{" + RBRACE = 55, // "}" + LBRACKET = 56, // "[" + RBRACKET = 57, // "]" + COMMA = 58, // "," + DOT = 59, // "." + DOUBLECOLON = 60, // "::" + COLON = 61, // ":" + SEMICOLON = 62, // ";" + QMARK = 63, // "?" + INCREMENT = 64, // "++" + DECREMENT = 65, // "--" + LSHIFT = 66, // "<<" + RSHIFT = 67, // ">>" + OR = 68, // "||" + AND = 69, // "&&" + EQUALITY = 70, // "==" + INEQUALITY = 71, // "!=" + LESS_EQUAL = 72, // "<=" + GREATER_EQUAL = 73, // ">=" + LESS = 74, // "<" + GREATER = 75, // ">" + NOT = 76, // "!" + COMPLEMENT = 77, // "~" + ASSIGN = 78, // "=" + ASSIGN_ADD = 79, // "+=" + ASSIGN_SUB = 80, // "-=" + ASSIGN_MUL = 81, // "*=" + ASSIGN_DIV = 82, // "/=" + ASSIGN_MOD = 83, // "%=" + ASSIGN_BW_OR = 84, // "|=" + ASSIGN_BW_AND = 85, // "&=" + ASSIGN_BW_EXOR = 86, // "^=" + ASSIGN_RSHIFT = 87, // ">>=" + ASSIGN_LSHIFT = 88, // "<<=" + BITWISE_OR = 89, // "|" + BITWISE_AND = 90, // "&" + BITWISE_EXOR = 91, // "^" + ADD = 92, // "+" + SUB = 93, // "-" + MUL = 94, // "*" + DIV = 95, // "/" + MOD = 96, // "%" + FIELD = 97, // "field" + PATH = 98, // "path" + IDENTIFIER = 99, // "identifier" + STRING = 100, // "string literal" + ISTRING = 101, // "localized string" + COLOR = 102, // "color" + FLOAT = 103, // "float" + INTEGER = 104, // "integer" + ADD_ARRAY = 105, // ADD_ARRAY + THEN = 106, // THEN + TERN = 107, // TERN + NEG = 108, // NEG + ANIMREF = 109, // ANIMREF + PREINC = 110, // PREINC + PREDEC = 111, // PREDEC + POSTINC = 112, // POSTINC + POSTDEC = 113 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -796,195 +804,203 @@ namespace xsk { namespace gsc { namespace s1 { { enum symbol_kind_type { - YYNTOKENS = 106, ///< Number of tokens. + YYNTOKENS = 114, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_WAITFRAME = 15, // "waitframe" - S_IF = 16, // "if" - S_ELSE = 17, // "else" - S_DO = 18, // "do" - S_WHILE = 19, // "while" - S_FOR = 20, // "for" - S_FOREACH = 21, // "foreach" - S_IN = 22, // "in" - S_SWITCH = 23, // "switch" - S_CASE = 24, // "case" - S_DEFAULT = 25, // "default" - S_BREAK = 26, // "break" - S_CONTINUE = 27, // "continue" - S_RETURN = 28, // "return" - S_BREAKPOINT = 29, // "breakpoint" - S_PROFBEGIN = 30, // "prof_begin" - S_PROFEND = 31, // "prof_end" - S_THREAD = 32, // "thread" - S_CHILDTHREAD = 33, // "childthread" - S_THISTHREAD = 34, // "thisthread" - S_CALL = 35, // "call" - S_TRUE = 36, // "true" - S_FALSE = 37, // "false" - S_UNDEFINED = 38, // "undefined" - S_SIZE = 39, // ".size" - S_GAME = 40, // "game" - S_SELF = 41, // "self" - S_ANIM = 42, // "anim" - S_LEVEL = 43, // "level" - S_LPAREN = 44, // "(" - S_RPAREN = 45, // ")" - S_LBRACE = 46, // "{" - S_RBRACE = 47, // "}" - S_LBRACKET = 48, // "[" - S_RBRACKET = 49, // "]" - S_COMMA = 50, // "," - S_DOT = 51, // "." - S_DOUBLECOLON = 52, // "::" - S_COLON = 53, // ":" - S_SEMICOLON = 54, // ";" - S_QMARK = 55, // "?" - S_INCREMENT = 56, // "++" - S_DECREMENT = 57, // "--" - S_LSHIFT = 58, // "<<" - S_RSHIFT = 59, // ">>" - S_OR = 60, // "||" - S_AND = 61, // "&&" - S_EQUALITY = 62, // "==" - S_INEQUALITY = 63, // "!=" - S_LESS_EQUAL = 64, // "<=" - S_GREATER_EQUAL = 65, // ">=" - S_LESS = 66, // "<" - S_GREATER = 67, // ">" - S_NOT = 68, // "!" - S_COMPLEMENT = 69, // "~" - S_ASSIGN = 70, // "=" - S_ASSIGN_ADD = 71, // "+=" - S_ASSIGN_SUB = 72, // "-=" - S_ASSIGN_MUL = 73, // "*=" - S_ASSIGN_DIV = 74, // "/=" - S_ASSIGN_MOD = 75, // "%=" - S_ASSIGN_BW_OR = 76, // "|=" - S_ASSIGN_BW_AND = 77, // "&=" - S_ASSIGN_BW_EXOR = 78, // "^=" - S_ASSIGN_RSHIFT = 79, // ">>=" - S_ASSIGN_LSHIFT = 80, // "<<=" - S_BITWISE_OR = 81, // "|" - S_BITWISE_AND = 82, // "&" - S_BITWISE_EXOR = 83, // "^" - S_ADD = 84, // "+" - S_SUB = 85, // "-" - S_MUL = 86, // "*" - S_DIV = 87, // "/" - S_MOD = 88, // "%" - S_FIELD = 89, // "field" - S_PATH = 90, // "path" - S_IDENTIFIER = 91, // "identifier" - S_STRING = 92, // "string literal" - S_ISTRING = 93, // "localized string" - S_COLOR = 94, // "color" - S_FLOAT = 95, // "float" - S_INTEGER = 96, // "integer" - S_ADD_ARRAY = 97, // ADD_ARRAY - S_THEN = 98, // THEN - S_TERN = 99, // TERN - S_NEG = 100, // NEG - S_ANIMREF = 101, // ANIMREF - S_PREINC = 102, // PREINC - S_PREDEC = 103, // PREDEC - S_POSTINC = 104, // POSTINC - S_POSTDEC = 105, // POSTDEC - S_YYACCEPT = 106, // $accept - S_root = 107, // root - S_program = 108, // program - S_inline = 109, // inline - S_include = 110, // include - S_declaration = 111, // declaration - S_decl_usingtree = 112, // decl_usingtree - S_decl_constant = 113, // decl_constant - S_decl_thread = 114, // decl_thread - S_stmt = 115, // stmt - S_stmt_dev = 116, // stmt_dev - S_stmt_block = 117, // stmt_block - S_stmt_list = 118, // stmt_list - S_stmt_expr = 119, // stmt_expr - S_stmt_call = 120, // stmt_call - S_stmt_assign = 121, // stmt_assign - S_stmt_endon = 122, // stmt_endon - S_stmt_notify = 123, // stmt_notify - S_stmt_wait = 124, // stmt_wait - S_stmt_waittill = 125, // stmt_waittill - S_stmt_waittillmatch = 126, // stmt_waittillmatch - S_stmt_waittillframeend = 127, // stmt_waittillframeend - S_stmt_waitframe = 128, // stmt_waitframe - S_stmt_if = 129, // stmt_if - S_stmt_ifelse = 130, // stmt_ifelse - S_stmt_while = 131, // stmt_while - S_stmt_dowhile = 132, // stmt_dowhile - S_stmt_for = 133, // stmt_for - S_stmt_foreach = 134, // stmt_foreach - S_stmt_switch = 135, // stmt_switch - S_stmt_case = 136, // stmt_case - S_stmt_default = 137, // stmt_default - S_stmt_break = 138, // stmt_break - S_stmt_continue = 139, // stmt_continue - S_stmt_return = 140, // stmt_return - S_stmt_breakpoint = 141, // stmt_breakpoint - S_stmt_prof_begin = 142, // stmt_prof_begin - S_stmt_prof_end = 143, // stmt_prof_end - S_expr = 144, // expr - S_expr_or_empty = 145, // expr_or_empty - S_expr_assign = 146, // expr_assign - S_expr_increment = 147, // expr_increment - S_expr_decrement = 148, // expr_decrement - S_expr_ternary = 149, // expr_ternary - S_expr_binary = 150, // expr_binary - S_expr_primitive = 151, // expr_primitive - S_expr_complement = 152, // expr_complement - S_expr_not = 153, // expr_not - S_expr_call = 154, // expr_call - S_expr_method = 155, // expr_method - S_expr_function = 156, // expr_function - S_expr_pointer = 157, // expr_pointer - S_expr_add_array = 158, // expr_add_array - S_expr_parameters = 159, // expr_parameters - S_expr_arguments = 160, // expr_arguments - S_expr_arguments_no_empty = 161, // expr_arguments_no_empty - S_expr_reference = 162, // expr_reference - S_expr_array = 163, // expr_array - S_expr_field = 164, // expr_field - S_expr_size = 165, // expr_size - S_expr_paren = 166, // expr_paren - S_expr_object = 167, // expr_object - S_expr_thisthread = 168, // expr_thisthread - S_expr_empty_array = 169, // expr_empty_array - S_expr_undefined = 170, // expr_undefined - S_expr_game = 171, // expr_game - S_expr_self = 172, // expr_self - S_expr_anim = 173, // expr_anim - S_expr_level = 174, // expr_level - S_expr_animation = 175, // expr_animation - S_expr_animtree = 176, // expr_animtree - S_expr_identifier = 177, // expr_identifier - S_expr_path = 178, // expr_path - S_expr_istring = 179, // expr_istring - S_expr_string = 180, // expr_string - S_expr_color = 181, // expr_color - S_expr_vector = 182, // expr_vector - S_expr_float = 183, // expr_float - S_expr_integer = 184, // expr_integer - S_expr_false = 185, // expr_false - S_expr_true = 186 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_WAITFRAME = 23, // "waitframe" + S_IF = 24, // "if" + S_ELSE = 25, // "else" + S_DO = 26, // "do" + S_WHILE = 27, // "while" + S_FOR = 28, // "for" + S_FOREACH = 29, // "foreach" + S_IN = 30, // "in" + S_SWITCH = 31, // "switch" + S_CASE = 32, // "case" + S_DEFAULT = 33, // "default" + S_BREAK = 34, // "break" + S_CONTINUE = 35, // "continue" + S_RETURN = 36, // "return" + S_BREAKPOINT = 37, // "breakpoint" + S_PROFBEGIN = 38, // "prof_begin" + S_PROFEND = 39, // "prof_end" + S_THREAD = 40, // "thread" + S_CHILDTHREAD = 41, // "childthread" + S_THISTHREAD = 42, // "thisthread" + S_CALL = 43, // "call" + S_TRUE = 44, // "true" + S_FALSE = 45, // "false" + S_UNDEFINED = 46, // "undefined" + S_SIZE = 47, // ".size" + S_GAME = 48, // "game" + S_SELF = 49, // "self" + S_ANIM = 50, // "anim" + S_LEVEL = 51, // "level" + S_LPAREN = 52, // "(" + S_RPAREN = 53, // ")" + S_LBRACE = 54, // "{" + S_RBRACE = 55, // "}" + S_LBRACKET = 56, // "[" + S_RBRACKET = 57, // "]" + S_COMMA = 58, // "," + S_DOT = 59, // "." + S_DOUBLECOLON = 60, // "::" + S_COLON = 61, // ":" + S_SEMICOLON = 62, // ";" + S_QMARK = 63, // "?" + S_INCREMENT = 64, // "++" + S_DECREMENT = 65, // "--" + S_LSHIFT = 66, // "<<" + S_RSHIFT = 67, // ">>" + S_OR = 68, // "||" + S_AND = 69, // "&&" + S_EQUALITY = 70, // "==" + S_INEQUALITY = 71, // "!=" + S_LESS_EQUAL = 72, // "<=" + S_GREATER_EQUAL = 73, // ">=" + S_LESS = 74, // "<" + S_GREATER = 75, // ">" + S_NOT = 76, // "!" + S_COMPLEMENT = 77, // "~" + S_ASSIGN = 78, // "=" + S_ASSIGN_ADD = 79, // "+=" + S_ASSIGN_SUB = 80, // "-=" + S_ASSIGN_MUL = 81, // "*=" + S_ASSIGN_DIV = 82, // "/=" + S_ASSIGN_MOD = 83, // "%=" + S_ASSIGN_BW_OR = 84, // "|=" + S_ASSIGN_BW_AND = 85, // "&=" + S_ASSIGN_BW_EXOR = 86, // "^=" + S_ASSIGN_RSHIFT = 87, // ">>=" + S_ASSIGN_LSHIFT = 88, // "<<=" + S_BITWISE_OR = 89, // "|" + S_BITWISE_AND = 90, // "&" + S_BITWISE_EXOR = 91, // "^" + S_ADD = 92, // "+" + S_SUB = 93, // "-" + S_MUL = 94, // "*" + S_DIV = 95, // "/" + S_MOD = 96, // "%" + S_FIELD = 97, // "field" + S_PATH = 98, // "path" + S_IDENTIFIER = 99, // "identifier" + S_STRING = 100, // "string literal" + S_ISTRING = 101, // "localized string" + S_COLOR = 102, // "color" + S_FLOAT = 103, // "float" + S_INTEGER = 104, // "integer" + S_ADD_ARRAY = 105, // ADD_ARRAY + S_THEN = 106, // THEN + S_TERN = 107, // TERN + S_NEG = 108, // NEG + S_ANIMREF = 109, // ANIMREF + S_PREINC = 110, // PREINC + S_PREDEC = 111, // PREDEC + S_POSTINC = 112, // POSTINC + S_POSTDEC = 113, // POSTDEC + S_YYACCEPT = 114, // $accept + S_root = 115, // root + S_program = 116, // program + S_inline = 117, // inline + S_include = 118, // include + S_declaration = 119, // declaration + S_decl_usingtree = 120, // decl_usingtree + S_decl_constant = 121, // decl_constant + S_decl_thread = 122, // decl_thread + S_stmt = 123, // stmt + S_stmt_dev = 124, // stmt_dev + S_stmt_block = 125, // stmt_block + S_stmt_list = 126, // stmt_list + S_stmt_expr = 127, // stmt_expr + S_stmt_call = 128, // stmt_call + S_stmt_assign = 129, // stmt_assign + S_stmt_endon = 130, // stmt_endon + S_stmt_notify = 131, // stmt_notify + S_stmt_wait = 132, // stmt_wait + S_stmt_waittill = 133, // stmt_waittill + S_stmt_waittillmatch = 134, // stmt_waittillmatch + S_stmt_waittillframeend = 135, // stmt_waittillframeend + S_stmt_waitframe = 136, // stmt_waitframe + S_stmt_if = 137, // stmt_if + S_stmt_ifelse = 138, // stmt_ifelse + S_stmt_while = 139, // stmt_while + S_stmt_dowhile = 140, // stmt_dowhile + S_stmt_for = 141, // stmt_for + S_stmt_foreach = 142, // stmt_foreach + S_stmt_switch = 143, // stmt_switch + S_stmt_case = 144, // stmt_case + S_stmt_default = 145, // stmt_default + S_stmt_break = 146, // stmt_break + S_stmt_continue = 147, // stmt_continue + S_stmt_return = 148, // stmt_return + S_stmt_breakpoint = 149, // stmt_breakpoint + S_stmt_prof_begin = 150, // stmt_prof_begin + S_stmt_prof_end = 151, // stmt_prof_end + S_expr = 152, // expr + S_expr_or_empty = 153, // expr_or_empty + S_expr_assign = 154, // expr_assign + S_expr_increment = 155, // expr_increment + S_expr_decrement = 156, // expr_decrement + S_expr_ternary = 157, // expr_ternary + S_expr_binary = 158, // expr_binary + S_expr_primitive = 159, // expr_primitive + S_expr_complement = 160, // expr_complement + S_expr_not = 161, // expr_not + S_expr_call = 162, // expr_call + S_expr_method = 163, // expr_method + S_expr_function = 164, // expr_function + S_expr_pointer = 165, // expr_pointer + S_expr_add_array = 166, // expr_add_array + S_expr_parameters = 167, // expr_parameters + 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 = 185, // expr_identifier + S_expr_path = 186, // expr_path + S_expr_istring = 187, // expr_istring + S_expr_string = 188, // expr_string + S_expr_color = 189, // expr_color + 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 }; }; @@ -2779,6 +2795,126 @@ switch (yykind) return symbol_type (token::S1UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5362,7 +5498,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s1 -#line 5366 "parser.hpp" +#line 5502 "parser.hpp" diff --git a/src/s2/xsk/lexer.cpp b/src/s2/xsk/lexer.cpp index 2cf6ee57..c0a05704 100644 --- a/src/s2/xsk/lexer.cpp +++ b/src/s2/xsk/lexer.cpp @@ -16,58 +16,6 @@ xsk::gsc::s2::parser::symbol_type S2lex(xsk::gsc::s2::lexer& lexer) namespace xsk::gsc::s2 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_waitframe, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -130,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -141,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -152,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -165,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -173,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -194,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type if (header_top_ > 0) pop_header(); else - return s2::parser::make_S2EOF(loc_); + return parser::make_S2EOF(loc_); } reader_.advance(); @@ -212,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return s2::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return s2::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return s2::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -291,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type indev_ = false; reader_.advance(); - return s2::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -304,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return s2::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return s2::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -324,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::s2::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return s2::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return s2::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return s2::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return s2::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return s2::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return s2::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return s2::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return s2::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return s2::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return s2::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return s2::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return s2::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return s2::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return s2::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return s2::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return s2::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return s2::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return s2::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return s2::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return s2::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return s2::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return s2::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return s2::parser::make_OR(loc_); + return parser::make_OR(loc_); - return s2::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return s2::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return s2::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return s2::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return s2::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return s2::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return s2::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return s2::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return s2::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return s2::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return s2::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return s2::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return s2::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return s2::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return s2::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return s2::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return s2::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -497,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return s2::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return s2::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -534,44 +482,55 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return s2::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return s2::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::S2UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; } else { - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return s2::parser::make_PATH(xsk::gsc::s2::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return s2::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return s2::parser::make_IDENTIFIER(xsk::gsc::s2::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return s2::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -622,9 +581,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return s2::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return s2::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -656,7 +615,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return s2::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -690,7 +649,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return s2::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -724,179 +683,60 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return s2::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::s2::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return s2::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return s2::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return s2::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return s2::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return s2::parser::make_ENDON(loc_); - case keyword::KW_notify: - return s2::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return s2::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return s2::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return s2::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return s2::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_waitframe: - return s2::parser::make_WAITFRAME(loc_); - case keyword::KW_if: - return s2::parser::make_IF(loc_); - case keyword::KW_else: - return s2::parser::make_ELSE(loc_); - case keyword::KW_do: - return s2::parser::make_DO(loc_); - case keyword::KW_while: - return s2::parser::make_WHILE(loc_); - case keyword::KW_for: - return s2::parser::make_FOR(loc_); - case keyword::KW_foreach: - return s2::parser::make_FOREACH(loc_); - case keyword::KW_in: - return s2::parser::make_IN(loc_); - case keyword::KW_switch: - return s2::parser::make_SWITCH(loc_); - case keyword::KW_case: - return s2::parser::make_CASE(loc_); - case keyword::KW_default: - return s2::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return s2::parser::make_BREAK(loc_); - case keyword::KW_continue: - return s2::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return s2::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return s2::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return s2::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return s2::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return s2::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return s2::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return s2::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return s2::parser::make_CALL(loc_); - case keyword::KW_true: - return s2::parser::make_TRUE(loc_); - case keyword::KW_false: - return s2::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return s2::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return s2::parser::make_SIZE(loc_); - case keyword::KW_game: - return s2::parser::make_GAME(loc_); - case keyword::KW_self: - return s2::parser::make_SELF(loc_); - case keyword::KW_anim: - return s2::parser::make_ANIM(loc_); - case keyword::KW_level: - return s2::parser::make_LEVEL(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "waitframe", keyword::KW_waitframe }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "waitframe", parser::token::WAITFRAME }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, }}; } // namespace xsk::gsc::s2 diff --git a/src/s2/xsk/lexer.hpp b/src/s2/xsk/lexer.hpp index 96a38684..72d13685 100644 --- a/src/s2/xsk/lexer.hpp +++ b/src/s2/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::s2 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::s2::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::s2::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::s2 diff --git a/src/s2/xsk/parser.cpp b/src/s2/xsk/parser.cpp index 05d6ffc1..9a383717 100644 --- a/src/s2/xsk/parser.cpp +++ b/src/s2/xsk/parser.cpp @@ -1984,1303 +1984,1303 @@ namespace xsk { namespace gsc { namespace s2 { switch (yyn) { case 2: // root: program -#line 246 "parser.ypp" +#line 254 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 1990 "parser.cpp" break; case 3: // root: %empty -#line 247 "parser.ypp" +#line 255 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 1996 "parser.cpp" break; case 4: // program: program inline -#line 252 "parser.ypp" +#line 260 "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 254 "parser.ypp" +#line 262 "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 256 "parser.ypp" +#line 264 "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 258 "parser.ypp" +#line 266 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2020 "parser.cpp" break; case 8: // program: include -#line 260 "parser.ypp" +#line 268 "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 2026 "parser.cpp" break; case 9: // program: declaration -#line 262 "parser.ypp" +#line 270 "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 2032 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 266 "parser.ypp" +#line 274 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2038 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 271 "parser.ypp" +#line 279 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } #line 2044 "parser.cpp" break; case 12: // declaration: "/#" -#line 275 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2050 "parser.cpp" break; case 13: // declaration: "#/" -#line 276 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2056 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 277 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2062 "parser.cpp" break; case 15: // declaration: decl_constant -#line 278 "parser.ypp" +#line 286 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2068 "parser.cpp" break; case 16: // declaration: decl_thread -#line 279 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2074 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 284 "parser.ypp" - { lexer.restrict_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 292 "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 2080 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 289 "parser.ypp" +#line 297 "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 2086 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 294 "parser.ypp" - { lexer.restrict_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 302 "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 2092 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 298 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2098 "parser.cpp" break; case 21: // stmt: stmt_block -#line 299 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2104 "parser.cpp" break; case 22: // stmt: stmt_call -#line 300 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2110 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 301 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2116 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2122 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2128 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2134 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2140 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2146 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2152 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2158 "parser.cpp" break; case 31: // stmt: stmt_if -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2164 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2170 "parser.cpp" break; case 33: // stmt: stmt_while -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2176 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2182 "parser.cpp" break; case 35: // stmt: stmt_for -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2188 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2194 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2200 "parser.cpp" break; case 38: // stmt: stmt_case -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2206 "parser.cpp" break; case 39: // stmt: stmt_default -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2212 "parser.cpp" break; case 40: // stmt: stmt_break -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2218 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2224 "parser.cpp" break; case 42: // stmt: stmt_return -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2230 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 321 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2236 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 322 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2242 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 323 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2248 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 327 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2254 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 328 "parser.ypp" +#line 336 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2260 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 332 "parser.ypp" +#line 340 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2266 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 333 "parser.ypp" +#line 341 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2272 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 338 "parser.ypp" +#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 2278 "parser.cpp" break; case 51: // stmt_list: stmt -#line 340 "parser.ypp" +#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 2284 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 345 "parser.ypp" +#line 353 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2290 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 347 "parser.ypp" +#line 355 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2296 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 349 "parser.ypp" +#line 357 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2302 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 351 "parser.ypp" +#line 359 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2308 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 356 "parser.ypp" +#line 364 "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 2314 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 358 "parser.ypp" +#line 366 "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 2320 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 363 "parser.ypp" +#line 371 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2326 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 365 "parser.ypp" +#line 373 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2332 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 367 "parser.ypp" +#line 375 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2338 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 372 "parser.ypp" +#line 380 "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 2344 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 377 "parser.ypp" +#line 385 "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 2350 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 379 "parser.ypp" +#line 387 "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 2356 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 384 "parser.ypp" +#line 392 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2362 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 389 "parser.ypp" +#line 397 "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 2368 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 391 "parser.ypp" +#line 399 "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 2374 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 396 "parser.ypp" +#line 404 "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 2380 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 398 "parser.ypp" +#line 406 "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 2386 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 403 "parser.ypp" +#line 411 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2392 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 408 "parser.ypp" +#line 416 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2398 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 410 "parser.ypp" +#line 418 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2404 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 415 "parser.ypp" +#line 423 "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 2410 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 420 "parser.ypp" +#line 428 "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 2416 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 425 "parser.ypp" +#line 433 "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 2422 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 430 "parser.ypp" +#line 438 "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 2428 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 435 "parser.ypp" +#line 443 "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 2434 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 440 "parser.ypp" +#line 448 "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 2440 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 442 "parser.ypp" +#line 450 "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 2446 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 447 "parser.ypp" +#line 455 "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 2452 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 452 "parser.ypp" +#line 460 "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 2458 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 454 "parser.ypp" +#line 462 "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 2464 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 459 "parser.ypp" +#line 467 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2470 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 464 "parser.ypp" +#line 472 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2476 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 469 "parser.ypp" +#line 477 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2482 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 474 "parser.ypp" +#line 482 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2488 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 476 "parser.ypp" +#line 484 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2494 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 481 "parser.ypp" +#line 489 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2500 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 486 "parser.ypp" +#line 494 "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 2506 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 491 "parser.ypp" +#line 499 "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 2512 "parser.cpp" break; case 90: // expr: expr_ternary -#line 495 "parser.ypp" +#line 503 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2518 "parser.cpp" break; case 91: // expr: expr_binary -#line 496 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2524 "parser.cpp" break; case 92: // expr: expr_primitive -#line 497 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2530 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2536 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 502 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2542 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 507 "parser.ypp" +#line 515 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 509 "parser.ypp" +#line 517 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].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 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } #line 2572 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 517 "parser.ypp" +#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 519 "parser.ypp" +#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 521 "parser.ypp" +#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 523 "parser.ypp" +#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 525 "parser.ypp" +#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 527 "parser.ypp" +#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 532 "parser.ypp" +#line 540 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2614 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 534 "parser.ypp" +#line 542 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2620 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 539 "parser.ypp" +#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); } #line 2626 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 541 "parser.ypp" +#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); } #line 2632 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 546 "parser.ypp" +#line 554 "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 2638 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 551 "parser.ypp" +#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 2644 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 553 "parser.ypp" +#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 2650 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().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 114: // expr_binary: expr "!=" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().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 115: // expr_binary: expr "<=" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().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 116: // expr_binary: expr ">=" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().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 117: // expr_binary: expr "<" expr -#line 563 "parser.ypp" +#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 565 "parser.ypp" +#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 567 "parser.ypp" +#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 569 "parser.ypp" +#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 571 "parser.ypp" +#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 573 "parser.ypp" +#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 575 "parser.ypp" +#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 577 "parser.ypp" +#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 579 "parser.ypp" +#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 581 "parser.ypp" +#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 583 "parser.ypp" +#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 585 "parser.ypp" +#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 589 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2752 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 590 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2758 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 591 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2764 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 592 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2770 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2776 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2782 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2788 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2794 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2800 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2806 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2812 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2818 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2824 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2830 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2836 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2842 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2848 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2854 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 607 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2860 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 608 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2866 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 609 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2872 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 610 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2878 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2884 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 612 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2890 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 613 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2896 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 614 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2902 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 615 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2908 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2914 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2920 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 626 "parser.ypp" +#line 634 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2926 "parser.cpp" break; case 159: // expr_call: expr_function -#line 630 "parser.ypp" +#line 638 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2932 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 631 "parser.ypp" +#line 639 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2938 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 634 "parser.ypp" +#line 642 "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 2944 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 635 "parser.ypp" +#line 643 "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 2950 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 648 "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 2956 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 650 "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 2962 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 652 "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 2968 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 654 "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 2974 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 656 "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 2980 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 658 "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 2986 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 655 "parser.ypp" +#line 663 "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 2992 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 665 "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 2998 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 667 "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 3004 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 661 "parser.ypp" +#line 669 "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 3010 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 666 "parser.ypp" +#line 674 "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 3016 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 671 "parser.ypp" +#line 679 "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 3022 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 673 "parser.ypp" +#line 681 "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 3028 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 675 "parser.ypp" +#line 683 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3034 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 680 "parser.ypp" +#line 688 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3040 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 682 "parser.ypp" +#line 690 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3046 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 687 "parser.ypp" +#line 695 "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 3052 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 689 "parser.ypp" +#line 697 "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 3058 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 694 "parser.ypp" +#line 702 "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 3064 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 696 "parser.ypp" +#line 704 "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 3070 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 701 "parser.ypp" +#line 709 "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 3076 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 706 "parser.ypp" +#line 714 "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 3082 "parser.cpp" break; case 185: // expr_field: expr_object "field" -#line 708 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3088 "parser.cpp" break; case 186: // expr_size: expr_object ".size" -#line 713 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3094 "parser.cpp" break; case 187: // expr_paren: "(" expr ")" -#line 718 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3100 "parser.cpp" break; case 188: // expr_object: expr_call -#line 722 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3106 "parser.cpp" break; case 189: // expr_object: expr_method -#line 723 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3112 "parser.cpp" break; case 190: // expr_object: expr_array -#line 724 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3118 "parser.cpp" break; case 191: // expr_object: expr_field -#line 725 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3124 "parser.cpp" break; case 192: // expr_object: expr_game -#line 726 "parser.ypp" +#line 734 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3130 "parser.cpp" break; case 193: // expr_object: expr_self -#line 727 "parser.ypp" +#line 735 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3136 "parser.cpp" break; case 194: // expr_object: expr_anim -#line 728 "parser.ypp" +#line 736 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3142 "parser.cpp" break; case 195: // expr_object: expr_level -#line 729 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3148 "parser.cpp" break; case 196: // expr_object: expr_identifier -#line 730 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3154 "parser.cpp" break; case 197: // expr_thisthread: "thisthread" -#line 735 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3160 "parser.cpp" break; case 198: // expr_empty_array: "[" "]" -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3166 "parser.cpp" break; case 199: // expr_undefined: "undefined" -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3172 "parser.cpp" break; case 200: // expr_game: "game" -#line 750 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3178 "parser.cpp" break; case 201: // expr_self: "self" -#line 755 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3184 "parser.cpp" break; case 202: // expr_anim: "anim" -#line 760 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3190 "parser.cpp" break; case 203: // expr_level: "level" -#line 765 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3196 "parser.cpp" break; case 204: // expr_animation: "%" "identifier" -#line 770 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3202 "parser.cpp" break; case 205: // expr_animtree: "#animtree" -#line 775 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3208 "parser.cpp" break; case 206: // expr_identifier: "identifier" -#line 780 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3214 "parser.cpp" break; case 207: // expr_path: "path" -#line 785 "parser.ypp" +#line 793 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3220 "parser.cpp" break; case 208: // expr_path: expr_identifier -#line 787 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3226 "parser.cpp" break; case 209: // expr_istring: "localized string" -#line 792 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3232 "parser.cpp" break; case 210: // expr_string: "string literal" -#line 797 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3238 "parser.cpp" break; case 211: // expr_color: "color" -#line 802 "parser.ypp" +#line 810 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3244 "parser.cpp" break; case 212: // expr_vector: "(" expr "," expr "," expr ")" -#line 807 "parser.ypp" +#line 815 "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 3250 "parser.cpp" break; case 213: // expr_float: "-" "float" -#line 812 "parser.ypp" +#line 820 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3256 "parser.cpp" break; case 214: // expr_float: "float" -#line 814 "parser.ypp" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3262 "parser.cpp" break; case 215: // expr_integer: "-" "integer" -#line 819 "parser.ypp" +#line 827 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3268 "parser.cpp" break; case 216: // expr_integer: "integer" -#line 821 "parser.ypp" +#line 829 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3274 "parser.cpp" break; case 217: // expr_false: "false" -#line 826 "parser.ypp" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3280 "parser.cpp" break; case 218: // expr_true: "true" -#line 831 "parser.ypp" +#line 839 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3286 "parser.cpp" break; @@ -3470,7 +3470,8 @@ namespace xsk { namespace gsc { namespace s2 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "waitframe", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", @@ -3773,50 +3774,50 @@ namespace xsk { namespace gsc { namespace s2 { const short parser::yypact_[] = { - 13, -267, -267, 8, 8, -11, -267, 27, 13, -267, - -267, -267, -267, -267, -267, -31, -267, -267, -16, -10, - -42, -267, -267, -267, -267, -38, 1203, -267, -267, -267, - 20, -21, -267, -267, -17, -5, -267, 29, -267, -267, - -267, -267, -267, -267, -267, 1203, 1073, -38, 1203, 1203, - 52, -2, -267, -267, -267, -267, 2007, -267, -267, -267, - -267, -267, 31, 354, -267, -267, -267, -267, 440, 813, - -267, -267, 943, -267, -267, -267, 1169, 1234, 1282, 1296, - -267, -267, 556, 49, -267, -267, -267, -267, -267, -267, - -267, -267, 43, 35, -38, 69, 79, 85, 93, 113, - 110, 119, 1333, 1073, -267, 2090, 118, 120, -267, -267, - -267, -267, -267, -267, -267, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, -267, 1268, -38, -267, -267, -267, - 126, 122, 1203, -38, -267, 787, -267, -267, 1203, 1203, - -38, 1203, 1203, -38, 1203, -267, 1203, 1069, 1203, -267, - 1972, 142, 142, 2121, 2131, 617, 617, 44, 44, 44, - 44, 2162, 2203, 2172, 73, 73, -267, -267, -267, 1777, - -267, -38, -8, -267, 128, 865, 1203, 129, -18, 132, - 1047, 136, 138, 143, 144, -64, 148, 135, 141, 1138, - 149, 153, 158, -267, 159, 123, 123, -267, -267, -267, - 917, -267, -267, -267, -267, -267, -267, -267, -267, -267, + 5, -267, -267, 49, 49, -28, -267, 26, 5, -267, + -267, -267, -267, -267, -267, -39, -267, -267, -34, -32, + -64, -267, -267, -267, -267, -61, 1195, -267, -267, -267, + 8, -26, -267, -267, -25, -13, -267, -3, -267, -267, + -267, -267, -267, -267, -267, 1195, 1065, -61, 1195, 1195, + -14, -55, -267, -267, -267, -267, 1999, -267, -267, -267, + -267, -267, 23, 346, -267, -267, -267, -267, 432, 805, + -267, -267, 935, -267, -267, -267, 1161, 1226, 1274, 1288, + -267, -267, 548, 17, -267, -267, -267, -267, -267, -267, + -267, -267, 3, 27, -61, 41, 31, 57, 42, 71, + 77, 45, 1325, 1065, -267, 2082, 83, 111, -267, -267, + -267, -267, -267, -267, -267, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, -267, 1260, -61, -267, -267, -267, + 117, 110, 1195, -61, -267, 779, -267, -267, 1195, 1195, + -61, 1195, 1195, -61, 1195, -267, 1195, 1061, 1195, -267, + 1964, 134, 134, 2113, 2123, 609, 609, 36, 36, 36, + 36, 2154, 2195, 2164, 65, 65, -267, -267, -267, 1769, + -267, -61, -16, -267, 122, 857, 1195, 118, -29, 124, + 1039, 130, 131, 135, 136, -5, 128, 133, 139, 1130, + 140, 145, 151, -267, 152, 115, 115, -267, -267, -267, + 909, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, - -267, -267, -267, -267, -267, 154, 155, 161, 165, 177, - -267, -267, 36, -267, -267, -267, -267, -22, 1817, 7, - 188, 1857, 9, 190, 1897, 1936, 186, 2090, 1203, -267, - 128, -267, 1203, -267, 995, 2042, -267, 192, -267, 1203, - 219, 1203, 542, -38, 1203, 150, 194, 196, -267, -267, - -267, -267, 2077, -267, 1203, 1203, 1203, -267, -267, 185, - 185, -267, -267, -267, -267, -267, -267, -267, 201, 206, - 207, 209, -267, -267, 1203, 1203, 1203, 1203, 1203, 1203, - 1203, 1203, 1203, 1203, 1203, 205, -267, 1203, 208, -267, - 1203, 210, 1203, 211, 2090, 11, -267, -267, 202, 1499, - 217, 1533, 213, -267, -267, -267, 677, 1, 1567, -267, - -267, -267, 17, 38, 1069, 1203, 1203, 1203, 1203, 2090, - 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, 2090, - 218, 45, 221, 46, 224, 1601, 1203, -267, -267, 1047, - 1203, 1047, 1203, 1203, -38, 35, 223, 225, 1635, 1377, - 1421, 1465, 1203, -267, 1203, -267, 1203, -267, 55, 264, - 1669, -267, 2090, 231, 1703, 241, -267, -267, -267, 232, - 233, 1203, 234, 1203, 237, 1203, 74, 90, 99, -267, - 1047, 238, 542, 1047, 1203, -267, -267, 248, -267, 249, - -267, 255, -267, -267, -267, -267, -267, 256, -267, 1737, - 251, 253, 254, 1047, 1047, -267, -267, -267, -267, -267 + -267, -267, -267, -267, -267, 147, 153, 157, 169, 170, + -267, -267, 28, -267, -267, -267, -267, -31, 1809, -2, + 155, 1849, -1, 182, 1889, 1928, 178, 2082, 1195, -267, + 122, -267, 1195, -267, 987, 2034, -267, 184, -267, 1195, + 211, 1195, 534, -61, 1195, 141, 185, 186, -267, -267, + -267, -267, 2069, -267, 1195, 1195, 1195, -267, -267, 177, + 177, -267, -267, -267, -267, -267, -267, -267, 197, 198, + 199, 201, -267, -267, 1195, 1195, 1195, 1195, 1195, 1195, + 1195, 1195, 1195, 1195, 1195, 200, -267, 1195, 202, -267, + 1195, 204, 1195, 203, 2082, 1, -267, -267, 192, 1491, + 210, 1525, 194, -267, -267, -267, 669, -8, 1559, -267, + -267, -267, 9, 38, 1061, 1195, 1195, 1195, 1195, 2082, + 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, + 213, 47, 215, 66, 216, 1593, 1195, -267, -267, 1039, + 1195, 1039, 1195, 1195, -61, 27, 217, 219, 1627, 1369, + 1413, 1457, 1195, -267, 1195, -267, 1195, -267, 82, 238, + 1661, -267, 2082, 223, 1695, 247, -267, -267, -267, 224, + 225, 1195, 226, 1195, 229, 1195, 91, 104, 114, -267, + 1039, 230, 534, 1039, 1195, -267, -267, 240, -267, 241, + -267, 248, -267, -267, -267, -267, -267, 249, -267, 1729, + 243, 244, 245, 1039, 1039, -267, -267, -267, -267, -267 }; const unsigned char @@ -3871,8 +3872,8 @@ namespace xsk { namespace gsc { namespace s2 { const short parser::yypgoto_[] = { - -267, -267, -267, 294, 298, 301, -267, -267, -267, -72, - -267, -91, 146, -83, -267, -267, -267, -267, -267, -267, + -267, -267, -267, 292, 300, 301, -267, -267, -267, -72, + -267, -91, 144, -81, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, -267, 195, -267, -266, -260, -258, -267, -267, -267, -267, -267, -130, -12, @@ -3901,38 +3902,38 @@ namespace xsk { namespace gsc { namespace s2 { { 15, 107, 146, 17, 17, 138, 333, 139, 15, 18, 19, 30, 334, 25, 335, 238, 1, 2, 3, 4, - 5, 275, 142, 373, 93, 32, 267, 21, 29, 94, - -208, 95, 55, 20, 96, 99, 268, 261, 27, 26, - 97, 100, 158, 98, 28, 298, 299, 108, 300, 301, - 29, 374, 316, 6, 319, 238, 367, 158, 107, 158, - 238, 158, 376, -188, -188, 92, -188, 158, 34, 35, - -188, 37, 140, 16, 6, 287, 287, 101, 141, -188, - 238, 145, -188, 377, 135, 16, 6, 136, 158, 113, - 383, 385, 302, 303, 147, 158, 158, 144, 16, 6, - 409, 143, 116, 117, 6, 158, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 148, 270, 422, - -188, -188, -188, 149, 158, 137, 16, 6, 129, 130, - 131, 132, 133, 239, 238, 423, 180, 150, 292, 240, - 158, 151, 287, 184, 424, 247, 333, 111, 112, 158, - 250, 141, 334, 253, 335, 34, 35, 152, 37, 131, - 132, 133, 153, 41, 42, 43, 44, 154, 158, 159, - 142, 204, 262, 239, 181, 138, 269, 139, 239, 240, - 271, 260, 272, 266, 240, 247, 276, 273, 274, 279, - 247, 141, 292, 288, 288, 280, 141, 284, 239, 240, - 240, 278, 285, 283, 240, 247, 247, 286, 293, 294, - 247, 141, 141, 16, 6, 295, 141, 34, 35, 296, + 5, 142, 373, 267, 20, 32, 21, 93, 27, -208, + 28, 95, 94, 268, 96, 99, 29, 261, 6, 26, + 97, 100, 158, 98, 113, 298, 299, 108, 300, 301, + 374, 316, 319, 101, 367, 238, 158, 158, 107, 158, + 238, 92, 376, -188, -188, 144, -188, 158, 34, 35, + -188, 37, 140, 16, 6, 287, 287, 143, 141, -188, + 238, 145, -188, 149, 135, 16, 6, 136, 275, 111, + 112, 377, 302, 303, 147, 29, 158, 148, 151, 55, + 383, 154, 116, 117, 6, 158, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 150, 270, 385, + -188, -188, -188, 152, 158, 137, 16, 6, 129, 130, + 131, 132, 133, 239, 238, 409, 180, 153, 292, 240, + 158, 158, 287, 184, 422, 247, 333, 16, 6, 158, + 250, 141, 334, 253, 335, 34, 35, 423, 37, 131, + 132, 133, 158, 41, 42, 43, 44, 424, 159, 142, + 181, 204, 158, 239, 262, 138, 269, 139, 239, 240, + 266, 260, 271, 272, 240, 247, 276, 273, 274, 278, + 247, 141, 292, 288, 288, 279, 141, 284, 239, 240, + 240, 280, 283, 285, 240, 247, 247, 317, 286, 293, + 247, 141, 141, 16, 6, 294, 141, 34, 35, 295, 37, 56, 138, 138, 139, 139, 129, 130, 131, 132, - 133, 297, 317, 135, 320, 323, 136, 328, 330, 238, - 102, 238, 140, 109, 110, 345, 112, 339, 141, 340, - 346, 347, 239, 348, 360, 366, 368, 362, 240, 364, - 288, 370, 382, 414, 247, 384, 240, 372, 386, 138, - 141, 139, 247, 337, 137, 16, 6, 397, 141, 398, - 238, 410, 287, 238, 396, 412, 415, 416, 418, 140, + 133, 296, 297, 135, 320, 323, 136, 328, 330, 238, + 102, 238, 140, 109, 110, 112, 339, 340, 141, 345, + 346, 347, 239, 348, 368, 366, 372, 360, 240, 362, + 288, 364, 370, 410, 247, 382, 240, 384, 386, 138, + 141, 139, 247, 337, 137, 16, 6, 414, 141, 397, + 238, 398, 287, 238, 396, 412, 415, 416, 418, 140, 140, 420, 426, 430, 431, 141, 141, 389, 157, 391, - 432, 433, 22, 238, 238, 435, 23, 436, 437, 24, + 22, 432, 433, 238, 238, 435, 436, 437, 23, 24, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 427, - 179, 264, 277, 0, 0, 0, 140, 0, 425, 0, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 264, + 179, 427, 277, 0, 0, 0, 140, 0, 425, 0, 0, 428, 141, 248, 0, 0, 251, 0, 0, 254, 0, 255, 0, 257, 0, 0, 417, 239, 419, 239, 421, 438, 439, 240, 0, 240, 0, 0, 0, 247, @@ -4135,311 +4136,311 @@ namespace xsk { namespace gsc { namespace s2 { parser::yycheck_[] = { 0, 46, 93, 3, 4, 72, 272, 72, 8, 3, - 4, 20, 272, 44, 272, 145, 3, 4, 5, 6, - 7, 85, 44, 22, 45, 25, 44, 0, 92, 50, - 52, 48, 96, 44, 34, 35, 54, 45, 54, 70, - 34, 35, 50, 48, 54, 9, 10, 47, 12, 13, - 92, 50, 45, 91, 45, 185, 45, 50, 103, 50, - 190, 50, 45, 32, 33, 45, 35, 50, 32, 33, - 39, 35, 72, 90, 91, 205, 206, 48, 72, 48, - 210, 46, 51, 45, 48, 90, 91, 51, 50, 91, - 45, 45, 56, 57, 94, 50, 50, 54, 90, 91, - 45, 52, 58, 59, 91, 50, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 190, 45, - 89, 90, 91, 44, 50, 89, 90, 91, 84, 85, - 86, 87, 88, 145, 264, 45, 136, 52, 210, 145, - 50, 48, 272, 143, 45, 145, 412, 95, 96, 50, - 150, 145, 412, 153, 412, 32, 33, 44, 35, 86, - 87, 88, 52, 40, 41, 42, 43, 48, 50, 49, - 44, 48, 44, 185, 52, 242, 44, 242, 190, 185, - 44, 181, 44, 54, 190, 185, 195, 44, 44, 54, - 190, 185, 264, 205, 206, 54, 190, 44, 210, 205, - 206, 53, 44, 54, 210, 205, 206, 48, 54, 54, - 210, 205, 206, 90, 91, 54, 210, 32, 33, 54, - 35, 26, 289, 290, 289, 290, 84, 85, 86, 87, - 88, 54, 44, 48, 44, 49, 51, 45, 19, 369, - 45, 371, 242, 48, 49, 44, 96, 53, 242, 53, - 44, 44, 264, 44, 49, 44, 54, 49, 264, 49, - 272, 44, 44, 22, 264, 44, 272, 54, 44, 336, - 264, 336, 272, 273, 89, 90, 91, 54, 272, 54, - 410, 17, 412, 413, 375, 54, 54, 54, 54, 289, - 290, 54, 54, 45, 45, 289, 290, 369, 103, 371, - 45, 45, 8, 433, 434, 54, 8, 54, 54, 8, + 4, 20, 272, 52, 272, 145, 11, 12, 13, 14, + 15, 52, 30, 52, 52, 25, 0, 53, 62, 60, + 62, 56, 58, 62, 34, 35, 100, 53, 99, 78, + 34, 35, 58, 56, 99, 17, 18, 47, 20, 21, + 58, 53, 53, 56, 53, 185, 58, 58, 103, 58, + 190, 53, 53, 40, 41, 62, 43, 58, 40, 41, + 47, 43, 72, 98, 99, 205, 206, 60, 72, 56, + 210, 54, 59, 52, 56, 98, 99, 59, 93, 103, + 104, 53, 64, 65, 94, 100, 58, 56, 56, 104, + 53, 56, 66, 67, 99, 58, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 60, 190, 53, + 97, 98, 99, 52, 58, 97, 98, 99, 92, 93, + 94, 95, 96, 145, 264, 53, 136, 60, 210, 145, + 58, 58, 272, 143, 53, 145, 412, 98, 99, 58, + 150, 145, 412, 153, 412, 40, 41, 53, 43, 94, + 95, 96, 58, 48, 49, 50, 51, 53, 57, 52, + 60, 56, 58, 185, 52, 242, 52, 242, 190, 185, + 62, 181, 52, 52, 190, 185, 195, 52, 52, 61, + 190, 185, 264, 205, 206, 62, 190, 52, 210, 205, + 206, 62, 62, 52, 210, 205, 206, 52, 56, 62, + 210, 205, 206, 98, 99, 62, 210, 40, 41, 62, + 43, 26, 289, 290, 289, 290, 92, 93, 94, 95, + 96, 62, 62, 56, 52, 57, 59, 53, 27, 369, + 45, 371, 242, 48, 49, 104, 61, 61, 242, 52, + 52, 52, 264, 52, 62, 52, 62, 57, 264, 57, + 272, 57, 52, 25, 264, 52, 272, 52, 52, 336, + 264, 336, 272, 273, 97, 98, 99, 30, 272, 62, + 410, 62, 412, 413, 375, 62, 62, 62, 62, 289, + 290, 62, 62, 53, 53, 289, 290, 369, 103, 371, + 8, 53, 53, 433, 434, 62, 62, 62, 8, 8, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 412, - 135, 185, 195, -1, -1, -1, 336, -1, 410, -1, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 185, + 135, 412, 195, -1, -1, -1, 336, -1, 410, -1, -1, 413, 336, 148, -1, -1, 151, -1, -1, 154, -1, 156, -1, 158, -1, -1, 401, 369, 403, 371, 405, 433, 434, 369, -1, 371, -1, -1, -1, 369, -1, 371, -1, -1, 374, 369, -1, 371, -1, -1, - -1, 186, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 145, -1, 39, 199, -1, -1, 145, 410, -1, - 412, 413, 48, -1, 410, 51, 412, 413, -1, -1, + -1, 186, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 145, -1, 47, 199, -1, -1, 145, 410, -1, + 412, 413, 56, -1, 410, 59, 412, 413, -1, -1, 410, -1, 412, 413, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, 145, -1, 433, 434, -1, -1, 185, -1, 433, 434, -1, 190, 185, -1, 433, - 434, -1, 190, 89, 90, 91, -1, -1, -1, -1, + 434, -1, 190, 97, 98, 99, -1, -1, -1, -1, -1, 205, 206, 258, -1, -1, 210, 205, 206, -1, -1, -1, 210, -1, 269, 185, 271, -1, -1, 274, - 190, -1, 32, 33, 145, 35, -1, -1, -1, 39, - -1, 286, 142, -1, -1, 205, 206, -1, 48, 149, - 210, 51, 152, 145, -1, -1, -1, -1, -1, 304, + 190, -1, 40, 41, 145, 43, -1, -1, -1, 47, + -1, 286, 142, -1, -1, 205, 206, -1, 56, 149, + 210, 59, 152, 145, -1, -1, -1, -1, -1, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 264, 145, -1, -1, 185, -1, 264, 322, 272, 190, - -1, -1, -1, -1, 272, -1, -1, -1, -1, 89, - 90, 91, -1, 185, 205, 206, -1, -1, 190, 210, + -1, -1, -1, -1, 272, -1, -1, -1, -1, 97, + 98, 99, -1, 185, 205, 206, -1, -1, 190, 210, 345, 346, 347, 348, 264, -1, -1, -1, -1, -1, -1, 185, 272, 205, 206, -1, 190, -1, 210, -1, -1, -1, -1, -1, -1, 370, -1, 372, 373, -1, - -1, 205, 206, -1, 32, 33, 210, 35, -1, -1, - -1, -1, 40, 41, 42, 43, -1, -1, 32, 33, - 48, 35, -1, 264, -1, 39, -1, -1, 56, 57, - 44, 272, 262, -1, 48, -1, -1, 51, 52, 414, + -1, 205, 206, -1, 40, 41, 210, 43, -1, -1, + -1, -1, 48, 49, 50, 51, -1, -1, 40, 41, + 56, 43, -1, 264, -1, 47, -1, -1, 64, 65, + 52, 272, 262, -1, 56, -1, -1, 59, 60, 414, -1, -1, 264, -1, -1, 369, -1, 371, -1, -1, 272, 369, -1, 371, 284, 285, -1, -1, -1, -1, - 264, -1, 90, 91, -1, -1, -1, -1, 272, -1, - -1, -1, -1, -1, -1, 89, 90, 91, -1, 369, + 264, -1, 98, 99, -1, -1, -1, -1, 272, -1, + -1, -1, -1, -1, -1, 97, 98, 99, -1, 369, -1, 371, -1, -1, -1, -1, 410, 317, 412, 413, 320, -1, 410, -1, 412, 413, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 58, 59, -1, -1, 433, - 434, 64, 65, 66, 67, 433, 434, -1, -1, -1, + -1, -1, -1, -1, -1, 66, 67, -1, -1, 433, + 434, 72, 73, 74, 75, 433, 434, -1, -1, -1, 410, -1, 412, 413, -1, -1, -1, -1, 369, -1, - 371, 84, 85, 86, 87, 88, 366, -1, -1, 32, - 33, -1, 35, 433, 434, -1, -1, 369, -1, 371, - -1, -1, 382, -1, 384, 48, 386, -1, 51, -1, - -1, -1, -1, 56, 57, 369, -1, 371, -1, 410, - -1, 412, 413, -1, -1, -1, -1, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 410, -1, - 412, 413, 433, 434, -1, -1, 89, 90, 91, -1, + 371, 92, 93, 94, 95, 96, 366, -1, -1, 40, + 41, -1, 43, 433, 434, -1, -1, 369, -1, 371, + -1, -1, 382, -1, 384, 56, 386, -1, 59, -1, + -1, -1, -1, 64, 65, 369, -1, 371, -1, 410, + -1, 412, 413, -1, -1, -1, -1, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 410, -1, + 412, 413, 433, 434, -1, -1, 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, 410, -1, 412, 413, -1, 433, 434, -1, -1, -1, -1, -1, -1, -1, - 3, -1, -1, -1, -1, -1, -1, -1, 11, 433, - 434, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, -1, -1, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, -1, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, 47, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, -1, - -1, 48, -1, -1, 51, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 90, 91, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, 89, 90, 91, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - 3, 56, 57, -1, -1, -1, -1, -1, 11, -1, - -1, 14, 15, 16, -1, 18, 19, 20, 21, -1, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 8, 35, -1, -1, 90, 91, 40, 41, 42, - 43, -1, -1, 46, -1, 48, -1, -1, -1, -1, - -1, -1, -1, 56, 57, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, 49, -1, - -1, 48, 49, -1, 55, 52, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 90, 91, -1, - -1, 68, 69, -1, -1, -1, 8, -1, -1, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, -1, -1, 48, -1, -1, -1, - 52, -1, 54, -1, -1, -1, -1, -1, -1, -1, - -1, 32, 33, -1, 35, -1, 68, 69, 39, -1, - -1, 8, -1, -1, -1, -1, -1, 48, -1, -1, - 51, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, - -1, 48, -1, -1, -1, 52, -1, -1, 89, 90, - 91, -1, -1, -1, -1, -1, 32, 33, -1, 35, - -1, 68, 69, 39, -1, -1, 8, -1, -1, -1, - -1, -1, 48, -1, -1, 51, -1, -1, 85, -1, - -1, 88, -1, 90, 91, 92, 93, 94, 95, 96, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, -1, 32, 33, 48, 35, -1, -1, - 52, 39, -1, 89, 90, 91, -1, -1, 32, 33, - 48, 35, -1, 51, -1, 39, 68, 69, -1, -1, - -1, -1, -1, -1, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, -1, 90, 91, - 92, 93, 94, 95, 96, -1, -1, -1, -1, -1, - -1, 89, 90, 91, -1, -1, -1, -1, 45, -1, - -1, -1, -1, 50, -1, 89, 90, 91, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 45, -1, -1, -1, -1, 50, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 45, -1, -1, -1, - -1, 50, -1, -1, -1, -1, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 11, -1, -1, -1, -1, -1, -1, -1, 19, 433, + 434, 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, -1, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, -1, 43, -1, -1, 98, 99, 48, 49, 50, + 51, -1, -1, 54, 55, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + -1, 56, -1, -1, 59, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 98, 99, 22, + 23, 24, -1, 26, 27, 28, 29, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, -1, + 43, -1, 97, 98, 99, 48, 49, 50, 51, -1, + -1, 54, -1, 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, 98, 99, 48, 49, 50, + 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, + -1, -1, -1, 64, 65, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, 57, -1, + -1, 56, 57, -1, 63, 60, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 98, 99, -1, + -1, 76, 77, -1, -1, -1, 16, -1, -1, -1, + 89, 90, 91, 92, 93, 94, 95, 96, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, -1, -1, 56, -1, -1, -1, + 60, -1, 62, -1, -1, -1, -1, -1, -1, -1, + -1, 40, 41, -1, 43, -1, 76, 77, 47, -1, + -1, 16, -1, -1, -1, -1, -1, 56, -1, -1, + 59, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, -1, -1, + -1, 56, -1, -1, -1, 60, -1, -1, 97, 98, + 99, -1, -1, -1, -1, -1, 40, 41, -1, 43, + -1, 76, 77, 47, -1, -1, 16, -1, -1, -1, + -1, -1, 56, -1, -1, 59, -1, -1, 93, -1, + -1, 96, -1, 98, 99, 100, 101, 102, 103, 104, + 40, 41, 42, 43, 44, 45, 46, -1, 48, 49, + 50, 51, 52, -1, 40, 41, 56, 43, -1, -1, + 60, 47, -1, 97, 98, 99, -1, -1, 40, 41, + 56, 43, -1, 59, -1, 47, 76, 77, -1, -1, + -1, -1, -1, -1, 56, -1, -1, 59, -1, -1, + -1, -1, -1, 93, -1, -1, 96, -1, 98, 99, + 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, + -1, 97, 98, 99, -1, -1, -1, -1, 53, -1, + -1, -1, -1, 58, -1, 97, 98, 99, 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, -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, 81, 82, 83, 84, 85, 86, 87, 88, - 45, -1, -1, -1, -1, 50, -1, -1, -1, -1, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 45, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -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, 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, - 45, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 55, -1, -1, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, -1, 81, 82, 83, 84, - 85, 86, 87, 88, 55, -1, -1, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 45, -1, - 81, 82, 83, 84, 85, 86, 87, 88, 55, -1, - -1, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 45, -1, 81, 82, 83, 84, 85, 86, - 87, 88, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 49, -1, -1, -1, - -1, -1, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 50, -1, -1, -1, - -1, 55, -1, -1, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 53, -1, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 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, 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, 61, -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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, 86, 87, 88, 54, 55, -1, -1, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 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, 62, 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, 81, 82, 83, 84, 85, 86, 87, - 88, 54, 55, -1, -1, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 55, -1, -1, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 81, 82, - 83, 84, 85, 86, 87, 88, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, 58, - 59, -1, 61, 62, 63, 64, 65, 66, 67, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, -1, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - -1, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, 82, 83, 84, 85, 86, 87, - 88, -1, -1, -1, 82, -1, 84, 85, 86, 87, - 88, 58, 59, -1, -1, 62, 63, 64, 65, 66, - 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 84, 85, 86, - 87, 88 + -1, -1, -1, 89, 90, 91, 92, 93, 94, 95, + 96, 62, 63, -1, -1, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 63, -1, -1, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 89, 90, + 91, 92, 93, 94, 95, 96, -1, -1, -1, -1, + -1, 89, 90, 91, 92, 93, 94, 95, 96, 66, + 67, -1, 69, 70, 71, 72, 73, 74, 75, 66, + 67, -1, -1, 70, 71, 72, 73, 74, 75, -1, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, + 66, 67, -1, -1, 70, 71, 72, 73, 74, 75, + 66, 67, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 92, 93, 94, + 95, 96 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 91, 107, 108, 109, - 110, 111, 112, 113, 114, 177, 90, 177, 178, 178, - 44, 0, 109, 110, 111, 44, 70, 54, 54, 92, - 180, 159, 177, 8, 32, 33, 34, 35, 36, 37, - 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 93, 94, 95, 96, 144, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 45, 45, 50, 48, 177, 178, 48, 177, - 178, 48, 144, 48, 49, 144, 160, 161, 177, 144, - 144, 95, 96, 91, 54, 55, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, - 85, 86, 87, 88, 39, 48, 51, 89, 156, 157, - 177, 178, 44, 52, 54, 46, 117, 177, 48, 44, - 52, 48, 44, 52, 48, 45, 50, 144, 50, 49, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 177, 52, 160, 161, 177, 3, 11, 14, 15, 16, - 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 47, 48, 56, 57, 115, 116, 117, - 118, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 146, 147, 148, 154, 155, - 163, 164, 167, 171, 172, 173, 174, 177, 144, 160, - 177, 144, 160, 177, 144, 144, 49, 144, 53, 49, - 177, 45, 44, 4, 118, 144, 54, 44, 54, 44, - 115, 44, 44, 44, 44, 85, 180, 184, 53, 54, - 54, 54, 144, 54, 44, 44, 48, 154, 155, 167, - 167, 47, 115, 54, 54, 54, 54, 54, 9, 10, - 12, 13, 56, 57, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 49, 45, 44, 49, 45, - 44, 49, 50, 49, 144, 160, 4, 54, 45, 144, - 19, 144, 119, 146, 147, 148, 167, 177, 144, 53, - 53, 54, 160, 160, 144, 44, 44, 44, 44, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 49, 160, 49, 160, 49, 144, 44, 45, 54, 45, - 44, 45, 54, 22, 50, 45, 45, 45, 144, 144, - 144, 144, 44, 45, 44, 45, 44, 45, 160, 115, - 144, 115, 144, 145, 144, 177, 117, 54, 54, 45, - 45, 50, 45, 50, 45, 50, 160, 160, 160, 45, - 17, 45, 54, 45, 22, 54, 54, 161, 54, 161, - 54, 161, 45, 45, 45, 115, 54, 119, 115, 144, - 45, 45, 45, 45, 45, 54, 54, 54, 115, 115 + 0, 11, 12, 13, 14, 15, 99, 115, 116, 117, + 118, 119, 120, 121, 122, 185, 98, 185, 186, 186, + 52, 0, 117, 118, 119, 52, 78, 62, 62, 100, + 188, 167, 185, 16, 40, 41, 42, 43, 44, 45, + 46, 48, 49, 50, 51, 52, 56, 60, 76, 77, + 93, 96, 101, 102, 103, 104, 152, 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, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 53, 53, 58, 56, 185, 186, 56, 185, + 186, 56, 152, 56, 57, 152, 168, 169, 185, 152, + 152, 103, 104, 99, 62, 63, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 89, 90, 91, 92, + 93, 94, 95, 96, 47, 56, 59, 97, 164, 165, + 185, 186, 52, 60, 62, 54, 125, 185, 56, 52, + 60, 56, 52, 60, 56, 53, 58, 152, 58, 57, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 185, 60, 168, 169, 185, 11, 19, 22, 23, 24, + 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 55, 56, 64, 65, 123, 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, 151, 154, 155, 156, 162, 163, + 171, 172, 175, 179, 180, 181, 182, 185, 152, 168, + 185, 152, 168, 185, 152, 152, 57, 152, 61, 57, + 185, 53, 52, 12, 126, 152, 62, 52, 62, 52, + 123, 52, 52, 52, 52, 93, 188, 192, 61, 62, + 62, 62, 152, 62, 52, 52, 56, 162, 163, 175, + 175, 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, 152, 168, 12, 62, 53, 152, + 27, 152, 127, 154, 155, 156, 175, 185, 152, 61, + 61, 62, 168, 168, 152, 52, 52, 52, 52, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 57, 168, 57, 168, 57, 152, 52, 53, 62, 53, + 52, 53, 62, 30, 58, 53, 53, 53, 152, 152, + 152, 152, 52, 53, 52, 53, 52, 53, 168, 123, + 152, 123, 152, 153, 152, 185, 125, 62, 62, 53, + 53, 58, 53, 58, 53, 58, 168, 168, 168, 53, + 25, 53, 62, 53, 30, 62, 62, 169, 62, 169, + 62, 169, 53, 53, 53, 123, 62, 127, 123, 152, + 53, 53, 53, 53, 53, 62, 62, 62, 123, 123 }; const unsigned char parser::yyr1_[] = { - 0, 106, 107, 107, 108, 108, 108, 108, 108, 108, - 109, 110, 111, 111, 111, 111, 111, 112, 113, 114, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 116, 116, 117, 117, - 118, 118, 119, 119, 119, 119, 120, 120, 121, 121, - 121, 122, 123, 123, 124, 125, 125, 126, 126, 127, - 128, 128, 129, 130, 131, 132, 133, 134, 134, 135, - 136, 136, 137, 138, 139, 140, 140, 141, 142, 143, - 144, 144, 144, 145, 145, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 147, 147, 148, 148, - 149, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 151, 152, 153, 154, - 154, 155, 155, 156, 156, 156, 156, 156, 156, 157, - 157, 157, 157, 158, 159, 159, 159, 160, 160, 161, - 161, 162, 162, 163, 164, 164, 165, 166, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 178, 179, - 180, 181, 182, 183, 183, 184, 184, 185, 186 + 0, 114, 115, 115, 116, 116, 116, 116, 116, 116, + 117, 118, 119, 119, 119, 119, 119, 120, 121, 122, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 124, 124, 125, 125, + 126, 126, 127, 127, 127, 127, 128, 128, 129, 129, + 129, 130, 131, 131, 132, 133, 133, 134, 134, 135, + 136, 136, 137, 138, 139, 140, 141, 142, 142, 143, + 144, 144, 145, 146, 147, 148, 148, 149, 150, 151, + 152, 152, 152, 153, 153, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 155, 155, 156, 156, + 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 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, 174, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 186, 187, + 188, 189, 190, 191, 191, 192, 192, 193, 194 }; const signed char @@ -4476,28 +4477,28 @@ namespace xsk { namespace gsc { namespace s2 { const short parser::yyrline_[] = { - 0, 246, 246, 247, 251, 253, 255, 257, 259, 261, - 266, 270, 275, 276, 277, 278, 279, 283, 288, 293, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 327, 328, 332, 333, - 337, 339, 344, 346, 348, 351, 355, 357, 362, 364, - 366, 371, 376, 378, 383, 388, 390, 395, 397, 402, - 407, 409, 414, 419, 424, 429, 434, 439, 441, 446, - 451, 453, 458, 463, 468, 473, 475, 480, 485, 490, - 495, 496, 497, 501, 502, 506, 508, 510, 512, 514, - 516, 518, 520, 522, 524, 526, 531, 533, 538, 540, - 545, 550, 552, 554, 556, 558, 560, 562, 564, 566, - 568, 570, 572, 574, 576, 578, 580, 582, 584, 589, - 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, - 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, - 610, 611, 612, 613, 614, 615, 616, 620, 625, 630, - 631, 634, 635, 639, 641, 643, 645, 647, 649, 654, - 656, 658, 660, 665, 670, 672, 675, 679, 682, 686, - 688, 693, 695, 700, 705, 707, 712, 717, 722, 723, - 724, 725, 726, 727, 728, 729, 730, 734, 739, 744, - 749, 754, 759, 764, 769, 774, 779, 784, 786, 791, - 796, 801, 806, 811, 813, 818, 820, 825, 830 + 0, 254, 254, 255, 259, 261, 263, 265, 267, 269, + 274, 278, 283, 284, 285, 286, 287, 291, 296, 301, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 335, 336, 340, 341, + 345, 347, 352, 354, 356, 359, 363, 365, 370, 372, + 374, 379, 384, 386, 391, 396, 398, 403, 405, 410, + 415, 417, 422, 427, 432, 437, 442, 447, 449, 454, + 459, 461, 466, 471, 476, 481, 483, 488, 493, 498, + 503, 504, 505, 509, 510, 514, 516, 518, 520, 522, + 524, 526, 528, 530, 532, 534, 539, 541, 546, 548, + 553, 558, 560, 562, 564, 566, 568, 570, 572, 574, + 576, 578, 580, 582, 584, 586, 588, 590, 592, 597, + 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, + 618, 619, 620, 621, 622, 623, 624, 628, 633, 638, + 639, 642, 643, 647, 649, 651, 653, 655, 657, 662, + 664, 666, 668, 673, 678, 680, 683, 687, 690, 694, + 696, 701, 703, 708, 713, 715, 720, 725, 730, 731, + 732, 733, 734, 735, 736, 737, 738, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 792, 794, 799, + 804, 809, 814, 819, 821, 826, 828, 833, 838 }; void @@ -4530,9 +4531,9 @@ namespace xsk { namespace gsc { namespace s2 { #line 13 "parser.ypp" } } } // xsk::gsc::s2 -#line 4534 "parser.cpp" +#line 4535 "parser.cpp" -#line 834 "parser.ypp" +#line 842 "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 f4b654a1..f90f21e4 100644 --- a/src/s2/xsk/parser.hpp +++ b/src/s2/xsk/parser.hpp @@ -677,109 +677,117 @@ namespace xsk { namespace gsc { namespace s2 { S2EOF = 0, // "end of file" S2error = 1, // error S2UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - WAITFRAME = 15, // "waitframe" - IF = 16, // "if" - ELSE = 17, // "else" - DO = 18, // "do" - WHILE = 19, // "while" - FOR = 20, // "for" - FOREACH = 21, // "foreach" - IN = 22, // "in" - SWITCH = 23, // "switch" - CASE = 24, // "case" - DEFAULT = 25, // "default" - BREAK = 26, // "break" - CONTINUE = 27, // "continue" - RETURN = 28, // "return" - BREAKPOINT = 29, // "breakpoint" - PROFBEGIN = 30, // "prof_begin" - PROFEND = 31, // "prof_end" - THREAD = 32, // "thread" - CHILDTHREAD = 33, // "childthread" - THISTHREAD = 34, // "thisthread" - CALL = 35, // "call" - TRUE = 36, // "true" - FALSE = 37, // "false" - UNDEFINED = 38, // "undefined" - SIZE = 39, // ".size" - GAME = 40, // "game" - SELF = 41, // "self" - ANIM = 42, // "anim" - LEVEL = 43, // "level" - LPAREN = 44, // "(" - RPAREN = 45, // ")" - LBRACE = 46, // "{" - RBRACE = 47, // "}" - LBRACKET = 48, // "[" - RBRACKET = 49, // "]" - COMMA = 50, // "," - DOT = 51, // "." - DOUBLECOLON = 52, // "::" - COLON = 53, // ":" - SEMICOLON = 54, // ";" - QMARK = 55, // "?" - INCREMENT = 56, // "++" - DECREMENT = 57, // "--" - LSHIFT = 58, // "<<" - RSHIFT = 59, // ">>" - OR = 60, // "||" - AND = 61, // "&&" - EQUALITY = 62, // "==" - INEQUALITY = 63, // "!=" - LESS_EQUAL = 64, // "<=" - GREATER_EQUAL = 65, // ">=" - LESS = 66, // "<" - GREATER = 67, // ">" - NOT = 68, // "!" - COMPLEMENT = 69, // "~" - ASSIGN = 70, // "=" - ASSIGN_ADD = 71, // "+=" - ASSIGN_SUB = 72, // "-=" - ASSIGN_MUL = 73, // "*=" - ASSIGN_DIV = 74, // "/=" - ASSIGN_MOD = 75, // "%=" - ASSIGN_BW_OR = 76, // "|=" - ASSIGN_BW_AND = 77, // "&=" - ASSIGN_BW_EXOR = 78, // "^=" - ASSIGN_RSHIFT = 79, // ">>=" - ASSIGN_LSHIFT = 80, // "<<=" - BITWISE_OR = 81, // "|" - BITWISE_AND = 82, // "&" - BITWISE_EXOR = 83, // "^" - ADD = 84, // "+" - SUB = 85, // "-" - MUL = 86, // "*" - DIV = 87, // "/" - MOD = 88, // "%" - FIELD = 89, // "field" - PATH = 90, // "path" - IDENTIFIER = 91, // "identifier" - STRING = 92, // "string literal" - ISTRING = 93, // "localized string" - COLOR = 94, // "color" - FLOAT = 95, // "float" - INTEGER = 96, // "integer" - ADD_ARRAY = 97, // ADD_ARRAY - THEN = 98, // THEN - TERN = 99, // TERN - NEG = 100, // NEG - ANIMREF = 101, // ANIMREF - PREINC = 102, // PREINC - PREDEC = 103, // PREDEC - POSTINC = 104, // POSTINC - POSTDEC = 105 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + WAITFRAME = 23, // "waitframe" + IF = 24, // "if" + ELSE = 25, // "else" + DO = 26, // "do" + WHILE = 27, // "while" + FOR = 28, // "for" + FOREACH = 29, // "foreach" + IN = 30, // "in" + SWITCH = 31, // "switch" + CASE = 32, // "case" + DEFAULT = 33, // "default" + BREAK = 34, // "break" + CONTINUE = 35, // "continue" + RETURN = 36, // "return" + BREAKPOINT = 37, // "breakpoint" + PROFBEGIN = 38, // "prof_begin" + PROFEND = 39, // "prof_end" + THREAD = 40, // "thread" + CHILDTHREAD = 41, // "childthread" + THISTHREAD = 42, // "thisthread" + CALL = 43, // "call" + TRUE = 44, // "true" + FALSE = 45, // "false" + UNDEFINED = 46, // "undefined" + SIZE = 47, // ".size" + GAME = 48, // "game" + SELF = 49, // "self" + ANIM = 50, // "anim" + LEVEL = 51, // "level" + LPAREN = 52, // "(" + RPAREN = 53, // ")" + LBRACE = 54, // "{" + RBRACE = 55, // "}" + LBRACKET = 56, // "[" + RBRACKET = 57, // "]" + COMMA = 58, // "," + DOT = 59, // "." + DOUBLECOLON = 60, // "::" + COLON = 61, // ":" + SEMICOLON = 62, // ";" + QMARK = 63, // "?" + INCREMENT = 64, // "++" + DECREMENT = 65, // "--" + LSHIFT = 66, // "<<" + RSHIFT = 67, // ">>" + OR = 68, // "||" + AND = 69, // "&&" + EQUALITY = 70, // "==" + INEQUALITY = 71, // "!=" + LESS_EQUAL = 72, // "<=" + GREATER_EQUAL = 73, // ">=" + LESS = 74, // "<" + GREATER = 75, // ">" + NOT = 76, // "!" + COMPLEMENT = 77, // "~" + ASSIGN = 78, // "=" + ASSIGN_ADD = 79, // "+=" + ASSIGN_SUB = 80, // "-=" + ASSIGN_MUL = 81, // "*=" + ASSIGN_DIV = 82, // "/=" + ASSIGN_MOD = 83, // "%=" + ASSIGN_BW_OR = 84, // "|=" + ASSIGN_BW_AND = 85, // "&=" + ASSIGN_BW_EXOR = 86, // "^=" + ASSIGN_RSHIFT = 87, // ">>=" + ASSIGN_LSHIFT = 88, // "<<=" + BITWISE_OR = 89, // "|" + BITWISE_AND = 90, // "&" + BITWISE_EXOR = 91, // "^" + ADD = 92, // "+" + SUB = 93, // "-" + MUL = 94, // "*" + DIV = 95, // "/" + MOD = 96, // "%" + FIELD = 97, // "field" + PATH = 98, // "path" + IDENTIFIER = 99, // "identifier" + STRING = 100, // "string literal" + ISTRING = 101, // "localized string" + COLOR = 102, // "color" + FLOAT = 103, // "float" + INTEGER = 104, // "integer" + ADD_ARRAY = 105, // ADD_ARRAY + THEN = 106, // THEN + TERN = 107, // TERN + NEG = 108, // NEG + ANIMREF = 109, // ANIMREF + PREINC = 110, // PREINC + PREDEC = 111, // PREDEC + POSTINC = 112, // POSTINC + POSTDEC = 113 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -796,195 +804,203 @@ namespace xsk { namespace gsc { namespace s2 { { enum symbol_kind_type { - YYNTOKENS = 106, ///< Number of tokens. + YYNTOKENS = 114, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_WAITFRAME = 15, // "waitframe" - S_IF = 16, // "if" - S_ELSE = 17, // "else" - S_DO = 18, // "do" - S_WHILE = 19, // "while" - S_FOR = 20, // "for" - S_FOREACH = 21, // "foreach" - S_IN = 22, // "in" - S_SWITCH = 23, // "switch" - S_CASE = 24, // "case" - S_DEFAULT = 25, // "default" - S_BREAK = 26, // "break" - S_CONTINUE = 27, // "continue" - S_RETURN = 28, // "return" - S_BREAKPOINT = 29, // "breakpoint" - S_PROFBEGIN = 30, // "prof_begin" - S_PROFEND = 31, // "prof_end" - S_THREAD = 32, // "thread" - S_CHILDTHREAD = 33, // "childthread" - S_THISTHREAD = 34, // "thisthread" - S_CALL = 35, // "call" - S_TRUE = 36, // "true" - S_FALSE = 37, // "false" - S_UNDEFINED = 38, // "undefined" - S_SIZE = 39, // ".size" - S_GAME = 40, // "game" - S_SELF = 41, // "self" - S_ANIM = 42, // "anim" - S_LEVEL = 43, // "level" - S_LPAREN = 44, // "(" - S_RPAREN = 45, // ")" - S_LBRACE = 46, // "{" - S_RBRACE = 47, // "}" - S_LBRACKET = 48, // "[" - S_RBRACKET = 49, // "]" - S_COMMA = 50, // "," - S_DOT = 51, // "." - S_DOUBLECOLON = 52, // "::" - S_COLON = 53, // ":" - S_SEMICOLON = 54, // ";" - S_QMARK = 55, // "?" - S_INCREMENT = 56, // "++" - S_DECREMENT = 57, // "--" - S_LSHIFT = 58, // "<<" - S_RSHIFT = 59, // ">>" - S_OR = 60, // "||" - S_AND = 61, // "&&" - S_EQUALITY = 62, // "==" - S_INEQUALITY = 63, // "!=" - S_LESS_EQUAL = 64, // "<=" - S_GREATER_EQUAL = 65, // ">=" - S_LESS = 66, // "<" - S_GREATER = 67, // ">" - S_NOT = 68, // "!" - S_COMPLEMENT = 69, // "~" - S_ASSIGN = 70, // "=" - S_ASSIGN_ADD = 71, // "+=" - S_ASSIGN_SUB = 72, // "-=" - S_ASSIGN_MUL = 73, // "*=" - S_ASSIGN_DIV = 74, // "/=" - S_ASSIGN_MOD = 75, // "%=" - S_ASSIGN_BW_OR = 76, // "|=" - S_ASSIGN_BW_AND = 77, // "&=" - S_ASSIGN_BW_EXOR = 78, // "^=" - S_ASSIGN_RSHIFT = 79, // ">>=" - S_ASSIGN_LSHIFT = 80, // "<<=" - S_BITWISE_OR = 81, // "|" - S_BITWISE_AND = 82, // "&" - S_BITWISE_EXOR = 83, // "^" - S_ADD = 84, // "+" - S_SUB = 85, // "-" - S_MUL = 86, // "*" - S_DIV = 87, // "/" - S_MOD = 88, // "%" - S_FIELD = 89, // "field" - S_PATH = 90, // "path" - S_IDENTIFIER = 91, // "identifier" - S_STRING = 92, // "string literal" - S_ISTRING = 93, // "localized string" - S_COLOR = 94, // "color" - S_FLOAT = 95, // "float" - S_INTEGER = 96, // "integer" - S_ADD_ARRAY = 97, // ADD_ARRAY - S_THEN = 98, // THEN - S_TERN = 99, // TERN - S_NEG = 100, // NEG - S_ANIMREF = 101, // ANIMREF - S_PREINC = 102, // PREINC - S_PREDEC = 103, // PREDEC - S_POSTINC = 104, // POSTINC - S_POSTDEC = 105, // POSTDEC - S_YYACCEPT = 106, // $accept - S_root = 107, // root - S_program = 108, // program - S_inline = 109, // inline - S_include = 110, // include - S_declaration = 111, // declaration - S_decl_usingtree = 112, // decl_usingtree - S_decl_constant = 113, // decl_constant - S_decl_thread = 114, // decl_thread - S_stmt = 115, // stmt - S_stmt_dev = 116, // stmt_dev - S_stmt_block = 117, // stmt_block - S_stmt_list = 118, // stmt_list - S_stmt_expr = 119, // stmt_expr - S_stmt_call = 120, // stmt_call - S_stmt_assign = 121, // stmt_assign - S_stmt_endon = 122, // stmt_endon - S_stmt_notify = 123, // stmt_notify - S_stmt_wait = 124, // stmt_wait - S_stmt_waittill = 125, // stmt_waittill - S_stmt_waittillmatch = 126, // stmt_waittillmatch - S_stmt_waittillframeend = 127, // stmt_waittillframeend - S_stmt_waitframe = 128, // stmt_waitframe - S_stmt_if = 129, // stmt_if - S_stmt_ifelse = 130, // stmt_ifelse - S_stmt_while = 131, // stmt_while - S_stmt_dowhile = 132, // stmt_dowhile - S_stmt_for = 133, // stmt_for - S_stmt_foreach = 134, // stmt_foreach - S_stmt_switch = 135, // stmt_switch - S_stmt_case = 136, // stmt_case - S_stmt_default = 137, // stmt_default - S_stmt_break = 138, // stmt_break - S_stmt_continue = 139, // stmt_continue - S_stmt_return = 140, // stmt_return - S_stmt_breakpoint = 141, // stmt_breakpoint - S_stmt_prof_begin = 142, // stmt_prof_begin - S_stmt_prof_end = 143, // stmt_prof_end - S_expr = 144, // expr - S_expr_or_empty = 145, // expr_or_empty - S_expr_assign = 146, // expr_assign - S_expr_increment = 147, // expr_increment - S_expr_decrement = 148, // expr_decrement - S_expr_ternary = 149, // expr_ternary - S_expr_binary = 150, // expr_binary - S_expr_primitive = 151, // expr_primitive - S_expr_complement = 152, // expr_complement - S_expr_not = 153, // expr_not - S_expr_call = 154, // expr_call - S_expr_method = 155, // expr_method - S_expr_function = 156, // expr_function - S_expr_pointer = 157, // expr_pointer - S_expr_add_array = 158, // expr_add_array - S_expr_parameters = 159, // expr_parameters - S_expr_arguments = 160, // expr_arguments - S_expr_arguments_no_empty = 161, // expr_arguments_no_empty - S_expr_reference = 162, // expr_reference - S_expr_array = 163, // expr_array - S_expr_field = 164, // expr_field - S_expr_size = 165, // expr_size - S_expr_paren = 166, // expr_paren - S_expr_object = 167, // expr_object - S_expr_thisthread = 168, // expr_thisthread - S_expr_empty_array = 169, // expr_empty_array - S_expr_undefined = 170, // expr_undefined - S_expr_game = 171, // expr_game - S_expr_self = 172, // expr_self - S_expr_anim = 173, // expr_anim - S_expr_level = 174, // expr_level - S_expr_animation = 175, // expr_animation - S_expr_animtree = 176, // expr_animtree - S_expr_identifier = 177, // expr_identifier - S_expr_path = 178, // expr_path - S_expr_istring = 179, // expr_istring - S_expr_string = 180, // expr_string - S_expr_color = 181, // expr_color - S_expr_vector = 182, // expr_vector - S_expr_float = 183, // expr_float - S_expr_integer = 184, // expr_integer - S_expr_false = 185, // expr_false - S_expr_true = 186 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_WAITFRAME = 23, // "waitframe" + S_IF = 24, // "if" + S_ELSE = 25, // "else" + S_DO = 26, // "do" + S_WHILE = 27, // "while" + S_FOR = 28, // "for" + S_FOREACH = 29, // "foreach" + S_IN = 30, // "in" + S_SWITCH = 31, // "switch" + S_CASE = 32, // "case" + S_DEFAULT = 33, // "default" + S_BREAK = 34, // "break" + S_CONTINUE = 35, // "continue" + S_RETURN = 36, // "return" + S_BREAKPOINT = 37, // "breakpoint" + S_PROFBEGIN = 38, // "prof_begin" + S_PROFEND = 39, // "prof_end" + S_THREAD = 40, // "thread" + S_CHILDTHREAD = 41, // "childthread" + S_THISTHREAD = 42, // "thisthread" + S_CALL = 43, // "call" + S_TRUE = 44, // "true" + S_FALSE = 45, // "false" + S_UNDEFINED = 46, // "undefined" + S_SIZE = 47, // ".size" + S_GAME = 48, // "game" + S_SELF = 49, // "self" + S_ANIM = 50, // "anim" + S_LEVEL = 51, // "level" + S_LPAREN = 52, // "(" + S_RPAREN = 53, // ")" + S_LBRACE = 54, // "{" + S_RBRACE = 55, // "}" + S_LBRACKET = 56, // "[" + S_RBRACKET = 57, // "]" + S_COMMA = 58, // "," + S_DOT = 59, // "." + S_DOUBLECOLON = 60, // "::" + S_COLON = 61, // ":" + S_SEMICOLON = 62, // ";" + S_QMARK = 63, // "?" + S_INCREMENT = 64, // "++" + S_DECREMENT = 65, // "--" + S_LSHIFT = 66, // "<<" + S_RSHIFT = 67, // ">>" + S_OR = 68, // "||" + S_AND = 69, // "&&" + S_EQUALITY = 70, // "==" + S_INEQUALITY = 71, // "!=" + S_LESS_EQUAL = 72, // "<=" + S_GREATER_EQUAL = 73, // ">=" + S_LESS = 74, // "<" + S_GREATER = 75, // ">" + S_NOT = 76, // "!" + S_COMPLEMENT = 77, // "~" + S_ASSIGN = 78, // "=" + S_ASSIGN_ADD = 79, // "+=" + S_ASSIGN_SUB = 80, // "-=" + S_ASSIGN_MUL = 81, // "*=" + S_ASSIGN_DIV = 82, // "/=" + S_ASSIGN_MOD = 83, // "%=" + S_ASSIGN_BW_OR = 84, // "|=" + S_ASSIGN_BW_AND = 85, // "&=" + S_ASSIGN_BW_EXOR = 86, // "^=" + S_ASSIGN_RSHIFT = 87, // ">>=" + S_ASSIGN_LSHIFT = 88, // "<<=" + S_BITWISE_OR = 89, // "|" + S_BITWISE_AND = 90, // "&" + S_BITWISE_EXOR = 91, // "^" + S_ADD = 92, // "+" + S_SUB = 93, // "-" + S_MUL = 94, // "*" + S_DIV = 95, // "/" + S_MOD = 96, // "%" + S_FIELD = 97, // "field" + S_PATH = 98, // "path" + S_IDENTIFIER = 99, // "identifier" + S_STRING = 100, // "string literal" + S_ISTRING = 101, // "localized string" + S_COLOR = 102, // "color" + S_FLOAT = 103, // "float" + S_INTEGER = 104, // "integer" + S_ADD_ARRAY = 105, // ADD_ARRAY + S_THEN = 106, // THEN + S_TERN = 107, // TERN + S_NEG = 108, // NEG + S_ANIMREF = 109, // ANIMREF + S_PREINC = 110, // PREINC + S_PREDEC = 111, // PREDEC + S_POSTINC = 112, // POSTINC + S_POSTDEC = 113, // POSTDEC + S_YYACCEPT = 114, // $accept + S_root = 115, // root + S_program = 116, // program + S_inline = 117, // inline + S_include = 118, // include + S_declaration = 119, // declaration + S_decl_usingtree = 120, // decl_usingtree + S_decl_constant = 121, // decl_constant + S_decl_thread = 122, // decl_thread + S_stmt = 123, // stmt + S_stmt_dev = 124, // stmt_dev + S_stmt_block = 125, // stmt_block + S_stmt_list = 126, // stmt_list + S_stmt_expr = 127, // stmt_expr + S_stmt_call = 128, // stmt_call + S_stmt_assign = 129, // stmt_assign + S_stmt_endon = 130, // stmt_endon + S_stmt_notify = 131, // stmt_notify + S_stmt_wait = 132, // stmt_wait + S_stmt_waittill = 133, // stmt_waittill + S_stmt_waittillmatch = 134, // stmt_waittillmatch + S_stmt_waittillframeend = 135, // stmt_waittillframeend + S_stmt_waitframe = 136, // stmt_waitframe + S_stmt_if = 137, // stmt_if + S_stmt_ifelse = 138, // stmt_ifelse + S_stmt_while = 139, // stmt_while + S_stmt_dowhile = 140, // stmt_dowhile + S_stmt_for = 141, // stmt_for + S_stmt_foreach = 142, // stmt_foreach + S_stmt_switch = 143, // stmt_switch + S_stmt_case = 144, // stmt_case + S_stmt_default = 145, // stmt_default + S_stmt_break = 146, // stmt_break + S_stmt_continue = 147, // stmt_continue + S_stmt_return = 148, // stmt_return + S_stmt_breakpoint = 149, // stmt_breakpoint + S_stmt_prof_begin = 150, // stmt_prof_begin + S_stmt_prof_end = 151, // stmt_prof_end + S_expr = 152, // expr + S_expr_or_empty = 153, // expr_or_empty + S_expr_assign = 154, // expr_assign + S_expr_increment = 155, // expr_increment + S_expr_decrement = 156, // expr_decrement + S_expr_ternary = 157, // expr_ternary + S_expr_binary = 158, // expr_binary + S_expr_primitive = 159, // expr_primitive + S_expr_complement = 160, // expr_complement + S_expr_not = 161, // expr_not + S_expr_call = 162, // expr_call + S_expr_method = 163, // expr_method + S_expr_function = 164, // expr_function + S_expr_pointer = 165, // expr_pointer + S_expr_add_array = 166, // expr_add_array + S_expr_parameters = 167, // expr_parameters + 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 = 185, // expr_identifier + S_expr_path = 186, // expr_path + S_expr_istring = 187, // expr_istring + S_expr_string = 188, // expr_string + S_expr_color = 189, // expr_color + 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 }; }; @@ -2779,6 +2795,126 @@ switch (yykind) return symbol_type (token::S2UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5362,7 +5498,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s2 -#line 5366 "parser.hpp" +#line 5502 "parser.hpp" diff --git a/src/s4/xsk/lexer.cpp b/src/s4/xsk/lexer.cpp index a22f2e71..1db763b4 100644 --- a/src/s4/xsk/lexer.cpp +++ b/src/s4/xsk/lexer.cpp @@ -16,60 +16,6 @@ xsk::gsc::s4::parser::symbol_type S4lex(xsk::gsc::s4::lexer& lexer) namespace xsk::gsc::s4 { -enum class keyword -{ -/* KW_pre_define, - KW_pre_undef, - KW_pre_ifdef, - KW_pre_ifndef, - KW_pre_if, - KW_pre_elif, - KW_pre_else, - KW_pre_endif,*/ - KW_pre_inline, - KW_pre_include, - KW_pre_using_animtree, - KW_pre_animtree, - KW_endon, - KW_notify, - KW_wait, - KW_waittill, - KW_waittillmatch, - KW_waittillframeend, - KW_waitframe, - KW_if, - KW_else, - KW_do, - KW_while, - KW_for, - KW_foreach, - KW_in, - KW_switch, - KW_case, - KW_default, - KW_break, - KW_continue, - KW_return, - KW_breakpoint, - KW_prof_begin, - KW_prof_end, - KW_thread, - KW_childthread, - KW_thisthread, - KW_call, - KW_true, - KW_false, - KW_undefined, - KW_dotsize, - KW_game, - KW_self, - KW_anim, - KW_level, - KW_isdefined, - KW_istrue, - KW_INVALID, -}; - buffer::buffer() : length(0) { data = static_cast(std::malloc(max_buf_size)); @@ -132,7 +78,7 @@ void reader::advance() } } -lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(xsk::gsc::location(&name)), +lexer::lexer(const std::string& name, const char* data, size_t size) : indev_(false), loc_(location(&name)), mode_(build::dev), header_top_(0), locs_(std::stack()), readers_(std::stack()) { reader_.init(data, size); @@ -143,7 +89,7 @@ void lexer::push_header(const std::string& file) try { if (header_top_++ >= 10) - throw xsk::gsc::error("maximum gsh depth exceeded '10'"); + throw comp_error(loc_, "maximum gsh depth exceeded '10'"); auto data = resolver::file_data(file + ".gsh"); @@ -154,7 +100,7 @@ void lexer::push_header(const std::string& file) } catch (const std::exception& e) { - throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); + throw error("parsing header file '" + file + "': " + e.what()); } } @@ -167,7 +113,7 @@ void lexer::pop_header() readers_.pop(); } -void lexer::restrict_header(const xsk::gsc::location& loc) +void lexer::ban_header(const location& loc) { if (header_top_ > 0) { @@ -175,7 +121,7 @@ void lexer::restrict_header(const xsk::gsc::location& loc) } } -auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type +auto lexer::lex() -> parser::symbol_type { buffer_.length = 0; state_ = state::start; @@ -196,7 +142,7 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type if (header_top_ > 0) pop_header(); else - return s4::parser::make_S4EOF(loc_); + return parser::make_S4EOF(loc_); } reader_.advance(); @@ -214,22 +160,22 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type continue; case '/': if (curr != '/' && curr != '*' && curr != '#' && curr != '=') - return s4::parser::make_DIV(loc_); + return parser::make_DIV(loc_); reader_.advance(); if (last == '=') - return s4::parser::make_ASSIGN_DIV(loc_); + return parser::make_ASSIGN_DIV(loc_); if (last == '#') { if (indev_) throw comp_error(loc_, "cannot recurse devblock ('/#')"); - if (mode_ == xsk::gsc::build::dev) + if (mode_ == build::dev) { indev_ = true; - return s4::parser::make_DEVBEGIN(loc_); + return parser::make_DEVBEGIN(loc_); } else { @@ -293,7 +239,7 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type indev_ = false; reader_.advance(); - return s4::parser::make_DEVEND(loc_); + return parser::make_DEVEND(loc_); } buffer_.push(last); @@ -306,12 +252,12 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type goto lex_name; case '*': if (curr != '/' && curr != '=') - return s4::parser::make_MUL(loc_); + return parser::make_MUL(loc_); reader_.advance(); if (last == '=') - return s4::parser::make_ASSIGN_MUL(loc_); + return parser::make_ASSIGN_MUL(loc_); throw comp_error(loc_, "unmatched multiline comment end ('*/')"); case '"': @@ -326,127 +272,127 @@ auto lexer::lex() -> xsk::gsc::s4::parser::symbol_type state_ = state::field; goto lex_name_or_number; case '(': - return s4::parser::make_LPAREN(loc_); + return parser::make_LPAREN(loc_); case ')': - return s4::parser::make_RPAREN(loc_); + return parser::make_RPAREN(loc_); case '{': - return s4::parser::make_LBRACE(loc_); + return parser::make_LBRACE(loc_); case '}': - return s4::parser::make_RBRACE(loc_); + return parser::make_RBRACE(loc_); case '[': - return s4::parser::make_LBRACKET(loc_); + return parser::make_LBRACKET(loc_); case ']': - return s4::parser::make_RBRACKET(loc_); + return parser::make_RBRACKET(loc_); case ',': - return s4::parser::make_COMMA(loc_); + return parser::make_COMMA(loc_); case ';': - return s4::parser::make_SEMICOLON(loc_); + return parser::make_SEMICOLON(loc_); case ':': if (curr != ':') - return s4::parser::make_COLON(loc_); + return parser::make_COLON(loc_); reader_.advance(); - return s4::parser::make_DOUBLECOLON(loc_); + return parser::make_DOUBLECOLON(loc_); case '?': - return s4::parser::make_QMARK(loc_); + return parser::make_QMARK(loc_); case '=': if (curr != '=') - return s4::parser::make_ASSIGN(loc_); + return parser::make_ASSIGN(loc_); reader_.advance(); - return s4::parser::make_EQUALITY(loc_); + return parser::make_EQUALITY(loc_); case '+': if (curr != '+' && curr != '=') - return s4::parser::make_ADD(loc_); + return parser::make_ADD(loc_); reader_.advance(); if (last == '+') - return s4::parser::make_INCREMENT(loc_); + return parser::make_INCREMENT(loc_); - return s4::parser::make_ASSIGN_ADD(loc_); + return parser::make_ASSIGN_ADD(loc_); case '-': if (curr != '-' && curr != '=') - return s4::parser::make_SUB(loc_); + return parser::make_SUB(loc_); reader_.advance(); if (last == '-') - return s4::parser::make_DECREMENT(loc_); + return parser::make_DECREMENT(loc_); - return s4::parser::make_ASSIGN_SUB(loc_); + return parser::make_ASSIGN_SUB(loc_); case '%': if (curr != '=') - return s4::parser::make_MOD(loc_); + return parser::make_MOD(loc_); reader_.advance(); - return s4::parser::make_ASSIGN_MOD(loc_); + return parser::make_ASSIGN_MOD(loc_); case '|': if (curr != '|' && curr != '=') - return s4::parser::make_BITWISE_OR(loc_); + return parser::make_BITWISE_OR(loc_); reader_.advance(); if (last == '|') - return s4::parser::make_OR(loc_); + return parser::make_OR(loc_); - return s4::parser::make_ASSIGN_BW_OR(loc_); + return parser::make_ASSIGN_BW_OR(loc_); case '&': if (curr != '&' && curr != '=' && curr != '"' && curr != '\'') - return s4::parser::make_BITWISE_AND(loc_); + return parser::make_BITWISE_AND(loc_); reader_.advance(); if (last == '&') - return s4::parser::make_AND(loc_); + return parser::make_AND(loc_); if (last == '=') - return s4::parser::make_ASSIGN_BW_AND(loc_); + return parser::make_ASSIGN_BW_AND(loc_); state_ = state::localize; goto lex_string; case '^': if (curr != '=') - return s4::parser::make_BITWISE_EXOR(loc_); + return parser::make_BITWISE_EXOR(loc_); reader_.advance(); - return s4::parser::make_ASSIGN_BW_EXOR(loc_); + return parser::make_ASSIGN_BW_EXOR(loc_); case '!': if (curr != '=') - return s4::parser::make_NOT(loc_); + return parser::make_NOT(loc_); reader_.advance(); - return s4::parser::make_INEQUALITY(loc_); + return parser::make_INEQUALITY(loc_); case '~': - return s4::parser::make_COMPLEMENT(loc_); + return parser::make_COMPLEMENT(loc_); case '<': if (curr != '<' && curr != '=') - return s4::parser::make_LESS(loc_); + return parser::make_LESS(loc_); reader_.advance(); if (last == '=') - return s4::parser::make_LESS_EQUAL(loc_); + return parser::make_LESS_EQUAL(loc_); if (curr != '=') - return s4::parser::make_LSHIFT(loc_); + return parser::make_LSHIFT(loc_); reader_.advance(); - return s4::parser::make_ASSIGN_LSHIFT(loc_); + return parser::make_ASSIGN_LSHIFT(loc_); case '>': if (curr != '>' && curr != '=') - return s4::parser::make_GREATER(loc_); + return parser::make_GREATER(loc_); reader_.advance(); if (last == '=') - return s4::parser::make_GREATER_EQUAL(loc_); + return parser::make_GREATER_EQUAL(loc_); if (curr != '=') - return s4::parser::make_RSHIFT(loc_); + return parser::make_RSHIFT(loc_); reader_.advance(); - return s4::parser::make_ASSIGN_RSHIFT(loc_); + return parser::make_ASSIGN_RSHIFT(loc_); default: lex_name_or_number: if (last >= '0' && last <= '9') @@ -499,9 +445,9 @@ lex_string: } if (state_ == state::localize) - return s4::parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_ISTRING(std::string(buffer_.data, buffer_.length), loc_); - return s4::parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_STRING(std::string(buffer_.data, buffer_.length), loc_); lex_name: buffer_.push(last); @@ -536,22 +482,32 @@ lex_name: if (std::string_view(buffer_.data, buffer_.length) == "size") { - return s4::parser::make_SIZE(loc_); + return parser::make_SIZE(loc_); } - return s4::parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FIELD(std::string(buffer_.data, buffer_.length), loc_); } else if (state_ == state::preprocessor) { if (path) throw comp_error(loc_, "invalid preprocessor directive"); + + auto token = parser::token::S4UNDEF; - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 16) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + { + if (itr->second > parser::token::HSENDIF) + return parser::symbol_type(itr->second, loc_); + + token = itr->second; + } + } - // TODO: call preprocessor(key); + // TODO: call preprocessor(token); throw comp_error(loc_, "unknown preprocessor directive"); state_ = state::start; continue; @@ -569,22 +525,23 @@ lex_name: } } - auto key = get_keyword(std::string_view(buffer_.data, buffer_.length)); + if (buffer_.length < 17) + { + const auto& itr = keyword_map.find(std::string_view(buffer_.data, buffer_.length)); - if (key != keyword::KW_INVALID) - return keyword_token(key); + if(itr != keyword_map.end()) + return parser::symbol_type(itr->second, loc_); + } if (path) { if (buffer_.data[buffer_.length - 1] == '/') throw comp_error(loc_, "invalid path end '\\'"); - //return s4::parser::make_PATH(xsk::gsc::s4::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return s4::parser::make_PATH(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_PATH(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } - //return s4::parser::make_IDENTIFIER(xsk::gsc::s4::resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); - return s4::parser::make_IDENTIFIER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_IDENTIFIER(resolver::make_token(std::string_view(buffer_.data, buffer_.length)), loc_); } lex_number: @@ -635,9 +592,9 @@ lex_number: throw comp_error(loc_, "invalid number literal"); if (state_ == state::field || dot || flt) - return s4::parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_FLOAT(std::string(buffer_.data, buffer_.length), loc_); - return s4::parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); + return parser::make_INTEGER(std::string(buffer_.data, buffer_.length), loc_); } else if (curr == 'o') { @@ -669,7 +626,7 @@ lex_number: if (last == '\'' || buffer_.length <= 0) throw comp_error(loc_, "invalid octal literal"); - return s4::parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::oct_to_dec(buffer_.data), loc_); } else if (curr == 'b') { @@ -703,7 +660,7 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid binary literal"); - return s4::parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::bin_to_dec(buffer_.data), loc_); } else if (curr == 'x') { @@ -737,185 +694,62 @@ lex_number: if (last == '\'' || buffer_.length < 3) throw comp_error(loc_, "invalid hexadecimal literal"); - return s4::parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); + return parser::make_INTEGER(xsk::utils::string::hex_to_dec(buffer_.data), loc_); } // cant get here! } } -auto lexer::keyword_token(keyword k) -> xsk::gsc::s4::parser::symbol_type -{ - switch (k) - { - case keyword::KW_pre_inline: - return s4::parser::make_INLINE(loc_); - case keyword::KW_pre_include: - return s4::parser::make_INCLUDE(loc_); - case keyword::KW_pre_using_animtree: - return s4::parser::make_USINGTREE(loc_); - case keyword::KW_pre_animtree: - return s4::parser::make_ANIMTREE(loc_); - case keyword::KW_endon: - return s4::parser::make_ENDON(loc_); - case keyword::KW_notify: - return s4::parser::make_NOTIFY(loc_); - case keyword::KW_wait: - return s4::parser::make_WAIT(loc_); - case keyword::KW_waittill: - return s4::parser::make_WAITTILL(loc_); - case keyword::KW_waittillmatch: - return s4::parser::make_WAITTILLMATCH(loc_); - case keyword::KW_waittillframeend: - return s4::parser::make_WAITTILLFRAMEEND(loc_); - case keyword::KW_waitframe: - return s4::parser::make_WAITFRAME(loc_); - case keyword::KW_if: - return s4::parser::make_IF(loc_); - case keyword::KW_else: - return s4::parser::make_ELSE(loc_); - case keyword::KW_do: - return s4::parser::make_DO(loc_); - case keyword::KW_while: - return s4::parser::make_WHILE(loc_); - case keyword::KW_for: - return s4::parser::make_FOR(loc_); - case keyword::KW_foreach: - return s4::parser::make_FOREACH(loc_); - case keyword::KW_in: - return s4::parser::make_IN(loc_); - case keyword::KW_switch: - return s4::parser::make_SWITCH(loc_); - case keyword::KW_case: - return s4::parser::make_CASE(loc_); - case keyword::KW_default: - return s4::parser::make_DEFAULT(loc_); - case keyword::KW_break: - return s4::parser::make_BREAK(loc_); - case keyword::KW_continue: - return s4::parser::make_CONTINUE(loc_); - case keyword::KW_return: - return s4::parser::make_RETURN(loc_); - case keyword::KW_breakpoint: - return s4::parser::make_BREAKPOINT(loc_); - case keyword::KW_prof_begin: - return s4::parser::make_PROFBEGIN(loc_); - case keyword::KW_prof_end: - return s4::parser::make_PROFEND(loc_); - case keyword::KW_thread: - return s4::parser::make_THREAD(loc_); - case keyword::KW_childthread: - return s4::parser::make_CHILDTHREAD(loc_); - case keyword::KW_thisthread: - return s4::parser::make_THISTHREAD(loc_); - case keyword::KW_call: - return s4::parser::make_CALL(loc_); - case keyword::KW_true: - return s4::parser::make_TRUE(loc_); - case keyword::KW_false: - return s4::parser::make_FALSE(loc_); - case keyword::KW_undefined: - return s4::parser::make_UNDEFINED(loc_); - case keyword::KW_dotsize: - return s4::parser::make_SIZE(loc_); - case keyword::KW_game: - return s4::parser::make_GAME(loc_); - case keyword::KW_self: - return s4::parser::make_SELF(loc_); - case keyword::KW_anim: - return s4::parser::make_ANIM(loc_); - case keyword::KW_level: - return s4::parser::make_LEVEL(loc_); - case keyword::KW_isdefined: - return s4::parser::make_ISDEFINED(loc_); - case keyword::KW_istrue: - return s4::parser::make_ISTRUE(loc_); - default: - throw error("gsc lexer: INVALID KEYWORD TOKEN!"); - } -} - -auto lexer::keyword_is_token(keyword k) -> bool -{ - switch (k) - { -/* case keyword::KW_pre_define: - case keyword::KW_pre_undef: - case keyword::KW_pre_ifdef: - case keyword::KW_pre_ifndef: - case keyword::KW_pre_if: - case keyword::KW_pre_elif: - case keyword::KW_pre_else: - case keyword::KW_pre_endif:*/ - case keyword::KW_INVALID: - return false; - default: - return true; - } -} - -auto lexer::get_keyword(std::string_view str) -> keyword -{ - auto itr = keywords.find(str); - - if(itr != keywords.end()) - { - return itr->second; - } - - return keyword::KW_INVALID; -} - -std::unordered_map lexer::keywords +const std::unordered_map lexer::keyword_map {{ -/* { "#define", keyword::KW_pre_define }, - { "#undef", keyword::KW_pre_undef }, - { "#ifdef", keyword::KW_pre_ifdef }, - { "#ifndef", keyword::KW_pre_ifndef }, - { "#if", keyword::KW_pre_if }, - { "#elif", keyword::KW_pre_elif }, - { "#else", keyword::KW_pre_else }, - { "#endif", keyword::KW_pre_endif },*/ - { "#inline", keyword::KW_pre_inline }, - { "#include", keyword::KW_pre_include }, - { "#using_animtree", keyword::KW_pre_using_animtree }, - { "#animtree", keyword::KW_pre_animtree }, - { "endon", keyword::KW_endon }, - { "notify", keyword::KW_notify }, - { "wait", keyword::KW_wait }, - { "waittill", keyword::KW_waittill }, - { "waittillmatch", keyword::KW_waittillmatch }, - { "waittillframeend", keyword::KW_waittillframeend }, - { "waitframe", keyword::KW_waitframe }, - { "if", keyword::KW_if }, - { "else", keyword::KW_else }, - { "do", keyword::KW_do }, - { "while", keyword::KW_while }, - { "for", keyword::KW_for }, - { "foreach", keyword::KW_foreach }, - { "in", keyword::KW_in }, - { "switch", keyword::KW_switch }, - { "case", keyword::KW_case }, - { "default", keyword::KW_default }, - { "break", keyword::KW_break }, - { "continue", keyword::KW_continue }, - { "return", keyword::KW_return }, - { "breakpoint", keyword::KW_breakpoint }, - { "prof_begin", keyword::KW_prof_begin }, - { "prof_end", keyword::KW_prof_end }, - { "thread", keyword::KW_thread }, - { "childthread", keyword::KW_childthread }, - { "thisthread", keyword::KW_thisthread }, - { "call", keyword::KW_call }, - { "true", keyword::KW_true }, - { "false", keyword::KW_false }, - { "undefined", keyword::KW_undefined }, - { ".size", keyword::KW_dotsize }, - { "game", keyword::KW_game }, - { "self", keyword::KW_self }, - { "anim", keyword::KW_anim }, - { "level", keyword::KW_level }, - { "isdefined", keyword::KW_isdefined }, - { "istrue", keyword::KW_istrue }, + { "#define", parser::token::HSDEFINE }, + { "#undef", parser::token::HSUNDEF }, + { "#ifdef", parser::token::HSIFDEF }, + { "#ifndef", parser::token::HSIFNDEF }, + { "#if", parser::token::HSIF }, + { "#elif", parser::token::HSELIF }, + { "#else", parser::token::HSELSE }, + { "#endif", parser::token::HSENDIF }, + { "#inline", parser::token::INLINE }, + { "#include", parser::token::INCLUDE }, + { "#using_animtree", parser::token::USINGTREE }, + { "#animtree", parser::token::ANIMTREE }, + { "endon", parser::token::ENDON }, + { "notify", parser::token::NOTIFY }, + { "wait", parser::token::WAIT }, + { "waittill", parser::token::WAITTILL }, + { "waittillmatch", parser::token::WAITTILLMATCH }, + { "waittillframeend", parser::token::WAITTILLFRAMEEND }, + { "waitframe", parser::token::WAITFRAME }, + { "if", parser::token::IF }, + { "else", parser::token::ELSE }, + { "do", parser::token::DO }, + { "while", parser::token::WHILE }, + { "for", parser::token::FOR }, + { "foreach", parser::token::FOREACH }, + { "in", parser::token::IN }, + { "switch", parser::token::SWITCH }, + { "case", parser::token::CASE }, + { "default", parser::token::DEFAULT }, + { "break", parser::token::BREAK }, + { "continue", parser::token::CONTINUE }, + { "return", parser::token::RETURN }, + { "breakpoint", parser::token::BREAKPOINT }, + { "prof_begin", parser::token::PROFBEGIN }, + { "prof_end", parser::token::PROFEND }, + { "thread", parser::token::THREAD }, + { "childthread", parser::token::CHILDTHREAD }, + { "thisthread", parser::token::THISTHREAD }, + { "call", parser::token::CALL }, + { "true", parser::token::TRUE }, + { "false", parser::token::FALSE }, + { "undefined", parser::token::UNDEFINED }, + { "game", parser::token::GAME }, + { "self", parser::token::SELF }, + { "anim", parser::token::ANIM }, + { "level", parser::token::LEVEL }, + { "isdefined", parser::token::ISDEFINED }, + { "istrue", parser::token::ISTRUE }, }}; } // namespace xsk::gsc::s4 diff --git a/src/s4/xsk/lexer.hpp b/src/s4/xsk/lexer.hpp index 469490b2..7e129269 100644 --- a/src/s4/xsk/lexer.hpp +++ b/src/s4/xsk/lexer.hpp @@ -10,8 +10,6 @@ namespace xsk::gsc::s4 { -enum class keyword; - constexpr size_t max_buf_size = 0x2000; struct buffer @@ -53,26 +51,22 @@ class lexer reader reader_; buffer buffer_; location loc_; - build mode_; std::stack locs_; std::stack readers_; std::uint32_t header_top_; state state_; + build mode_; bool indev_; public: lexer(const std::string& name, const char* data, size_t size); - auto lex() -> xsk::gsc::s4::parser::symbol_type; + auto lex() -> parser::symbol_type; void push_header(const std::string& file); void pop_header(); - void restrict_header(const xsk::gsc::location& loc); + void ban_header(const location& loc); private: - auto keyword_token(keyword k) -> xsk::gsc::s4::parser::symbol_type; - static auto keyword_is_token(keyword k) -> bool; - static auto get_keyword(std::string_view str) -> keyword; - - static std::unordered_map keywords; + static const std::unordered_map keyword_map; }; } // namespace xsk::gsc::s4 diff --git a/src/s4/xsk/parser.cpp b/src/s4/xsk/parser.cpp index 0c6d35e3..1308fef5 100644 --- a/src/s4/xsk/parser.cpp +++ b/src/s4/xsk/parser.cpp @@ -2024,1327 +2024,1327 @@ namespace xsk { namespace gsc { namespace s4 { switch (yyn) { case 2: // root: program -#line 250 "parser.ypp" +#line 258 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } #line 2030 "parser.cpp" break; case 3: // root: %empty -#line 251 "parser.ypp" +#line 259 "parser.ypp" { ast = std::make_unique(yylhs.location); } #line 2036 "parser.cpp" break; case 4: // program: program inline -#line 256 "parser.ypp" +#line 264 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } #line 2042 "parser.cpp" break; case 5: // program: program include -#line 258 "parser.ypp" +#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 2048 "parser.cpp" break; case 6: // program: program declaration -#line 260 "parser.ypp" +#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 2054 "parser.cpp" break; case 7: // program: inline -#line 262 "parser.ypp" +#line 270 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } #line 2060 "parser.cpp" break; case 8: // program: include -#line 264 "parser.ypp" +#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 > ())); } #line 2066 "parser.cpp" break; case 9: // program: declaration -#line 266 "parser.ypp" +#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 > ())); } #line 2072 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 270 "parser.ypp" +#line 278 "parser.ypp" { lexer.push_header(yystack_[1].value.as < ast::expr_path::ptr > ()->value); } #line 2078 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 275 "parser.ypp" +#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 > ())); } #line 2084 "parser.cpp" break; case 12: // declaration: "/#" -#line 279 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } #line 2090 "parser.cpp" break; case 13: // declaration: "#/" -#line 280 "parser.ypp" +#line 288 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } #line 2096 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 281 "parser.ypp" +#line 289 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } #line 2102 "parser.cpp" break; case 15: // declaration: decl_constant -#line 282 "parser.ypp" +#line 290 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } #line 2108 "parser.cpp" break; case 16: // declaration: decl_thread -#line 283 "parser.ypp" +#line 291 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } #line 2114 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 288 "parser.ypp" - { lexer.restrict_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 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 > ())); } #line 2120 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 293 "parser.ypp" +#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 > ())); } #line 2126 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 298 "parser.ypp" - { lexer.restrict_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 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 > ())); } #line 2132 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 302 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2138 "parser.cpp" break; case 21: // stmt: stmt_block -#line 303 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } #line 2144 "parser.cpp" break; case 22: // stmt: stmt_call -#line 304 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } #line 2150 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 305 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } #line 2156 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 306 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } #line 2162 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 307 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } #line 2168 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 308 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } #line 2174 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 309 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } #line 2180 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 310 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } #line 2186 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 311 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } #line 2192 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 312 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } #line 2198 "parser.cpp" break; case 31: // stmt: stmt_if -#line 313 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } #line 2204 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 314 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } #line 2210 "parser.cpp" break; case 33: // stmt: stmt_while -#line 315 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } #line 2216 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 316 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } #line 2222 "parser.cpp" break; case 35: // stmt: stmt_for -#line 317 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } #line 2228 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 318 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } #line 2234 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 319 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } #line 2240 "parser.cpp" break; case 38: // stmt: stmt_case -#line 320 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } #line 2246 "parser.cpp" break; case 39: // stmt: stmt_default -#line 321 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } #line 2252 "parser.cpp" break; case 40: // stmt: stmt_break -#line 322 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } #line 2258 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 323 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } #line 2264 "parser.cpp" break; case 42: // stmt: stmt_return -#line 324 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } #line 2270 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 325 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } #line 2276 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 326 "parser.ypp" +#line 334 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } #line 2282 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 327 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } #line 2288 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 331 "parser.ypp" +#line 339 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2294 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 332 "parser.ypp" +#line 340 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2300 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 336 "parser.ypp" +#line 344 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } #line 2306 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 337 "parser.ypp" +#line 345 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } #line 2312 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 342 "parser.ypp" +#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 > ())); } #line 2318 "parser.cpp" break; case 51: // stmt_list: stmt -#line 344 "parser.ypp" +#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 > ())); } #line 2324 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 349 "parser.ypp" +#line 357 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2330 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 351 "parser.ypp" +#line 359 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2336 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 353 "parser.ypp" +#line 361 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2342 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 355 "parser.ypp" +#line 363 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2348 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 360 "parser.ypp" +#line 368 "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 2354 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 362 "parser.ypp" +#line 370 "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 2360 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 367 "parser.ypp" +#line 375 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2366 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 369 "parser.ypp" +#line 377 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2372 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 371 "parser.ypp" +#line 379 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2378 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 376 "parser.ypp" +#line 384 "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 2384 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 381 "parser.ypp" +#line 389 "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 2390 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 383 "parser.ypp" +#line 391 "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 2396 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 388 "parser.ypp" +#line 396 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2402 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 393 "parser.ypp" +#line 401 "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 2408 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 395 "parser.ypp" +#line 403 "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 2414 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 400 "parser.ypp" +#line 408 "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 2420 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 402 "parser.ypp" +#line 410 "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 2426 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 407 "parser.ypp" +#line 415 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } #line 2432 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 412 "parser.ypp" +#line 420 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2438 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 414 "parser.ypp" +#line 422 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } #line 2444 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 419 "parser.ypp" +#line 427 "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 2450 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 424 "parser.ypp" +#line 432 "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 2456 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 429 "parser.ypp" +#line 437 "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 2462 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 434 "parser.ypp" +#line 442 "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 2468 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 439 "parser.ypp" +#line 447 "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 2474 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 444 "parser.ypp" +#line 452 "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 2480 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 446 "parser.ypp" +#line 454 "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 2486 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 451 "parser.ypp" +#line 459 "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 2492 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 456 "parser.ypp" +#line 464 "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 2498 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 458 "parser.ypp" +#line 466 "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 2504 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 463 "parser.ypp" +#line 471 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2510 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 468 "parser.ypp" +#line 476 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } #line 2516 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 473 "parser.ypp" +#line 481 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } #line 2522 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 478 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 2528 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 480 "parser.ypp" +#line 488 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } #line 2534 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 485 "parser.ypp" +#line 493 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } #line 2540 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 490 "parser.ypp" +#line 498 "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 2546 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 495 "parser.ypp" +#line 503 "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 2552 "parser.cpp" break; case 90: // expr: expr_ternary -#line 499 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2558 "parser.cpp" break; case 91: // expr: expr_binary -#line 500 "parser.ypp" +#line 508 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2564 "parser.cpp" break; case 92: // expr: expr_primitive -#line 501 "parser.ypp" +#line 509 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2570 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 505 "parser.ypp" +#line 513 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } #line 2576 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 506 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } #line 2582 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 511 "parser.ypp" +#line 519 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2588 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 513 "parser.ypp" +#line 521 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2594 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 515 "parser.ypp" +#line 523 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2600 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 517 "parser.ypp" +#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 2606 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 519 "parser.ypp" +#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 2612 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 521 "parser.ypp" +#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 2618 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 523 "parser.ypp" +#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 2624 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 525 "parser.ypp" +#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 2630 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 527 "parser.ypp" +#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 2636 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 529 "parser.ypp" +#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 2642 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 531 "parser.ypp" +#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 2648 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 536 "parser.ypp" +#line 544 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2654 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 538 "parser.ypp" +#line 546 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2660 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 543 "parser.ypp" +#line 551 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } #line 2666 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 545 "parser.ypp" +#line 553 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } #line 2672 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 550 "parser.ypp" +#line 558 "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 2678 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 555 "parser.ypp" +#line 563 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2684 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 557 "parser.ypp" +#line 565 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2690 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 559 "parser.ypp" +#line 567 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2696 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 561 "parser.ypp" +#line 569 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } #line 2702 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 563 "parser.ypp" +#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 2708 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 565 "parser.ypp" +#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 2714 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 567 "parser.ypp" +#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 2720 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 569 "parser.ypp" +#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 2726 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 571 "parser.ypp" +#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 2732 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 573 "parser.ypp" +#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 2738 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 575 "parser.ypp" +#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 2744 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 577 "parser.ypp" +#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 2750 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 579 "parser.ypp" +#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 2756 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 581 "parser.ypp" +#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 2762 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 583 "parser.ypp" +#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 2768 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 585 "parser.ypp" +#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 2774 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 587 "parser.ypp" +#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 2780 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 589 "parser.ypp" +#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 2786 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 593 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } #line 2792 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 594 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } #line 2798 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 595 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 2804 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 596 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 2810 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 597 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } #line 2816 "parser.cpp" break; case 134: // expr_primitive: expr_isdefined -#line 598 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } #line 2822 "parser.cpp" break; case 135: // expr_primitive: expr_istrue -#line 599 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } #line 2828 "parser.cpp" break; case 136: // expr_primitive: expr_reference -#line 600 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } #line 2834 "parser.cpp" break; case 137: // expr_primitive: expr_array -#line 601 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 2840 "parser.cpp" break; case 138: // expr_primitive: expr_field -#line 602 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 2846 "parser.cpp" break; case 139: // expr_primitive: expr_size -#line 603 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } #line 2852 "parser.cpp" break; case 140: // expr_primitive: expr_paren -#line 604 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } #line 2858 "parser.cpp" break; case 141: // expr_primitive: expr_thisthread -#line 605 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } #line 2864 "parser.cpp" break; case 142: // expr_primitive: expr_empty_array -#line 606 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } #line 2870 "parser.cpp" break; case 143: // expr_primitive: expr_undefined -#line 607 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } #line 2876 "parser.cpp" break; case 144: // expr_primitive: expr_game -#line 608 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 2882 "parser.cpp" break; case 145: // expr_primitive: expr_self -#line 609 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 2888 "parser.cpp" break; case 146: // expr_primitive: expr_anim -#line 610 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 2894 "parser.cpp" break; case 147: // expr_primitive: expr_level -#line 611 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 2900 "parser.cpp" break; case 148: // expr_primitive: expr_animation -#line 612 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } #line 2906 "parser.cpp" break; case 149: // expr_primitive: expr_animtree -#line 613 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } #line 2912 "parser.cpp" break; case 150: // expr_primitive: expr_identifier -#line 614 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 2918 "parser.cpp" break; case 151: // expr_primitive: expr_istring -#line 615 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } #line 2924 "parser.cpp" break; case 152: // expr_primitive: expr_string -#line 616 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } #line 2930 "parser.cpp" break; case 153: // expr_primitive: expr_color -#line 617 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } #line 2936 "parser.cpp" break; case 154: // expr_primitive: expr_vector -#line 618 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } #line 2942 "parser.cpp" break; case 155: // expr_primitive: expr_float -#line 619 "parser.ypp" +#line 627 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } #line 2948 "parser.cpp" break; case 156: // expr_primitive: expr_integer -#line 620 "parser.ypp" +#line 628 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } #line 2954 "parser.cpp" break; case 157: // expr_primitive: expr_false -#line 621 "parser.ypp" +#line 629 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } #line 2960 "parser.cpp" break; case 158: // expr_primitive: expr_true -#line 622 "parser.ypp" +#line 630 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } #line 2966 "parser.cpp" break; case 159: // expr_complement: "~" expr -#line 627 "parser.ypp" +#line 635 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2972 "parser.cpp" break; case 160: // expr_not: "!" expr -#line 632 "parser.ypp" +#line 640 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } #line 2978 "parser.cpp" break; case 161: // expr_call: expr_function -#line 636 "parser.ypp" +#line 644 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2984 "parser.cpp" break; case 162: // expr_call: expr_pointer -#line 637 "parser.ypp" +#line 645 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } #line 2990 "parser.cpp" break; case 163: // expr_method: expr_object expr_function -#line 640 "parser.ypp" +#line 648 "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 2996 "parser.cpp" break; case 164: // expr_method: expr_object expr_pointer -#line 641 "parser.ypp" +#line 649 "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 3002 "parser.cpp" break; case 165: // expr_function: expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 654 "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 3008 "parser.cpp" break; case 166: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 656 "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 3014 "parser.cpp" break; case 167: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 658 "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 3020 "parser.cpp" break; case 168: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 660 "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 3026 "parser.cpp" break; case 169: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 662 "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 3032 "parser.cpp" break; case 170: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 664 "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 3038 "parser.cpp" break; case 171: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 661 "parser.ypp" +#line 669 "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 3044 "parser.cpp" break; case 172: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 671 "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 3050 "parser.cpp" break; case 173: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 665 "parser.ypp" +#line 673 "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 3056 "parser.cpp" break; case 174: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 667 "parser.ypp" +#line 675 "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 3062 "parser.cpp" break; case 175: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 672 "parser.ypp" +#line 680 "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 3068 "parser.cpp" break; case 176: // expr_parameters: expr_parameters "," expr_identifier -#line 677 "parser.ypp" +#line 685 "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 3074 "parser.cpp" break; case 177: // expr_parameters: expr_identifier -#line 679 "parser.ypp" +#line 687 "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 3080 "parser.cpp" break; case 178: // expr_parameters: %empty -#line 681 "parser.ypp" +#line 689 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } #line 3086 "parser.cpp" break; case 179: // expr_arguments: expr_arguments_no_empty -#line 686 "parser.ypp" +#line 694 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } #line 3092 "parser.cpp" break; case 180: // expr_arguments: %empty -#line 688 "parser.ypp" +#line 696 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } #line 3098 "parser.cpp" break; case 181: // expr_arguments_no_empty: expr_arguments "," expr -#line 693 "parser.ypp" +#line 701 "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 3104 "parser.cpp" break; case 182: // expr_arguments_no_empty: expr -#line 695 "parser.ypp" +#line 703 "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 3110 "parser.cpp" break; case 183: // expr_isdefined: "isdefined" "(" expr ")" -#line 700 "parser.ypp" +#line 708 "parser.ypp" { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3116 "parser.cpp" break; case 184: // expr_istrue: "istrue" "(" expr ")" -#line 705 "parser.ypp" +#line 713 "parser.ypp" { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3122 "parser.cpp" break; case 185: // expr_reference: "::" expr_identifier -#line 710 "parser.ypp" +#line 718 "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 3128 "parser.cpp" break; case 186: // expr_reference: expr_path "::" expr_identifier -#line 712 "parser.ypp" +#line 720 "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 3134 "parser.cpp" break; case 187: // expr_array: expr_object "[" expr "]" -#line 717 "parser.ypp" +#line 725 "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 3140 "parser.cpp" break; case 188: // expr_field: expr_object "." expr_identifier -#line 722 "parser.ypp" +#line 730 "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 3146 "parser.cpp" break; case 189: // expr_field: expr_object "field" -#line 724 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr_field::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ())); } #line 3152 "parser.cpp" break; case 190: // expr_size: expr_object ".size" -#line 729 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3158 "parser.cpp" break; case 191: // expr_paren: "(" expr ")" -#line 734 "parser.ypp" +#line 742 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } #line 3164 "parser.cpp" break; case 192: // expr_object: expr_call -#line 738 "parser.ypp" +#line 746 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } #line 3170 "parser.cpp" break; case 193: // expr_object: expr_method -#line 739 "parser.ypp" +#line 747 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } #line 3176 "parser.cpp" break; case 194: // expr_object: expr_array -#line 740 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } #line 3182 "parser.cpp" break; case 195: // expr_object: expr_field -#line 741 "parser.ypp" +#line 749 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } #line 3188 "parser.cpp" break; case 196: // expr_object: expr_game -#line 742 "parser.ypp" +#line 750 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } #line 3194 "parser.cpp" break; case 197: // expr_object: expr_self -#line 743 "parser.ypp" +#line 751 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } #line 3200 "parser.cpp" break; case 198: // expr_object: expr_anim -#line 744 "parser.ypp" +#line 752 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } #line 3206 "parser.cpp" break; case 199: // expr_object: expr_level -#line 745 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } #line 3212 "parser.cpp" break; case 200: // expr_object: expr_identifier -#line 746 "parser.ypp" +#line 754 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } #line 3218 "parser.cpp" break; case 201: // expr_thisthread: "thisthread" -#line 751 "parser.ypp" +#line 759 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } #line 3224 "parser.cpp" break; case 202: // expr_empty_array: "[" "]" -#line 756 "parser.ypp" +#line 764 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } #line 3230 "parser.cpp" break; case 203: // expr_undefined: "undefined" -#line 761 "parser.ypp" +#line 769 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } #line 3236 "parser.cpp" break; case 204: // expr_game: "game" -#line 766 "parser.ypp" +#line 774 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } #line 3242 "parser.cpp" break; case 205: // expr_self: "self" -#line 771 "parser.ypp" +#line 779 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } #line 3248 "parser.cpp" break; case 206: // expr_anim: "anim" -#line 776 "parser.ypp" +#line 784 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } #line 3254 "parser.cpp" break; case 207: // expr_level: "level" -#line 781 "parser.ypp" +#line 789 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } #line 3260 "parser.cpp" break; case 208: // expr_animation: "%" "identifier" -#line 786 "parser.ypp" +#line 794 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3266 "parser.cpp" break; case 209: // expr_animtree: "#animtree" -#line 791 "parser.ypp" +#line 799 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } #line 3272 "parser.cpp" break; case 210: // expr_identifier: "identifier" -#line 796 "parser.ypp" +#line 804 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3278 "parser.cpp" break; case 211: // expr_path: "path" -#line 801 "parser.ypp" +#line 809 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3284 "parser.cpp" break; case 212: // expr_path: expr_identifier -#line 803 "parser.ypp" +#line 811 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } #line 3290 "parser.cpp" break; case 213: // expr_istring: "localized string" -#line 808 "parser.ypp" +#line 816 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3296 "parser.cpp" break; case 214: // expr_string: "string literal" -#line 813 "parser.ypp" +#line 821 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3302 "parser.cpp" break; case 215: // expr_color: "color" -#line 818 "parser.ypp" +#line 826 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3308 "parser.cpp" break; case 216: // expr_vector: "(" expr "," expr "," expr ")" -#line 823 "parser.ypp" +#line 831 "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 3314 "parser.cpp" break; case 217: // expr_float: "-" "float" -#line 828 "parser.ypp" +#line 836 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3320 "parser.cpp" break; case 218: // expr_float: "float" -#line 830 "parser.ypp" +#line 838 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3326 "parser.cpp" break; case 219: // expr_integer: "-" "integer" -#line 835 "parser.ypp" +#line 843 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } #line 3332 "parser.cpp" break; case 220: // expr_integer: "integer" -#line 837 "parser.ypp" +#line 845 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } #line 3338 "parser.cpp" break; case 221: // expr_false: "false" -#line 842 "parser.ypp" +#line 850 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } #line 3344 "parser.cpp" break; case 222: // expr_true: "true" -#line 847 "parser.ypp" +#line 855 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } #line 3350 "parser.cpp" break; @@ -3534,7 +3534,8 @@ namespace xsk { namespace gsc { namespace s4 { { static const char *const yy_sname[] = { - "end of file", "error", "invalid token", "/#", "#/", "#inline", + "end of file", "error", "invalid token", "#define", "#undef", "#ifdef", + "#ifndef", "#if", "#elif", "#else", "#endif", "/#", "#/", "#inline", "#include", "#using_animtree", "#animtree", "endon", "notify", "wait", "waittill", "waittillmatch", "waittillframeend", "waitframe", "if", "else", "do", "while", "for", "foreach", "in", "switch", "case", @@ -3838,51 +3839,51 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yypact_[] = { - 40, -277, -277, -40, -40, -22, -277, 30, 40, -277, - -277, -277, -277, -277, -277, -39, -277, -277, -24, -20, - -52, -277, -277, -277, -277, -54, 1143, -277, -277, -277, - 3, -30, -277, -277, -38, -35, -277, 60, -277, -277, - -277, -277, -277, -277, -277, 68, 82, 1143, 1009, -54, - 1143, 1143, 63, -13, -277, -277, -277, -277, 2139, -277, - -277, -277, -277, -277, 570, 712, -277, -277, -277, -277, - -277, -277, 1032, 1103, -277, -277, 1166, -277, -277, -277, - 1288, 1300, 1310, 1319, -277, -277, 457, 17, -277, -277, - -277, -277, -277, -277, -277, -277, 73, 89, -54, 91, - 97, 96, 105, 112, 108, 114, 1143, 1143, 1357, 1009, - -277, 2222, 113, 115, -277, -277, -277, -277, -277, -277, - -277, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, - 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, - -277, 1210, -54, -277, -277, -277, 121, 117, 1143, -54, - -277, 76, -277, -277, 1143, 1143, -54, 1143, 1143, -54, - 1143, 1523, 1557, -277, 1143, 1869, 1143, -277, 2104, 88, - 88, 2253, 2263, 2335, 2335, -23, -23, -23, -23, 2294, - 720, 2304, -29, -29, -277, -277, -277, 1909, -277, -54, - -21, -277, 135, 809, 1143, 127, -27, 138, 981, 141, - 144, 146, 148, -71, 154, 140, 145, 1076, 159, 156, - 157, -277, 171, 228, 228, -277, -277, -277, 855, -277, + 32, -277, -277, -48, -48, -34, -277, 7, 32, -277, + -277, -277, -277, -277, -277, -38, -277, -277, -41, -25, + -69, -277, -277, -277, -277, -51, 1135, -277, -277, -277, + -19, -29, -277, -277, -46, -43, -277, 22, -277, -277, + -277, -277, -277, -277, -277, 56, 60, 1135, 1001, -51, + 1135, 1135, 55, -30, -277, -277, -277, -277, 2131, -277, + -277, -277, -277, -277, 562, 704, -277, -277, -277, -277, + -277, -277, 1024, 1095, -277, -277, 1158, -277, -277, -277, + 1280, 1292, 1302, 1311, -277, -277, 449, 66, -277, -277, + -277, -277, -277, -277, -277, -277, 65, 81, -51, 83, + 89, 88, 97, 104, 100, 106, 1135, 1135, 1349, 1001, + -277, 2214, 105, 107, -277, -277, -277, -277, -277, -277, + -277, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, + 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, + -277, 1202, -51, -277, -277, -277, 113, 109, 1135, -51, + -277, 68, -277, -277, 1135, 1135, -51, 1135, 1135, -51, + 1135, 1515, 1549, -277, 1135, 1861, 1135, -277, 2096, 80, + 80, 2245, 2255, 2327, 2327, -31, -31, -31, -31, 2286, + 712, 2296, -37, -37, -277, -277, -277, 1901, -277, -51, + -28, -277, 127, 801, 1135, 119, -35, 130, 973, 133, + 136, 138, 140, -78, 146, 132, 137, 1068, 151, 148, + 149, -277, 163, 220, 220, -277, -277, -277, 847, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, - -277, -277, -277, 166, 167, 172, 173, 175, -277, -277, - 657, -277, -277, -277, -277, -26, 1949, 4, 190, 1989, - 21, 195, 2029, -277, -277, 2068, 191, 2222, 1143, -277, - 135, -277, 1143, -277, 935, 2174, -277, 199, -277, 1143, - 224, 1143, 80, -54, 1143, 149, 194, 198, -277, -277, - -277, -277, 2209, -277, 1143, 1143, 1143, -277, -277, 147, - 147, -277, -277, -277, -277, -277, -277, -277, 208, 209, - 211, 212, -277, -277, 1143, 1143, 1143, 1143, 1143, 1143, - 1143, 1143, 1143, 1143, 1143, 213, -277, 1143, 214, -277, - 1143, 215, 1143, 216, 2222, 22, -277, -277, 203, 1591, - 226, 1625, 217, -277, -277, -277, 1237, -4, 1659, -277, - -277, -277, 23, 25, 1869, 1143, 1143, 1143, 1143, 2222, - 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222, 2222, - 230, 31, 231, 34, 233, 1693, 1143, -277, -277, 981, - 1143, 981, 1143, 1143, -54, 89, 229, 236, 1727, 1401, - 1445, 1489, 1143, -277, 1143, -277, 1143, -277, 37, 267, - 1761, -277, 2222, 239, 1795, 265, -277, -277, -277, 240, - 241, 1143, 242, 1143, 246, 1143, 41, 84, 93, -277, - 981, 247, 80, 981, 1143, -277, -277, 257, -277, 262, - -277, 264, -277, -277, -277, -277, -277, 269, -277, 1829, - 256, 258, 261, 981, 981, -277, -277, -277, -277, -277 + -277, -277, -277, 158, 159, 164, 165, 167, -277, -277, + 649, -277, -277, -277, -277, -32, 1941, -4, 182, 1981, + 13, 187, 2021, -277, -277, 2060, 183, 2214, 1135, -277, + 127, -277, 1135, -277, 927, 2166, -277, 188, -277, 1135, + 219, 1135, 72, -51, 1135, 141, 186, 190, -277, -277, + -277, -277, 2201, -277, 1135, 1135, 1135, -277, -277, 139, + 139, -277, -277, -277, -277, -277, -277, -277, 200, 203, + 204, 205, -277, -277, 1135, 1135, 1135, 1135, 1135, 1135, + 1135, 1135, 1135, 1135, 1135, 206, -277, 1135, 213, -277, + 1135, 214, 1135, 208, 2214, 14, -277, -277, 191, 1583, + 210, 1617, 202, -277, -277, -277, 1229, -12, 1651, -277, + -277, -277, 15, 17, 1861, 1135, 1135, 1135, 1135, 2214, + 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, 2214, + 222, 23, 223, 26, 225, 1685, 1135, -277, -277, 973, + 1135, 973, 1135, 1135, -51, 81, 221, 228, 1719, 1393, + 1437, 1481, 1135, -277, 1135, -277, 1135, -277, 29, 259, + 1753, -277, 2214, 231, 1787, 257, -277, -277, -277, 232, + 233, 1135, 234, 1135, 238, 1135, 33, 76, 85, -277, + 973, 239, 72, 973, 1135, -277, -277, 249, -277, 254, + -277, 256, -277, -277, -277, -277, -277, 261, -277, 1821, + 248, 250, 255, 973, 973, -277, -277, -277, -277, -277 }; const unsigned char @@ -3938,7 +3939,7 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yypgoto_[] = { - -277, -277, -277, 281, 310, 311, -277, -277, -277, 207, + -277, -277, -277, 281, 309, 310, -277, -277, -277, 207, -277, -95, 150, -81, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 201, -277, @@ -3966,19 +3967,19 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yytable_[] = { - 15, 113, 152, 17, 17, 30, 343, 25, 15, 18, - 19, 144, 99, 344, 345, 102, 285, 97, 383, 277, - 148, 145, 98, 29, 20, 32, 271, 57, -212, 278, - 21, 166, 27, 26, 100, 103, 28, 122, 123, 6, - 101, 104, 29, 1, 2, 3, 4, 5, 384, 114, - 96, 326, 16, 6, 16, 6, 166, 16, 6, 137, + 15, 113, 152, 17, 17, 30, 343, 21, 15, 18, + 19, 144, 99, 344, 345, 102, 25, 285, 383, 277, + 20, 145, 148, 27, 29, 32, 97, 271, 57, 278, + -212, 98, 166, 29, 100, 103, 96, 122, 123, 28, + 101, 104, 26, 1, 2, 3, 4, 5, 384, 114, + 6, 326, 16, 6, 16, 6, 166, 16, 6, 137, 138, 139, 113, 135, 136, 137, 138, 139, 329, 377, - 386, 149, 387, 166, 166, 166, 146, 166, 393, 193, - 119, 395, 147, 166, 419, 246, 166, 194, 432, 166, + 386, 119, 387, 166, 166, 166, 146, 166, 393, 193, + 105, 395, 147, 166, 419, 246, 166, 194, 432, 166, 195, 196, 197, 166, 198, 199, 200, 201, 153, 202, 203, 204, 205, 206, 207, 208, 209, 210, 34, 35, - 105, 37, 34, 35, 106, 37, 41, 42, 43, 44, - 41, 42, 43, 44, 151, 211, 212, 246, 107, 150, + 106, 37, 34, 35, 107, 37, 41, 42, 43, 44, + 41, 42, 43, 44, 151, 211, 212, 246, 149, 150, 212, 433, 246, 6, 213, 214, 166, 151, 213, 214, 434, 154, 188, 155, 247, 166, 343, 297, 297, 192, 156, 255, 246, 344, 345, 157, 258, 147, 158, 261, @@ -3990,14 +3991,14 @@ namespace xsk { namespace gsc { namespace s4 { 248, 247, 249, 255, 255, 293, 297, 249, 255, 147, 147, 296, 303, 304, 147, 248, 248, 58, 305, 306, 248, 307, 249, 249, 144, 144, 327, 249, 143, 16, - 6, 330, 333, 340, 145, 145, 338, 118, 108, 349, - 146, 115, 116, 350, 355, 356, 147, 357, 358, 378, - 34, 35, 376, 37, 370, 372, 374, 247, 41, 42, - 43, 44, 380, 382, 255, 298, 392, 394, 212, 396, + 6, 330, 333, 338, 145, 145, 340, 118, 108, 349, + 146, 115, 116, 350, 355, 378, 147, 356, 357, 358, + 34, 35, 376, 37, 380, 370, 382, 247, 41, 42, + 43, 44, 372, 374, 255, 298, 392, 394, 212, 396, 147, 144, 255, 347, 420, 407, 248, 424, 147, 22, 406, 145, 408, 249, 248, 422, 425, 426, 428, 146, 146, 249, 430, 436, 440, 147, 147, 161, 162, 441, - 165, 442, 445, 246, 446, 246, 443, 447, 23, 24, + 165, 442, 445, 246, 446, 246, 443, 23, 24, 447, 16, 6, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 437, 187, 274, 0, 287, 146, 250, 0, 0, @@ -4214,39 +4215,39 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yycheck_[] = { - 0, 48, 97, 3, 4, 20, 282, 46, 8, 3, - 4, 76, 50, 282, 282, 50, 87, 47, 22, 46, - 46, 76, 52, 94, 46, 25, 47, 98, 54, 56, - 0, 52, 56, 72, 34, 35, 56, 60, 61, 93, - 34, 35, 94, 3, 4, 5, 6, 7, 52, 49, - 47, 47, 92, 93, 92, 93, 52, 92, 93, 88, - 89, 90, 109, 86, 87, 88, 89, 90, 47, 47, - 47, 54, 47, 52, 52, 52, 76, 52, 47, 3, - 93, 47, 76, 52, 47, 151, 52, 11, 47, 52, - 14, 15, 16, 52, 18, 19, 20, 21, 98, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 50, 35, 32, 33, 46, 35, 40, 41, 42, 43, - 40, 41, 42, 43, 48, 49, 50, 193, 46, 56, - 50, 47, 198, 93, 58, 59, 52, 48, 58, 59, - 47, 50, 142, 46, 151, 52, 422, 213, 214, 149, - 54, 151, 218, 422, 422, 50, 156, 151, 46, 159, - 97, 98, 54, 151, 50, 52, 51, 46, 92, 93, - 151, 54, 92, 93, 86, 87, 88, 89, 90, 32, - 33, 46, 35, 56, 46, 250, 193, 46, 203, 189, - 46, 198, 46, 193, 46, 250, 56, 50, 198, 193, - 53, 56, 46, 46, 198, 193, 213, 214, 274, 55, - 198, 218, 193, 213, 214, 56, 282, 198, 218, 213, - 214, 50, 56, 56, 218, 213, 214, 26, 56, 56, - 218, 56, 213, 214, 299, 300, 46, 218, 91, 92, - 93, 46, 51, 19, 299, 300, 47, 98, 47, 55, - 250, 50, 51, 55, 46, 46, 250, 46, 46, 56, - 32, 33, 46, 35, 51, 51, 51, 274, 40, 41, - 42, 43, 46, 56, 274, 282, 46, 46, 50, 46, - 274, 346, 282, 283, 17, 56, 274, 22, 282, 8, - 385, 346, 56, 274, 282, 56, 56, 56, 56, 299, - 300, 282, 56, 56, 47, 299, 300, 106, 107, 47, - 109, 47, 56, 379, 56, 381, 47, 56, 8, 8, - 92, 93, 121, 122, 123, 124, 125, 126, 127, 128, + 0, 48, 97, 3, 4, 20, 282, 0, 8, 3, + 4, 76, 58, 282, 282, 58, 54, 95, 30, 54, + 54, 76, 54, 64, 102, 25, 55, 55, 106, 64, + 62, 60, 60, 102, 34, 35, 55, 68, 69, 64, + 34, 35, 80, 11, 12, 13, 14, 15, 60, 49, + 101, 55, 100, 101, 100, 101, 60, 100, 101, 96, + 97, 98, 109, 94, 95, 96, 97, 98, 55, 55, + 55, 101, 55, 60, 60, 60, 76, 60, 55, 11, + 58, 55, 76, 60, 55, 151, 60, 19, 55, 60, + 22, 23, 24, 60, 26, 27, 28, 29, 98, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 54, 43, 40, 41, 54, 43, 48, 49, 50, 51, + 48, 49, 50, 51, 56, 57, 58, 193, 62, 64, + 58, 55, 198, 101, 66, 67, 60, 56, 66, 67, + 55, 58, 142, 54, 151, 60, 422, 213, 214, 149, + 62, 151, 218, 422, 422, 58, 156, 151, 54, 159, + 105, 106, 62, 151, 58, 60, 59, 54, 100, 101, + 151, 62, 100, 101, 94, 95, 96, 97, 98, 40, + 41, 54, 43, 64, 54, 250, 193, 54, 203, 189, + 54, 198, 54, 193, 54, 250, 64, 58, 198, 193, + 61, 64, 54, 54, 198, 193, 213, 214, 274, 63, + 198, 218, 193, 213, 214, 64, 282, 198, 218, 213, + 214, 58, 64, 64, 218, 213, 214, 26, 64, 64, + 218, 64, 213, 214, 299, 300, 54, 218, 99, 100, + 101, 54, 59, 55, 299, 300, 27, 106, 47, 63, + 250, 50, 51, 63, 54, 64, 250, 54, 54, 54, + 40, 41, 54, 43, 54, 59, 64, 274, 48, 49, + 50, 51, 59, 59, 274, 282, 54, 54, 58, 54, + 274, 346, 282, 283, 25, 64, 274, 30, 282, 8, + 385, 346, 64, 274, 282, 64, 64, 64, 64, 299, + 300, 282, 64, 64, 55, 299, 300, 106, 107, 55, + 109, 55, 64, 379, 64, 381, 55, 8, 8, 64, + 100, 101, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 422, 141, 193, -1, 203, 346, 151, -1, -1, -1, -1, 346, -1, 420, 154, 422, 423, 157, -1, @@ -4262,279 +4263,279 @@ namespace xsk { namespace gsc { namespace s4 { 444, 198, -1, -1, 148, 443, 444, -1, -1, -1, -1, 155, 443, 444, 158, -1, 213, 214, -1, 268, 274, 218, -1, -1, -1, -1, -1, -1, 282, -1, - 279, 274, 281, -1, 151, 284, -1, -1, -1, 32, - 33, -1, 35, -1, -1, -1, 39, 296, 151, -1, - -1, -1, -1, 46, -1, -1, -1, 50, -1, -1, - 53, 54, -1, -1, -1, 314, 315, 316, 317, 318, + 279, 274, 281, -1, 151, 284, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 47, 296, 151, -1, + -1, -1, -1, 54, -1, -1, -1, 58, -1, -1, + 61, 62, -1, -1, -1, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 193, 274, -1, 151, -1, 198, -1, 332, -1, 282, -1, -1, -1, -1, - 193, -1, -1, -1, -1, 198, 213, 214, 91, 92, - 93, 218, -1, -1, -1, -1, 355, 356, 357, 358, + 193, -1, -1, -1, -1, 198, 213, 214, 99, 100, + 101, 218, -1, -1, -1, -1, 355, 356, 357, 358, 213, 214, -1, -1, -1, 218, -1, -1, -1, -1, -1, 193, -1, -1, -1, 379, 198, 381, 272, -1, -1, 380, -1, 382, 383, -1, 379, -1, 381, -1, -1, 213, 214, -1, -1, -1, 218, -1, -1, -1, - 294, 295, 32, 33, -1, 35, -1, 274, -1, 39, + 294, 295, 40, 41, -1, 43, -1, 274, -1, 47, -1, -1, -1, -1, -1, 282, 420, -1, 422, 423, - 50, 274, -1, 53, -1, 424, -1, 420, -1, 282, + 58, 274, -1, 61, -1, 424, -1, 420, -1, 282, 423, -1, 379, 327, 381, -1, 330, -1, -1, 443, 444, -1, -1, -1, -1, -1, -1, -1, -1, -1, 443, 444, 274, -1, -1, -1, -1, -1, -1, -1, - 282, 91, 92, 93, -1, -1, 9, 10, -1, 12, - 13, -1, -1, 420, -1, 422, 423, -1, -1, -1, - -1, -1, 376, -1, -1, -1, -1, -1, -1, 32, - 33, -1, 35, -1, -1, -1, 443, 444, 392, -1, - 394, -1, 396, -1, -1, -1, -1, 50, -1, -1, - 53, -1, 379, -1, 381, 58, 59, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 379, -1, 381, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - -1, -1, -1, -1, 32, 33, -1, 35, 91, 92, - 93, 39, -1, 420, -1, 422, 423, 379, -1, 381, - -1, -1, 50, -1, -1, 53, -1, 420, -1, 422, + 282, 99, 100, 101, -1, -1, 17, 18, -1, 20, + 21, -1, -1, 420, -1, 422, 423, -1, -1, -1, + -1, -1, 376, -1, -1, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, 443, 444, 392, -1, + 394, -1, 396, -1, -1, -1, -1, 58, -1, -1, + 61, -1, 379, -1, 381, 66, 67, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 379, -1, 381, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + -1, -1, -1, -1, 40, 41, -1, 43, 99, 100, + 101, 47, -1, 420, -1, 422, 423, 379, -1, 381, + -1, -1, 58, -1, -1, 61, -1, 420, -1, 422, 423, -1, -1, -1, -1, -1, 443, 444, -1, -1, - 60, 61, -1, -1, 64, 65, 66, 67, 68, 69, + 68, 69, -1, -1, 72, 73, 74, 75, 76, 77, 443, 444, -1, -1, -1, -1, -1, -1, 420, -1, - 422, 423, -1, 91, 92, 93, 86, 87, 88, 89, - 90, -1, 3, 4, -1, -1, -1, -1, -1, -1, - 11, 443, 444, 14, 15, 16, -1, 18, 19, 20, - 21, -1, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, -1, 35, -1, -1, -1, -1, 40, - 41, 42, 43, -1, -1, -1, -1, 48, 3, 50, - -1, -1, -1, -1, -1, -1, 11, 58, 59, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, - -1, 92, 93, 48, 49, 50, -1, -1, -1, -1, - -1, -1, -1, 58, 59, -1, -1, -1, -1, -1, + 422, 423, -1, 99, 100, 101, 94, 95, 96, 97, + 98, -1, 11, 12, -1, -1, -1, -1, -1, -1, + 19, 443, 444, 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, -1, 48, + 49, 50, 51, -1, -1, -1, -1, 56, 11, 58, + -1, -1, -1, -1, -1, -1, 19, 66, 67, 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, -1, 48, 49, 50, 51, -1, + -1, 100, 101, 56, 57, 58, -1, -1, -1, -1, + -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, - -1, -1, -1, -1, -1, -1, 11, 92, 93, 14, - 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, - -1, -1, -1, 48, 3, 50, -1, -1, -1, -1, - -1, -1, 11, 58, 59, 14, 15, 16, -1, 18, - 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, -1, 35, 8, -1, -1, - -1, 40, 41, 42, 43, -1, -1, 92, 93, 48, - -1, 50, -1, -1, -1, -1, -1, -1, -1, 58, - 59, 32, 33, 34, 35, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, 46, -1, -1, -1, 50, - 51, -1, -1, 54, 32, 33, -1, 35, -1, -1, - -1, 39, -1, 92, 93, -1, -1, -1, -1, 70, - 71, -1, 50, -1, 8, 53, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 87, -1, -1, 90, - -1, 92, 93, 94, 95, 96, 97, 98, 32, 33, - 34, 35, 36, 37, 38, -1, 40, 41, 42, 43, - 44, 45, 46, 91, 92, 93, 50, -1, -1, -1, - 54, -1, 56, -1, -1, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, 70, 71, -1, -1, - -1, 8, -1, 50, -1, -1, 53, -1, -1, -1, - -1, -1, -1, 87, -1, -1, 90, -1, 92, 93, - 94, 95, 96, 97, 98, 32, 33, 34, 35, 36, - 37, 38, -1, 40, 41, 42, 43, 44, 45, 46, - -1, -1, -1, 50, 91, 92, 93, 54, 32, 33, - -1, 35, -1, -1, -1, 39, -1, -1, -1, -1, - -1, -1, -1, 70, 71, -1, 50, -1, 8, 53, + -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, + -1, -1, -1, -1, -1, -1, 19, 100, 101, 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, -1, 48, 49, 50, 51, -1, + -1, -1, -1, 56, 11, 58, -1, -1, -1, -1, + -1, -1, 19, 66, 67, 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, + -1, 48, 49, 50, 51, -1, -1, 100, 101, 56, + -1, 58, -1, -1, -1, -1, -1, -1, -1, 66, + 67, 40, 41, 42, 43, 44, 45, 46, -1, 48, + 49, 50, 51, 52, 53, 54, -1, -1, -1, 58, + 59, -1, -1, 62, 40, 41, -1, 43, -1, -1, + -1, 47, -1, 100, 101, -1, -1, -1, -1, 78, + 79, -1, 58, -1, 16, 61, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, -1, -1, 98, + -1, 100, 101, 102, 103, 104, 105, 106, 40, 41, + 42, 43, 44, 45, 46, -1, 48, 49, 50, 51, + 52, 53, 54, 99, 100, 101, 58, -1, -1, -1, + 62, -1, 64, -1, -1, 40, 41, -1, 43, -1, + -1, -1, 47, -1, -1, -1, 78, 79, -1, -1, + -1, 16, -1, 58, -1, -1, 61, -1, -1, -1, + -1, -1, -1, 95, -1, -1, 98, -1, 100, 101, + 102, 103, 104, 105, 106, 40, 41, 42, 43, 44, + 45, 46, -1, 48, 49, 50, 51, 52, 53, 54, + -1, -1, -1, 58, 99, 100, 101, 62, 40, 41, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, + -1, -1, -1, 78, 79, -1, 58, -1, 16, 61, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 87, -1, -1, 90, -1, 92, 93, 94, 95, 96, - 97, 98, 32, 33, 34, 35, 36, 37, 38, -1, - 40, 41, 42, 43, 44, 45, 46, 91, 92, 93, - 50, -1, -1, -1, 54, -1, -1, -1, -1, 32, - 33, -1, 35, -1, -1, -1, -1, -1, -1, -1, - 70, 71, -1, -1, -1, -1, -1, 50, -1, -1, - 53, -1, -1, -1, -1, 58, 59, 87, -1, -1, - 90, -1, 92, 93, 94, 95, 96, 97, 98, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 32, 33, -1, 35, -1, -1, -1, 39, 91, 92, - 93, -1, 32, 33, -1, 35, -1, -1, 50, 39, - -1, 53, 32, 33, -1, 35, -1, -1, -1, 39, - 50, 32, 33, 53, 35, -1, -1, -1, 39, -1, - 50, -1, -1, 53, -1, -1, -1, -1, -1, 50, - -1, -1, 53, -1, -1, -1, -1, -1, -1, 91, - 92, 93, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 91, 92, 93, -1, -1, -1, -1, -1, -1, - -1, 91, 92, 93, 47, -1, -1, -1, -1, 52, - 91, 92, 93, -1, 57, -1, -1, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, -1, -1, -1, + 95, -1, -1, 98, -1, 100, 101, 102, 103, 104, + 105, 106, 40, 41, 42, 43, 44, 45, 46, -1, + 48, 49, 50, 51, 52, 53, 54, 99, 100, 101, + 58, -1, -1, -1, 62, -1, -1, -1, -1, 40, + 41, -1, 43, -1, -1, -1, -1, -1, -1, -1, + 78, 79, -1, -1, -1, -1, -1, 58, -1, -1, + 61, -1, -1, -1, -1, 66, 67, 95, -1, -1, + 98, -1, 100, 101, 102, 103, 104, 105, 106, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 40, 41, -1, 43, -1, -1, -1, 47, 99, 100, + 101, -1, 40, 41, -1, 43, -1, -1, 58, 47, + -1, 61, 40, 41, -1, 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, + -1, -1, 61, -1, -1, -1, -1, -1, -1, 99, + 100, 101, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 99, 100, 101, -1, -1, -1, -1, -1, -1, + -1, 99, 100, 101, 55, -1, -1, -1, -1, 60, + 99, 100, 101, -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, - 83, 84, 85, 86, 87, 88, 89, 90, 47, -1, - -1, -1, -1, 52, -1, -1, -1, -1, 57, -1, - -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 83, 84, 85, 86, 87, 88, - 89, 90, 47, -1, -1, -1, -1, 52, -1, -1, - -1, -1, 57, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 83, 84, - 85, 86, 87, 88, 89, 90, 47, -1, -1, -1, - -1, 52, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, - 47, -1, 83, 84, 85, 86, 87, 88, 89, 90, - 57, -1, -1, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 47, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 57, -1, -1, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, - 83, 84, 85, 86, 87, 88, 89, 90, 57, -1, - -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 47, -1, 83, 84, 85, 86, 87, 88, - 89, 90, 57, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 47, -1, 83, 84, - 85, 86, 87, 88, 89, 90, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, - 47, -1, 83, 84, 85, 86, 87, 88, 89, 90, - 57, -1, -1, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 47, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 57, -1, -1, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 47, -1, - 83, 84, 85, 86, 87, 88, 89, 90, 57, -1, - -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 47, -1, 83, 84, 85, 86, 87, 88, - 89, 90, 57, -1, -1, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 47, -1, 83, 84, - 85, 86, 87, 88, 89, 90, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 51, -1, -1, -1, -1, -1, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, - 52, -1, -1, -1, -1, 57, -1, -1, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, -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, 83, 84, 85, 86, 87, 88, 89, 90, 55, - -1, 57, -1, -1, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 83, 84, 85, - 86, 87, 88, 89, 90, 56, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, + -1, 91, 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, 83, 84, 85, 86, 87, 88, 89, 90, - 56, 57, -1, -1, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 83, 84, 85, - 86, 87, 88, 89, 90, 56, 57, -1, -1, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 57, - -1, -1, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 83, 84, 85, 86, 87, 88, 89, 90, - -1, -1, -1, -1, -1, 83, 84, 85, 86, 87, - 88, 89, 90, 60, 61, -1, 63, 64, 65, 66, - 67, 68, 69, 60, 61, -1, -1, 64, 65, 66, - 67, 68, 69, -1, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 60, 61, -1, -1, 64, 65, - 66, 67, 68, 69, 60, 61, -1, -1, 64, 65, - 66, 67, 68, 69, -1, -1, -1, -1, 84, 85, - 86, 87, 88, 89, 90, -1, -1, -1, 84, -1, - 86, 87, 88, 89, 90, 60, 61, -1, -1, -1, - -1, 66, 67, 68, 69, -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, -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, 68, 69, -1, -1, 72, 73, + 74, 75, 76, 77, -1, -1, -1, -1, 92, 93, + 94, 95, 96, 97, 98, -1, -1, -1, 92, -1, + 94, 95, 96, 97, 98, 68, 69, -1, -1, -1, + -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 86, 87, 88, 89, 90 + -1, 94, 95, 96, 97, 98 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 93, 109, 110, 111, - 112, 113, 114, 115, 116, 181, 92, 181, 182, 182, - 46, 0, 111, 112, 113, 46, 72, 56, 56, 94, - 184, 161, 181, 8, 32, 33, 34, 35, 36, 37, - 38, 40, 41, 42, 43, 44, 45, 46, 50, 54, - 70, 71, 87, 90, 95, 96, 97, 98, 146, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 47, 47, 52, 50, - 181, 182, 50, 181, 182, 50, 46, 46, 146, 50, - 51, 146, 162, 163, 181, 146, 146, 97, 98, 93, - 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 83, 84, 85, 86, 87, 88, 89, 90, - 39, 50, 53, 91, 158, 159, 181, 182, 46, 54, - 56, 48, 119, 181, 50, 46, 54, 50, 46, 54, - 50, 146, 146, 47, 52, 146, 52, 51, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 181, 54, - 162, 163, 181, 3, 11, 14, 15, 16, 18, 19, - 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 49, 50, 58, 59, 117, 118, 119, 120, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 148, 149, 150, 156, 157, 167, 168, - 171, 175, 176, 177, 178, 181, 146, 162, 181, 146, - 162, 181, 146, 47, 47, 146, 51, 146, 55, 51, - 181, 47, 46, 4, 120, 146, 56, 46, 56, 46, - 117, 46, 46, 46, 46, 87, 184, 188, 55, 56, - 56, 56, 146, 56, 46, 46, 50, 156, 157, 171, - 171, 49, 117, 56, 56, 56, 56, 56, 9, 10, - 12, 13, 58, 59, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 51, 47, 46, 51, 47, - 46, 51, 52, 51, 146, 162, 4, 56, 47, 146, - 19, 146, 121, 148, 149, 150, 171, 181, 146, 55, - 55, 56, 162, 162, 146, 46, 46, 46, 46, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 51, 162, 51, 162, 51, 146, 46, 47, 56, 47, - 46, 47, 56, 22, 52, 47, 47, 47, 146, 146, - 146, 146, 46, 47, 46, 47, 46, 47, 162, 117, - 146, 117, 146, 147, 146, 181, 119, 56, 56, 47, - 47, 52, 47, 52, 47, 52, 162, 162, 162, 47, - 17, 47, 56, 47, 22, 56, 56, 163, 56, 163, - 56, 163, 47, 47, 47, 117, 56, 121, 117, 146, - 47, 47, 47, 47, 47, 56, 56, 56, 117, 117 + 0, 11, 12, 13, 14, 15, 101, 117, 118, 119, + 120, 121, 122, 123, 124, 189, 100, 189, 190, 190, + 54, 0, 119, 120, 121, 54, 80, 64, 64, 102, + 192, 169, 189, 16, 40, 41, 42, 43, 44, 45, + 46, 48, 49, 50, 51, 52, 53, 54, 58, 62, + 78, 79, 95, 98, 103, 104, 105, 106, 154, 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, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 55, 55, 60, 58, + 189, 190, 58, 189, 190, 58, 54, 54, 154, 58, + 59, 154, 170, 171, 189, 154, 154, 105, 106, 101, + 64, 65, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 91, 92, 93, 94, 95, 96, 97, 98, + 47, 58, 61, 99, 166, 167, 189, 190, 54, 62, + 64, 56, 127, 189, 58, 54, 62, 58, 54, 62, + 58, 154, 154, 55, 60, 154, 60, 59, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 189, 62, + 170, 171, 189, 11, 19, 22, 23, 24, 26, 27, + 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 57, 58, 66, 67, 125, 126, 127, 128, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 156, 157, 158, 164, 165, 175, 176, + 179, 183, 184, 185, 186, 189, 154, 170, 189, 154, + 170, 189, 154, 55, 55, 154, 59, 154, 63, 59, + 189, 55, 54, 12, 128, 154, 64, 54, 64, 54, + 125, 54, 54, 54, 54, 95, 192, 196, 63, 64, + 64, 64, 154, 64, 54, 54, 58, 164, 165, 179, + 179, 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, 154, 170, 12, 64, 55, 154, + 27, 154, 129, 156, 157, 158, 179, 189, 154, 63, + 63, 64, 170, 170, 154, 54, 54, 54, 54, 154, + 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 59, 170, 59, 170, 59, 154, 54, 55, 64, 55, + 54, 55, 64, 30, 60, 55, 55, 55, 154, 154, + 154, 154, 54, 55, 54, 55, 54, 55, 170, 125, + 154, 125, 154, 155, 154, 189, 127, 64, 64, 55, + 55, 60, 55, 60, 55, 60, 170, 170, 170, 55, + 25, 55, 64, 55, 30, 64, 64, 171, 64, 171, + 64, 171, 55, 55, 55, 125, 64, 129, 125, 154, + 55, 55, 55, 55, 55, 64, 64, 64, 125, 125 }; const unsigned char parser::yyr1_[] = { - 0, 108, 109, 109, 110, 110, 110, 110, 110, 110, - 111, 112, 113, 113, 113, 113, 113, 114, 115, 116, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 118, 118, 119, 119, - 120, 120, 121, 121, 121, 121, 122, 122, 123, 123, - 123, 124, 125, 125, 126, 127, 127, 128, 128, 129, - 130, 130, 131, 132, 133, 134, 135, 136, 136, 137, - 138, 138, 139, 140, 141, 142, 142, 143, 144, 145, - 146, 146, 146, 147, 147, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 149, 149, 150, 150, - 151, 152, 152, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 154, - 155, 156, 156, 157, 157, 158, 158, 158, 158, 158, - 158, 159, 159, 159, 159, 160, 161, 161, 161, 162, - 162, 163, 163, 164, 165, 166, 166, 167, 168, 168, - 169, 170, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 182, 183, 184, 185, 186, 187, 187, 188, - 188, 189, 190 + 0, 116, 117, 117, 118, 118, 118, 118, 118, 118, + 119, 120, 121, 121, 121, 121, 121, 122, 123, 124, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 125, 125, 125, 125, 125, 125, 126, 126, 127, 127, + 128, 128, 129, 129, 129, 129, 130, 130, 131, 131, + 131, 132, 133, 133, 134, 135, 135, 136, 136, 137, + 138, 138, 139, 140, 141, 142, 143, 144, 144, 145, + 146, 146, 147, 148, 149, 150, 150, 151, 152, 153, + 154, 154, 154, 155, 155, 156, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 156, 157, 157, 158, 158, + 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 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, 173, 174, 174, 175, 176, 176, + 177, 178, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 190, 191, 192, 193, 194, 195, 195, 196, + 196, 197, 198 }; const signed char @@ -4572,29 +4573,29 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yyrline_[] = { - 0, 250, 250, 251, 255, 257, 259, 261, 263, 265, - 270, 274, 279, 280, 281, 282, 283, 287, 292, 297, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 331, 332, 336, 337, - 341, 343, 348, 350, 352, 355, 359, 361, 366, 368, - 370, 375, 380, 382, 387, 392, 394, 399, 401, 406, - 411, 413, 418, 423, 428, 433, 438, 443, 445, 450, - 455, 457, 462, 467, 472, 477, 479, 484, 489, 494, - 499, 500, 501, 505, 506, 510, 512, 514, 516, 518, - 520, 522, 524, 526, 528, 530, 535, 537, 542, 544, - 549, 554, 556, 558, 560, 562, 564, 566, 568, 570, - 572, 574, 576, 578, 580, 582, 584, 586, 588, 593, - 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, - 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, - 614, 615, 616, 617, 618, 619, 620, 621, 622, 626, - 631, 636, 637, 640, 641, 645, 647, 649, 651, 653, - 655, 660, 662, 664, 666, 671, 676, 678, 681, 685, - 688, 692, 694, 699, 704, 709, 711, 716, 721, 723, - 728, 733, 738, 739, 740, 741, 742, 743, 744, 745, - 746, 750, 755, 760, 765, 770, 775, 780, 785, 790, - 795, 800, 802, 807, 812, 817, 822, 827, 829, 834, - 836, 841, 846 + 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, 334, 335, 339, 340, 344, 345, + 349, 351, 356, 358, 360, 363, 367, 369, 374, 376, + 378, 383, 388, 390, 395, 400, 402, 407, 409, 414, + 419, 421, 426, 431, 436, 441, 446, 451, 453, 458, + 463, 465, 470, 475, 480, 485, 487, 492, 497, 502, + 507, 508, 509, 513, 514, 518, 520, 522, 524, 526, + 528, 530, 532, 534, 536, 538, 543, 545, 550, 552, + 557, 562, 564, 566, 568, 570, 572, 574, 576, 578, + 580, 582, 584, 586, 588, 590, 592, 594, 596, 601, + 602, 603, 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, 634, + 639, 644, 645, 648, 649, 653, 655, 657, 659, 661, + 663, 668, 670, 672, 674, 679, 684, 686, 689, 693, + 696, 700, 702, 707, 712, 717, 719, 724, 729, 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, 820, 825, 830, 835, 837, 842, + 844, 849, 854 }; void @@ -4627,9 +4628,9 @@ namespace xsk { namespace gsc { namespace s4 { #line 13 "parser.ypp" } } } // xsk::gsc::s4 -#line 4631 "parser.cpp" +#line 4632 "parser.cpp" -#line 850 "parser.ypp" +#line 858 "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 70366dab..6f7717d9 100644 --- a/src/s4/xsk/parser.hpp +++ b/src/s4/xsk/parser.hpp @@ -683,111 +683,119 @@ namespace xsk { namespace gsc { namespace s4 { S4EOF = 0, // "end of file" S4error = 1, // error S4UNDEF = 2, // "invalid token" - DEVBEGIN = 3, // "/#" - DEVEND = 4, // "#/" - INLINE = 5, // "#inline" - INCLUDE = 6, // "#include" - USINGTREE = 7, // "#using_animtree" - ANIMTREE = 8, // "#animtree" - ENDON = 9, // "endon" - NOTIFY = 10, // "notify" - WAIT = 11, // "wait" - WAITTILL = 12, // "waittill" - WAITTILLMATCH = 13, // "waittillmatch" - WAITTILLFRAMEEND = 14, // "waittillframeend" - WAITFRAME = 15, // "waitframe" - IF = 16, // "if" - ELSE = 17, // "else" - DO = 18, // "do" - WHILE = 19, // "while" - FOR = 20, // "for" - FOREACH = 21, // "foreach" - IN = 22, // "in" - SWITCH = 23, // "switch" - CASE = 24, // "case" - DEFAULT = 25, // "default" - BREAK = 26, // "break" - CONTINUE = 27, // "continue" - RETURN = 28, // "return" - BREAKPOINT = 29, // "breakpoint" - PROFBEGIN = 30, // "prof_begin" - PROFEND = 31, // "prof_end" - THREAD = 32, // "thread" - CHILDTHREAD = 33, // "childthread" - THISTHREAD = 34, // "thisthread" - CALL = 35, // "call" - TRUE = 36, // "true" - FALSE = 37, // "false" - UNDEFINED = 38, // "undefined" - SIZE = 39, // ".size" - GAME = 40, // "game" - SELF = 41, // "self" - ANIM = 42, // "anim" - LEVEL = 43, // "level" - ISDEFINED = 44, // "isdefined" - ISTRUE = 45, // "istrue" - LPAREN = 46, // "(" - RPAREN = 47, // ")" - LBRACE = 48, // "{" - RBRACE = 49, // "}" - LBRACKET = 50, // "[" - RBRACKET = 51, // "]" - COMMA = 52, // "," - DOT = 53, // "." - DOUBLECOLON = 54, // "::" - COLON = 55, // ":" - SEMICOLON = 56, // ";" - QMARK = 57, // "?" - INCREMENT = 58, // "++" - DECREMENT = 59, // "--" - LSHIFT = 60, // "<<" - RSHIFT = 61, // ">>" - OR = 62, // "||" - AND = 63, // "&&" - EQUALITY = 64, // "==" - INEQUALITY = 65, // "!=" - LESS_EQUAL = 66, // "<=" - GREATER_EQUAL = 67, // ">=" - LESS = 68, // "<" - GREATER = 69, // ">" - NOT = 70, // "!" - COMPLEMENT = 71, // "~" - ASSIGN = 72, // "=" - ASSIGN_ADD = 73, // "+=" - ASSIGN_SUB = 74, // "-=" - ASSIGN_MUL = 75, // "*=" - ASSIGN_DIV = 76, // "/=" - ASSIGN_MOD = 77, // "%=" - ASSIGN_BW_OR = 78, // "|=" - ASSIGN_BW_AND = 79, // "&=" - ASSIGN_BW_EXOR = 80, // "^=" - ASSIGN_RSHIFT = 81, // ">>=" - ASSIGN_LSHIFT = 82, // "<<=" - BITWISE_OR = 83, // "|" - BITWISE_AND = 84, // "&" - BITWISE_EXOR = 85, // "^" - ADD = 86, // "+" - SUB = 87, // "-" - MUL = 88, // "*" - DIV = 89, // "/" - MOD = 90, // "%" - FIELD = 91, // "field" - PATH = 92, // "path" - IDENTIFIER = 93, // "identifier" - STRING = 94, // "string literal" - ISTRING = 95, // "localized string" - COLOR = 96, // "color" - FLOAT = 97, // "float" - INTEGER = 98, // "integer" - ADD_ARRAY = 99, // ADD_ARRAY - THEN = 100, // THEN - TERN = 101, // TERN - NEG = 102, // NEG - ANIMREF = 103, // ANIMREF - PREINC = 104, // PREINC - PREDEC = 105, // PREDEC - POSTINC = 106, // POSTINC - POSTDEC = 107 // POSTDEC + HSDEFINE = 3, // "#define" + HSUNDEF = 4, // "#undef" + HSIFDEF = 5, // "#ifdef" + HSIFNDEF = 6, // "#ifndef" + HSIF = 7, // "#if" + HSELIF = 8, // "#elif" + HSELSE = 9, // "#else" + HSENDIF = 10, // "#endif" + DEVBEGIN = 11, // "/#" + DEVEND = 12, // "#/" + INLINE = 13, // "#inline" + INCLUDE = 14, // "#include" + USINGTREE = 15, // "#using_animtree" + ANIMTREE = 16, // "#animtree" + ENDON = 17, // "endon" + NOTIFY = 18, // "notify" + WAIT = 19, // "wait" + WAITTILL = 20, // "waittill" + WAITTILLMATCH = 21, // "waittillmatch" + WAITTILLFRAMEEND = 22, // "waittillframeend" + WAITFRAME = 23, // "waitframe" + IF = 24, // "if" + ELSE = 25, // "else" + DO = 26, // "do" + WHILE = 27, // "while" + FOR = 28, // "for" + FOREACH = 29, // "foreach" + IN = 30, // "in" + SWITCH = 31, // "switch" + CASE = 32, // "case" + DEFAULT = 33, // "default" + BREAK = 34, // "break" + CONTINUE = 35, // "continue" + RETURN = 36, // "return" + BREAKPOINT = 37, // "breakpoint" + PROFBEGIN = 38, // "prof_begin" + PROFEND = 39, // "prof_end" + THREAD = 40, // "thread" + CHILDTHREAD = 41, // "childthread" + THISTHREAD = 42, // "thisthread" + CALL = 43, // "call" + TRUE = 44, // "true" + FALSE = 45, // "false" + UNDEFINED = 46, // "undefined" + SIZE = 47, // ".size" + GAME = 48, // "game" + SELF = 49, // "self" + ANIM = 50, // "anim" + LEVEL = 51, // "level" + ISDEFINED = 52, // "isdefined" + ISTRUE = 53, // "istrue" + LPAREN = 54, // "(" + RPAREN = 55, // ")" + LBRACE = 56, // "{" + RBRACE = 57, // "}" + LBRACKET = 58, // "[" + RBRACKET = 59, // "]" + COMMA = 60, // "," + DOT = 61, // "." + DOUBLECOLON = 62, // "::" + COLON = 63, // ":" + SEMICOLON = 64, // ";" + QMARK = 65, // "?" + INCREMENT = 66, // "++" + DECREMENT = 67, // "--" + LSHIFT = 68, // "<<" + RSHIFT = 69, // ">>" + OR = 70, // "||" + AND = 71, // "&&" + EQUALITY = 72, // "==" + INEQUALITY = 73, // "!=" + LESS_EQUAL = 74, // "<=" + GREATER_EQUAL = 75, // ">=" + LESS = 76, // "<" + GREATER = 77, // ">" + NOT = 78, // "!" + COMPLEMENT = 79, // "~" + ASSIGN = 80, // "=" + ASSIGN_ADD = 81, // "+=" + ASSIGN_SUB = 82, // "-=" + ASSIGN_MUL = 83, // "*=" + ASSIGN_DIV = 84, // "/=" + ASSIGN_MOD = 85, // "%=" + ASSIGN_BW_OR = 86, // "|=" + ASSIGN_BW_AND = 87, // "&=" + ASSIGN_BW_EXOR = 88, // "^=" + ASSIGN_RSHIFT = 89, // ">>=" + ASSIGN_LSHIFT = 90, // "<<=" + BITWISE_OR = 91, // "|" + BITWISE_AND = 92, // "&" + BITWISE_EXOR = 93, // "^" + ADD = 94, // "+" + SUB = 95, // "-" + MUL = 96, // "*" + DIV = 97, // "/" + MOD = 98, // "%" + FIELD = 99, // "field" + PATH = 100, // "path" + IDENTIFIER = 101, // "identifier" + STRING = 102, // "string literal" + ISTRING = 103, // "localized string" + COLOR = 104, // "color" + FLOAT = 105, // "float" + INTEGER = 106, // "integer" + ADD_ARRAY = 107, // ADD_ARRAY + THEN = 108, // THEN + TERN = 109, // TERN + NEG = 110, // NEG + ANIMREF = 111, // ANIMREF + PREINC = 112, // PREINC + PREDEC = 113, // PREDEC + POSTINC = 114, // POSTINC + POSTDEC = 115 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -804,199 +812,207 @@ namespace xsk { namespace gsc { namespace s4 { { enum symbol_kind_type { - YYNTOKENS = 108, ///< Number of tokens. + YYNTOKENS = 116, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error S_YYUNDEF = 2, // "invalid token" - S_DEVBEGIN = 3, // "/#" - S_DEVEND = 4, // "#/" - S_INLINE = 5, // "#inline" - S_INCLUDE = 6, // "#include" - S_USINGTREE = 7, // "#using_animtree" - S_ANIMTREE = 8, // "#animtree" - S_ENDON = 9, // "endon" - S_NOTIFY = 10, // "notify" - S_WAIT = 11, // "wait" - S_WAITTILL = 12, // "waittill" - S_WAITTILLMATCH = 13, // "waittillmatch" - S_WAITTILLFRAMEEND = 14, // "waittillframeend" - S_WAITFRAME = 15, // "waitframe" - S_IF = 16, // "if" - S_ELSE = 17, // "else" - S_DO = 18, // "do" - S_WHILE = 19, // "while" - S_FOR = 20, // "for" - S_FOREACH = 21, // "foreach" - S_IN = 22, // "in" - S_SWITCH = 23, // "switch" - S_CASE = 24, // "case" - S_DEFAULT = 25, // "default" - S_BREAK = 26, // "break" - S_CONTINUE = 27, // "continue" - S_RETURN = 28, // "return" - S_BREAKPOINT = 29, // "breakpoint" - S_PROFBEGIN = 30, // "prof_begin" - S_PROFEND = 31, // "prof_end" - S_THREAD = 32, // "thread" - S_CHILDTHREAD = 33, // "childthread" - S_THISTHREAD = 34, // "thisthread" - S_CALL = 35, // "call" - S_TRUE = 36, // "true" - S_FALSE = 37, // "false" - S_UNDEFINED = 38, // "undefined" - S_SIZE = 39, // ".size" - S_GAME = 40, // "game" - S_SELF = 41, // "self" - S_ANIM = 42, // "anim" - S_LEVEL = 43, // "level" - S_ISDEFINED = 44, // "isdefined" - S_ISTRUE = 45, // "istrue" - S_LPAREN = 46, // "(" - S_RPAREN = 47, // ")" - S_LBRACE = 48, // "{" - S_RBRACE = 49, // "}" - S_LBRACKET = 50, // "[" - S_RBRACKET = 51, // "]" - S_COMMA = 52, // "," - S_DOT = 53, // "." - S_DOUBLECOLON = 54, // "::" - S_COLON = 55, // ":" - S_SEMICOLON = 56, // ";" - S_QMARK = 57, // "?" - S_INCREMENT = 58, // "++" - S_DECREMENT = 59, // "--" - S_LSHIFT = 60, // "<<" - S_RSHIFT = 61, // ">>" - S_OR = 62, // "||" - S_AND = 63, // "&&" - S_EQUALITY = 64, // "==" - S_INEQUALITY = 65, // "!=" - S_LESS_EQUAL = 66, // "<=" - S_GREATER_EQUAL = 67, // ">=" - S_LESS = 68, // "<" - S_GREATER = 69, // ">" - S_NOT = 70, // "!" - S_COMPLEMENT = 71, // "~" - S_ASSIGN = 72, // "=" - S_ASSIGN_ADD = 73, // "+=" - S_ASSIGN_SUB = 74, // "-=" - S_ASSIGN_MUL = 75, // "*=" - S_ASSIGN_DIV = 76, // "/=" - S_ASSIGN_MOD = 77, // "%=" - S_ASSIGN_BW_OR = 78, // "|=" - S_ASSIGN_BW_AND = 79, // "&=" - S_ASSIGN_BW_EXOR = 80, // "^=" - S_ASSIGN_RSHIFT = 81, // ">>=" - S_ASSIGN_LSHIFT = 82, // "<<=" - S_BITWISE_OR = 83, // "|" - S_BITWISE_AND = 84, // "&" - S_BITWISE_EXOR = 85, // "^" - S_ADD = 86, // "+" - S_SUB = 87, // "-" - S_MUL = 88, // "*" - S_DIV = 89, // "/" - S_MOD = 90, // "%" - S_FIELD = 91, // "field" - S_PATH = 92, // "path" - S_IDENTIFIER = 93, // "identifier" - S_STRING = 94, // "string literal" - S_ISTRING = 95, // "localized string" - S_COLOR = 96, // "color" - S_FLOAT = 97, // "float" - S_INTEGER = 98, // "integer" - S_ADD_ARRAY = 99, // ADD_ARRAY - S_THEN = 100, // THEN - S_TERN = 101, // TERN - S_NEG = 102, // NEG - S_ANIMREF = 103, // ANIMREF - S_PREINC = 104, // PREINC - S_PREDEC = 105, // PREDEC - S_POSTINC = 106, // POSTINC - S_POSTDEC = 107, // POSTDEC - S_YYACCEPT = 108, // $accept - S_root = 109, // root - S_program = 110, // program - S_inline = 111, // inline - S_include = 112, // include - S_declaration = 113, // declaration - S_decl_usingtree = 114, // decl_usingtree - S_decl_constant = 115, // decl_constant - S_decl_thread = 116, // decl_thread - S_stmt = 117, // stmt - S_stmt_dev = 118, // stmt_dev - S_stmt_block = 119, // stmt_block - S_stmt_list = 120, // stmt_list - S_stmt_expr = 121, // stmt_expr - S_stmt_call = 122, // stmt_call - S_stmt_assign = 123, // stmt_assign - S_stmt_endon = 124, // stmt_endon - S_stmt_notify = 125, // stmt_notify - S_stmt_wait = 126, // stmt_wait - S_stmt_waittill = 127, // stmt_waittill - S_stmt_waittillmatch = 128, // stmt_waittillmatch - S_stmt_waittillframeend = 129, // stmt_waittillframeend - S_stmt_waitframe = 130, // stmt_waitframe - S_stmt_if = 131, // stmt_if - S_stmt_ifelse = 132, // stmt_ifelse - S_stmt_while = 133, // stmt_while - S_stmt_dowhile = 134, // stmt_dowhile - S_stmt_for = 135, // stmt_for - S_stmt_foreach = 136, // stmt_foreach - S_stmt_switch = 137, // stmt_switch - S_stmt_case = 138, // stmt_case - S_stmt_default = 139, // stmt_default - S_stmt_break = 140, // stmt_break - S_stmt_continue = 141, // stmt_continue - S_stmt_return = 142, // stmt_return - S_stmt_breakpoint = 143, // stmt_breakpoint - S_stmt_prof_begin = 144, // stmt_prof_begin - S_stmt_prof_end = 145, // stmt_prof_end - S_expr = 146, // expr - S_expr_or_empty = 147, // expr_or_empty - S_expr_assign = 148, // expr_assign - S_expr_increment = 149, // expr_increment - S_expr_decrement = 150, // expr_decrement - S_expr_ternary = 151, // expr_ternary - S_expr_binary = 152, // expr_binary - S_expr_primitive = 153, // expr_primitive - S_expr_complement = 154, // expr_complement - S_expr_not = 155, // expr_not - S_expr_call = 156, // expr_call - S_expr_method = 157, // expr_method - S_expr_function = 158, // expr_function - S_expr_pointer = 159, // expr_pointer - S_expr_add_array = 160, // expr_add_array - S_expr_parameters = 161, // expr_parameters - S_expr_arguments = 162, // expr_arguments - S_expr_arguments_no_empty = 163, // expr_arguments_no_empty - S_expr_isdefined = 164, // expr_isdefined - S_expr_istrue = 165, // expr_istrue - S_expr_reference = 166, // expr_reference - S_expr_array = 167, // expr_array - S_expr_field = 168, // expr_field - S_expr_size = 169, // expr_size - S_expr_paren = 170, // expr_paren - S_expr_object = 171, // expr_object - S_expr_thisthread = 172, // expr_thisthread - S_expr_empty_array = 173, // expr_empty_array - S_expr_undefined = 174, // expr_undefined - S_expr_game = 175, // expr_game - S_expr_self = 176, // expr_self - S_expr_anim = 177, // expr_anim - S_expr_level = 178, // expr_level - S_expr_animation = 179, // expr_animation - S_expr_animtree = 180, // expr_animtree - S_expr_identifier = 181, // expr_identifier - S_expr_path = 182, // expr_path - S_expr_istring = 183, // expr_istring - S_expr_string = 184, // expr_string - S_expr_color = 185, // expr_color - S_expr_vector = 186, // expr_vector - S_expr_float = 187, // expr_float - S_expr_integer = 188, // expr_integer - S_expr_false = 189, // expr_false - S_expr_true = 190 // expr_true + S_HSDEFINE = 3, // "#define" + S_HSUNDEF = 4, // "#undef" + S_HSIFDEF = 5, // "#ifdef" + S_HSIFNDEF = 6, // "#ifndef" + S_HSIF = 7, // "#if" + S_HSELIF = 8, // "#elif" + S_HSELSE = 9, // "#else" + S_HSENDIF = 10, // "#endif" + S_DEVBEGIN = 11, // "/#" + S_DEVEND = 12, // "#/" + S_INLINE = 13, // "#inline" + S_INCLUDE = 14, // "#include" + S_USINGTREE = 15, // "#using_animtree" + S_ANIMTREE = 16, // "#animtree" + S_ENDON = 17, // "endon" + S_NOTIFY = 18, // "notify" + S_WAIT = 19, // "wait" + S_WAITTILL = 20, // "waittill" + S_WAITTILLMATCH = 21, // "waittillmatch" + S_WAITTILLFRAMEEND = 22, // "waittillframeend" + S_WAITFRAME = 23, // "waitframe" + S_IF = 24, // "if" + S_ELSE = 25, // "else" + S_DO = 26, // "do" + S_WHILE = 27, // "while" + S_FOR = 28, // "for" + S_FOREACH = 29, // "foreach" + S_IN = 30, // "in" + S_SWITCH = 31, // "switch" + S_CASE = 32, // "case" + S_DEFAULT = 33, // "default" + S_BREAK = 34, // "break" + S_CONTINUE = 35, // "continue" + S_RETURN = 36, // "return" + S_BREAKPOINT = 37, // "breakpoint" + S_PROFBEGIN = 38, // "prof_begin" + S_PROFEND = 39, // "prof_end" + S_THREAD = 40, // "thread" + S_CHILDTHREAD = 41, // "childthread" + S_THISTHREAD = 42, // "thisthread" + S_CALL = 43, // "call" + S_TRUE = 44, // "true" + S_FALSE = 45, // "false" + S_UNDEFINED = 46, // "undefined" + S_SIZE = 47, // ".size" + S_GAME = 48, // "game" + S_SELF = 49, // "self" + S_ANIM = 50, // "anim" + S_LEVEL = 51, // "level" + S_ISDEFINED = 52, // "isdefined" + S_ISTRUE = 53, // "istrue" + S_LPAREN = 54, // "(" + S_RPAREN = 55, // ")" + S_LBRACE = 56, // "{" + S_RBRACE = 57, // "}" + S_LBRACKET = 58, // "[" + S_RBRACKET = 59, // "]" + S_COMMA = 60, // "," + S_DOT = 61, // "." + S_DOUBLECOLON = 62, // "::" + S_COLON = 63, // ":" + S_SEMICOLON = 64, // ";" + S_QMARK = 65, // "?" + S_INCREMENT = 66, // "++" + S_DECREMENT = 67, // "--" + S_LSHIFT = 68, // "<<" + S_RSHIFT = 69, // ">>" + S_OR = 70, // "||" + S_AND = 71, // "&&" + S_EQUALITY = 72, // "==" + S_INEQUALITY = 73, // "!=" + S_LESS_EQUAL = 74, // "<=" + S_GREATER_EQUAL = 75, // ">=" + S_LESS = 76, // "<" + S_GREATER = 77, // ">" + S_NOT = 78, // "!" + S_COMPLEMENT = 79, // "~" + S_ASSIGN = 80, // "=" + S_ASSIGN_ADD = 81, // "+=" + S_ASSIGN_SUB = 82, // "-=" + S_ASSIGN_MUL = 83, // "*=" + S_ASSIGN_DIV = 84, // "/=" + S_ASSIGN_MOD = 85, // "%=" + S_ASSIGN_BW_OR = 86, // "|=" + S_ASSIGN_BW_AND = 87, // "&=" + S_ASSIGN_BW_EXOR = 88, // "^=" + S_ASSIGN_RSHIFT = 89, // ">>=" + S_ASSIGN_LSHIFT = 90, // "<<=" + S_BITWISE_OR = 91, // "|" + S_BITWISE_AND = 92, // "&" + S_BITWISE_EXOR = 93, // "^" + S_ADD = 94, // "+" + S_SUB = 95, // "-" + S_MUL = 96, // "*" + S_DIV = 97, // "/" + S_MOD = 98, // "%" + S_FIELD = 99, // "field" + S_PATH = 100, // "path" + S_IDENTIFIER = 101, // "identifier" + S_STRING = 102, // "string literal" + S_ISTRING = 103, // "localized string" + S_COLOR = 104, // "color" + S_FLOAT = 105, // "float" + S_INTEGER = 106, // "integer" + S_ADD_ARRAY = 107, // ADD_ARRAY + S_THEN = 108, // THEN + S_TERN = 109, // TERN + S_NEG = 110, // NEG + S_ANIMREF = 111, // ANIMREF + S_PREINC = 112, // PREINC + S_PREDEC = 113, // PREDEC + S_POSTINC = 114, // POSTINC + S_POSTDEC = 115, // POSTDEC + S_YYACCEPT = 116, // $accept + S_root = 117, // root + S_program = 118, // program + S_inline = 119, // inline + S_include = 120, // include + S_declaration = 121, // declaration + S_decl_usingtree = 122, // decl_usingtree + S_decl_constant = 123, // decl_constant + S_decl_thread = 124, // decl_thread + S_stmt = 125, // stmt + S_stmt_dev = 126, // stmt_dev + S_stmt_block = 127, // stmt_block + S_stmt_list = 128, // stmt_list + S_stmt_expr = 129, // stmt_expr + S_stmt_call = 130, // stmt_call + S_stmt_assign = 131, // stmt_assign + S_stmt_endon = 132, // stmt_endon + S_stmt_notify = 133, // stmt_notify + S_stmt_wait = 134, // stmt_wait + S_stmt_waittill = 135, // stmt_waittill + S_stmt_waittillmatch = 136, // stmt_waittillmatch + S_stmt_waittillframeend = 137, // stmt_waittillframeend + S_stmt_waitframe = 138, // stmt_waitframe + S_stmt_if = 139, // stmt_if + S_stmt_ifelse = 140, // stmt_ifelse + S_stmt_while = 141, // stmt_while + S_stmt_dowhile = 142, // stmt_dowhile + S_stmt_for = 143, // stmt_for + S_stmt_foreach = 144, // stmt_foreach + S_stmt_switch = 145, // stmt_switch + S_stmt_case = 146, // stmt_case + S_stmt_default = 147, // stmt_default + S_stmt_break = 148, // stmt_break + S_stmt_continue = 149, // stmt_continue + S_stmt_return = 150, // stmt_return + S_stmt_breakpoint = 151, // stmt_breakpoint + S_stmt_prof_begin = 152, // stmt_prof_begin + S_stmt_prof_end = 153, // stmt_prof_end + S_expr = 154, // expr + S_expr_or_empty = 155, // expr_or_empty + S_expr_assign = 156, // expr_assign + S_expr_increment = 157, // expr_increment + S_expr_decrement = 158, // expr_decrement + S_expr_ternary = 159, // expr_ternary + S_expr_binary = 160, // expr_binary + S_expr_primitive = 161, // expr_primitive + S_expr_complement = 162, // expr_complement + S_expr_not = 163, // expr_not + S_expr_call = 164, // expr_call + S_expr_method = 165, // expr_method + S_expr_function = 166, // expr_function + S_expr_pointer = 167, // expr_pointer + S_expr_add_array = 168, // expr_add_array + S_expr_parameters = 169, // expr_parameters + S_expr_arguments = 170, // expr_arguments + S_expr_arguments_no_empty = 171, // expr_arguments_no_empty + S_expr_isdefined = 172, // expr_isdefined + S_expr_istrue = 173, // expr_istrue + S_expr_reference = 174, // expr_reference + S_expr_array = 175, // expr_array + S_expr_field = 176, // expr_field + S_expr_size = 177, // expr_size + S_expr_paren = 178, // expr_paren + S_expr_object = 179, // expr_object + S_expr_thisthread = 180, // expr_thisthread + S_expr_empty_array = 181, // expr_empty_array + S_expr_undefined = 182, // expr_undefined + S_expr_game = 183, // expr_game + S_expr_self = 184, // expr_self + S_expr_anim = 185, // expr_anim + S_expr_level = 186, // expr_level + S_expr_animation = 187, // expr_animation + S_expr_animtree = 188, // expr_animtree + 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_color = 193, // expr_color + S_expr_vector = 194, // expr_vector + S_expr_float = 195, // expr_float + S_expr_integer = 196, // expr_integer + S_expr_false = 197, // expr_false + S_expr_true = 198 // expr_true }; }; @@ -2835,6 +2851,126 @@ switch (yykind) return symbol_type (token::S4UNDEF, l); } #endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSDEFINE (location_type l) + { + return symbol_type (token::HSDEFINE, std::move (l)); + } +#else + static + symbol_type + make_HSDEFINE (const location_type& l) + { + return symbol_type (token::HSDEFINE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSUNDEF (location_type l) + { + return symbol_type (token::HSUNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSUNDEF (const location_type& l) + { + return symbol_type (token::HSUNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFDEF (location_type l) + { + return symbol_type (token::HSIFDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFDEF (const location_type& l) + { + return symbol_type (token::HSIFDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIFNDEF (location_type l) + { + return symbol_type (token::HSIFNDEF, std::move (l)); + } +#else + static + symbol_type + make_HSIFNDEF (const location_type& l) + { + return symbol_type (token::HSIFNDEF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSIF (location_type l) + { + return symbol_type (token::HSIF, std::move (l)); + } +#else + static + symbol_type + make_HSIF (const location_type& l) + { + return symbol_type (token::HSIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELIF (location_type l) + { + return symbol_type (token::HSELIF, std::move (l)); + } +#else + static + symbol_type + make_HSELIF (const location_type& l) + { + return symbol_type (token::HSELIF, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSELSE (location_type l) + { + return symbol_type (token::HSELSE, std::move (l)); + } +#else + static + symbol_type + make_HSELSE (const location_type& l) + { + return symbol_type (token::HSELSE, l); + } +#endif +#if 201103L <= YY_CPLUSPLUS + static + symbol_type + make_HSENDIF (location_type l) + { + return symbol_type (token::HSENDIF, std::move (l)); + } +#else + static + symbol_type + make_HSENDIF (const location_type& l) + { + return symbol_type (token::HSENDIF, l); + } +#endif #if 201103L <= YY_CPLUSPLUS static symbol_type @@ -5464,7 +5600,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s4 -#line 5468 "parser.hpp" +#line 5604 "parser.hpp"