From 9c8a67ff46377387ad1df143a349c54d1837fe6c Mon Sep 17 00:00:00 2001 From: xensik Date: Wed, 19 Jan 2022 20:01:12 +0100 Subject: [PATCH] reduce memory usage and cleanup code --- .gitignore | 2 +- README.md | 8 +- deps/zlib.lua | 4 +- gen/h1/lexer.lpp | 116 +- gen/h1/parser.ypp | 17 +- gen/h2/lexer.lpp | 116 +- gen/h2/parser.ypp | 17 +- gen/iw5/lexer.lpp | 116 +- gen/iw5/parser.ypp | 17 +- gen/iw6/lexer.lpp | 116 +- gen/iw6/parser.ypp | 17 +- gen/iw7/lexer.lpp | 116 +- gen/iw7/parser.ypp | 17 +- gen/iw8/lexer.lpp | 120 +- gen/iw8/parser.ypp | 17 +- gen/s1/lexer.lpp | 116 +- gen/s1/parser.ypp | 17 +- gen/s2/lexer.lpp | 116 +- gen/s2/parser.ypp | 17 +- gen/s4/lexer.lpp | 120 +- gen/s4/parser.ypp | 17 +- premake5.lua | 2 +- src/h1/stdafx.hpp | 1 + src/h1/xsk/assembler.cpp | 137 +- src/h1/xsk/assembler.hpp | 4 +- src/h1/xsk/compiler.cpp | 68 +- src/h1/xsk/compiler.hpp | 2 +- src/h1/xsk/decompiler.cpp | 122 +- src/h1/xsk/disassembler.cpp | 265 +- src/h1/xsk/disassembler.hpp | 4 +- src/h1/xsk/h1.hpp | 2 + src/h1/xsk/lexer.cpp | 383 +- src/h1/xsk/lexer.hpp | 2 +- src/h1/xsk/parser.cpp | 2196 +++-- src/h1/xsk/parser.hpp | 294 +- src/h1/xsk/resolver.cpp | 8335 ++++++++++++++++++- src/h1/xsk/resolver.hpp | 2 + src/h2/stdafx.hpp | 1 + src/h2/xsk/assembler.cpp | 137 +- src/h2/xsk/assembler.hpp | 4 +- src/h2/xsk/compiler.cpp | 68 +- src/h2/xsk/compiler.hpp | 2 +- src/h2/xsk/decompiler.cpp | 122 +- src/h2/xsk/disassembler.cpp | 239 +- src/h2/xsk/disassembler.hpp | 4 +- src/h2/xsk/h2.hpp | 2 + src/h2/xsk/lexer.cpp | 383 +- src/h2/xsk/lexer.hpp | 2 +- src/h2/xsk/parser.cpp | 2196 +++-- src/h2/xsk/parser.hpp | 294 +- src/h2/xsk/resolver.cpp | 427 +- src/h2/xsk/resolver.hpp | 2 + src/iw5/stdafx.hpp | 1 + src/iw5/xsk/assembler.cpp | 135 +- src/iw5/xsk/assembler.hpp | 4 +- src/iw5/xsk/compiler.cpp | 80 +- src/iw5/xsk/compiler.hpp | 2 +- src/iw5/xsk/decompiler.cpp | 122 +- src/iw5/xsk/disassembler.cpp | 240 +- src/iw5/xsk/disassembler.hpp | 4 +- src/iw5/xsk/iw5.hpp | 2 + src/iw5/xsk/lexer.cpp | 381 +- src/iw5/xsk/lexer.hpp | 2 +- src/iw5/xsk/parser.cpp | 2155 +++-- src/iw5/xsk/parser.hpp | 292 +- src/iw5/xsk/resolver.cpp | 475 +- src/iw5/xsk/resolver.hpp | 2 + src/iw6/stdafx.hpp | 1 + src/iw6/xsk/assembler.cpp | 137 +- src/iw6/xsk/assembler.hpp | 4 +- src/iw6/xsk/compiler.cpp | 68 +- src/iw6/xsk/compiler.hpp | 2 +- src/iw6/xsk/decompiler.cpp | 122 +- src/iw6/xsk/disassembler.cpp | 269 +- src/iw6/xsk/disassembler.hpp | 4 +- src/iw6/xsk/iw6.hpp | 2 + src/iw6/xsk/lexer.cpp | 381 +- src/iw6/xsk/lexer.hpp | 2 +- src/iw6/xsk/parser.cpp | 2155 +++-- src/iw6/xsk/parser.hpp | 292 +- src/iw6/xsk/resolver.cpp | 448 +- src/iw6/xsk/resolver.hpp | 2 + src/iw7/stdafx.hpp | 1 + src/iw7/xsk/assembler.cpp | 137 +- src/iw7/xsk/assembler.hpp | 4 +- src/iw7/xsk/compiler.cpp | 68 +- src/iw7/xsk/compiler.hpp | 2 +- src/iw7/xsk/decompiler.cpp | 122 +- src/iw7/xsk/disassembler.cpp | 269 +- src/iw7/xsk/disassembler.hpp | 4 +- src/iw7/xsk/iw7.hpp | 2 + src/iw7/xsk/lexer.cpp | 381 +- src/iw7/xsk/lexer.hpp | 2 +- src/iw7/xsk/parser.cpp | 2155 +++-- src/iw7/xsk/parser.hpp | 292 +- src/iw7/xsk/resolver.cpp | 424 +- src/iw7/xsk/resolver.hpp | 2 + src/iw8/stdafx.hpp | 1 + src/iw8/xsk/assembler.cpp | 229 +- src/iw8/xsk/assembler.hpp | 6 +- src/iw8/xsk/compiler.cpp | 70 +- src/iw8/xsk/compiler.hpp | 2 +- src/iw8/xsk/decompiler.cpp | 122 +- src/iw8/xsk/disassembler.cpp | 267 +- src/iw8/xsk/disassembler.hpp | 6 +- src/iw8/xsk/iw8.hpp | 2 + src/iw8/xsk/lexer.cpp | 385 +- src/iw8/xsk/lexer.hpp | 2 +- src/iw8/xsk/parser.cpp | 2155 +++-- src/iw8/xsk/parser.hpp | 296 +- src/iw8/xsk/resolver.cpp | 490 +- src/iw8/xsk/resolver.hpp | 2 + src/s1/stdafx.hpp | 1 + src/s1/xsk/assembler.cpp | 137 +- src/s1/xsk/assembler.hpp | 4 +- src/s1/xsk/compiler.cpp | 68 +- src/s1/xsk/compiler.hpp | 2 +- src/s1/xsk/decompiler.cpp | 122 +- src/s1/xsk/disassembler.cpp | 265 +- src/s1/xsk/disassembler.hpp | 4 +- src/s1/xsk/lexer.cpp | 383 +- src/s1/xsk/lexer.hpp | 2 +- src/s1/xsk/parser.cpp | 2196 +++-- src/s1/xsk/parser.hpp | 294 +- src/s1/xsk/resolver.cpp | 428 +- src/s1/xsk/resolver.hpp | 2 + src/s1/xsk/s1.hpp | 2 + src/s2/stdafx.hpp | 1 + src/s2/xsk/assembler.cpp | 137 +- src/s2/xsk/assembler.hpp | 4 +- src/s2/xsk/compiler.cpp | 68 +- src/s2/xsk/compiler.hpp | 2 +- src/s2/xsk/decompiler.cpp | 120 +- src/s2/xsk/disassembler.cpp | 265 +- src/s2/xsk/disassembler.hpp | 4 +- src/s2/xsk/lexer.cpp | 383 +- src/s2/xsk/lexer.hpp | 2 +- src/s2/xsk/parser.cpp | 2196 +++-- src/s2/xsk/parser.hpp | 294 +- src/s2/xsk/resolver.cpp | 428 +- src/s2/xsk/resolver.hpp | 2 + src/s2/xsk/s2.hpp | 2 + src/s4/stdafx.hpp | 1 + src/s4/xsk/assembler.cpp | 229 +- src/s4/xsk/assembler.hpp | 6 +- src/s4/xsk/compiler.cpp | 70 +- src/s4/xsk/compiler.hpp | 2 +- src/s4/xsk/decompiler.cpp | 122 +- src/s4/xsk/disassembler.cpp | 295 +- src/s4/xsk/disassembler.hpp | 6 +- src/s4/xsk/lexer.cpp | 385 +- src/s4/xsk/lexer.hpp | 2 +- src/s4/xsk/parser.cpp | 2155 +++-- src/s4/xsk/parser.hpp | 296 +- src/s4/xsk/resolver.cpp | 498 +- src/s4/xsk/resolver.hpp | 2 + src/s4/xsk/s4.hpp | 2 + src/tool/xsk/main.cpp | 32 +- src/utils/xsk/gsc/asset.cpp | 2 +- src/utils/xsk/gsc/block.cpp | 8 +- src/utils/xsk/gsc/block.hpp | 2 +- src/utils/xsk/gsc/interfaces/decompiler.hpp | 2 +- src/utils/xsk/gsc/nodetree.cpp | 20 +- src/utils/xsk/gsc/nodetree.hpp | 2 +- src/utils/xsk/gsc/types.hpp | 22 +- src/utils/xsk/utils/byte_buffer.cpp | 2 +- src/utils/xsk/utils/compression.cpp | 4 +- 167 files changed, 25818 insertions(+), 18774 deletions(-) diff --git a/.gitignore b/.gitignore index 395c044..20c8ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -62,7 +62,7 @@ build # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* - + *_i.c *_p.c *_i.h diff --git a/README.md b/README.md index e4cc1b6..c17c4f5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![GitHub release (latest by date)](https://img.shields.io/github/v/release/xensik/gsc-tool)](https://github.com/xensik/gsc-tool/releases) # GSC Tool A utility to compile & decompile IW engine game scripts. -## Supported Games +## Supported Games - **IW5** *(Call of Duty: Modern Warfare 3)* - **IW6** *(Call of Duty: Ghosts)* - **IW7** *(Call of Duty: Infinite Warfare)* @@ -20,11 +20,11 @@ A utility to compile & decompile IW engine game scripts. ## Usage ``./gsc-tool.exe `` -**modes**: `asm`, `disasm`, `comp`, `decomp` +**modes**: `asm`, `disasm`, `comp`, `decomp` -**games**: `iw5`, `iw6`, `iw7`, `iw8`, `s1`, `s2`, `s4`, `h1`, `h2` +**games**: `iw5`, `iw6`, `iw7`, `iw8`, `s1`, `s2`, `s4`, `h1`, `h2` -**paths**: `file`, `directory` (recursive process all files with mode extension) +**paths**: `file`, `directory` (recursive process all files with mode extension) for zonetool files (*.cgsc*, *.cgsc.stack*) use: `zasm`, `zdisasm`, `zcomp`, `zdecomp` diff --git a/deps/zlib.lua b/deps/zlib.lua index 9bba772..c2edca2 100644 --- a/deps/zlib.lua +++ b/deps/zlib.lua @@ -18,11 +18,11 @@ function zlib:project() self:include() files - { + { path.join(zlib.base, "*.h"), path.join(zlib.base, "*.c") } - + defines { "_CRT_SECURE_NO_WARNINGS", diff --git a/gen/h1/lexer.lpp b/gen/h1/lexer.lpp index c43ff1e..0580b0d 100644 --- a/gen/h1/lexer.lpp +++ b/gen/h1/lexer.lpp @@ -28,7 +28,8 @@ void h1_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -153,16 +154,17 @@ RGX_DEFAULT (.|\n) \| { return h1::parser::make_BITWISE_OR(ctx->loc); } \& { return h1::parser::make_BITWISE_AND(ctx->loc); } \^ { return h1::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return h1::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return h1::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return h1::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return h1::parser::make_PATH(xsk::gsc::h1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return h1::parser::make_IDENTIFIER(xsk::gsc::h1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return h1::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return h1::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return h1::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return h1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return h1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return h1::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return h1::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return h1::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return h1::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return h1::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return h1::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return h1::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return h1::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return h1::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) h1_pop_header(ctx); else return h1::parser::make_H1EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw h1::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -170,60 +172,60 @@ RGX_DEFAULT (.|\n) void h1_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -231,8 +233,8 @@ void h1_push_header(xsk::gsc::context* ctx, const std::string& file) void h1_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/h1/parser.ypp b/gen/h1/parser.ypp index e67e7d4..97b1481 100644 --- a/gen/h1/parser.ypp +++ b/gen/h1/parser.ypp @@ -137,10 +137,7 @@ xsk::gsc::h1::parser::symbol_type H1lex(yyscan_t yyscanner, xsk::gsc::context* c %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -468,7 +465,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -821,15 +818,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/h2/lexer.lpp b/gen/h2/lexer.lpp index c8b70bd..43c8ef9 100644 --- a/gen/h2/lexer.lpp +++ b/gen/h2/lexer.lpp @@ -28,7 +28,8 @@ void h2_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -153,16 +154,17 @@ RGX_DEFAULT (.|\n) \| { return h2::parser::make_BITWISE_OR(ctx->loc); } \& { return h2::parser::make_BITWISE_AND(ctx->loc); } \^ { return h2::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return h2::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return h2::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return h2::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return h2::parser::make_PATH(xsk::gsc::h2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return h2::parser::make_IDENTIFIER(xsk::gsc::h2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return h2::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return h2::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return h2::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return h2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return h2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return h2::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return h2::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return h2::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return h2::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return h2::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return h2::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return h2::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return h2::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return h2::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) h2_pop_header(ctx); else return h2::parser::make_H2EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw h2::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -170,60 +172,60 @@ RGX_DEFAULT (.|\n) void h2_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -231,8 +233,8 @@ void h2_push_header(xsk::gsc::context* ctx, const std::string& file) void h2_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/h2/parser.ypp b/gen/h2/parser.ypp index 3f66a29..a31df17 100644 --- a/gen/h2/parser.ypp +++ b/gen/h2/parser.ypp @@ -137,10 +137,7 @@ xsk::gsc::h2::parser::symbol_type H2lex(yyscan_t yyscanner, xsk::gsc::context* c %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -468,7 +465,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -821,15 +818,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/iw5/lexer.lpp b/gen/iw5/lexer.lpp index a60643d..b62bee8 100644 --- a/gen/iw5/lexer.lpp +++ b/gen/iw5/lexer.lpp @@ -28,7 +28,8 @@ void iw5_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -152,16 +153,17 @@ RGX_DEFAULT (.|\n) \| { return iw5::parser::make_BITWISE_OR(ctx->loc); } \& { return iw5::parser::make_BITWISE_AND(ctx->loc); } \^ { return iw5::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return iw5::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return iw5::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return iw5::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return iw5::parser::make_PATH(xsk::gsc::iw5::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return iw5::parser::make_IDENTIFIER(xsk::gsc::iw5::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return iw5::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return iw5::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return iw5::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return iw5::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return iw5::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return iw5::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return iw5::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return iw5::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return iw5::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return iw5::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return iw5::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return iw5::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return iw5::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return iw5::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) iw5_pop_header(ctx); else return iw5::parser::make_IW5EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw iw5::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -169,60 +171,60 @@ RGX_DEFAULT (.|\n) void iw5_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -230,8 +232,8 @@ void iw5_push_header(xsk::gsc::context* ctx, const std::string& file) void iw5_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/iw5/parser.ypp b/gen/iw5/parser.ypp index f7f1224..e7e02f0 100644 --- a/gen/iw5/parser.ypp +++ b/gen/iw5/parser.ypp @@ -136,10 +136,7 @@ xsk::gsc::iw5::parser::symbol_type IW5lex(yyscan_t yyscanner, xsk::gsc::context* %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -458,7 +455,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -811,15 +808,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/iw6/lexer.lpp b/gen/iw6/lexer.lpp index afbf91a..dd1e206 100644 --- a/gen/iw6/lexer.lpp +++ b/gen/iw6/lexer.lpp @@ -28,7 +28,8 @@ void iw6_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -152,16 +153,17 @@ RGX_DEFAULT (.|\n) \| { return iw6::parser::make_BITWISE_OR(ctx->loc); } \& { return iw6::parser::make_BITWISE_AND(ctx->loc); } \^ { return iw6::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return iw6::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return iw6::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return iw6::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return iw6::parser::make_PATH(xsk::gsc::iw6::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return iw6::parser::make_IDENTIFIER(xsk::gsc::iw6::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return iw6::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return iw6::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return iw6::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return iw6::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return iw6::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return iw6::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return iw6::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return iw6::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return iw6::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return iw6::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return iw6::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return iw6::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return iw6::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return iw6::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) iw6_pop_header(ctx); else return iw6::parser::make_IW6EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw iw6::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -169,60 +171,60 @@ RGX_DEFAULT (.|\n) void iw6_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -230,8 +232,8 @@ void iw6_push_header(xsk::gsc::context* ctx, const std::string& file) void iw6_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/iw6/parser.ypp b/gen/iw6/parser.ypp index 93ed7b2..f4286d3 100644 --- a/gen/iw6/parser.ypp +++ b/gen/iw6/parser.ypp @@ -136,10 +136,7 @@ xsk::gsc::iw6::parser::symbol_type IW6lex(yyscan_t yyscanner, xsk::gsc::context* %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -458,7 +455,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -811,15 +808,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/iw7/lexer.lpp b/gen/iw7/lexer.lpp index b80544a..fdcc2a6 100644 --- a/gen/iw7/lexer.lpp +++ b/gen/iw7/lexer.lpp @@ -28,7 +28,8 @@ void iw7_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -152,16 +153,17 @@ RGX_DEFAULT (.|\n) \| { return iw7::parser::make_BITWISE_OR(ctx->loc); } \& { return iw7::parser::make_BITWISE_AND(ctx->loc); } \^ { return iw7::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return iw7::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return iw7::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return iw7::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return iw7::parser::make_PATH(xsk::gsc::iw7::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return iw7::parser::make_IDENTIFIER(xsk::gsc::iw7::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return iw7::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return iw7::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return iw7::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return iw7::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return iw7::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return iw7::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return iw7::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return iw7::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return iw7::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return iw7::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return iw7::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return iw7::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return iw7::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return iw7::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) iw7_pop_header(ctx); else return iw7::parser::make_IW7EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw iw7::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -169,60 +171,60 @@ RGX_DEFAULT (.|\n) void iw7_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -230,8 +232,8 @@ void iw7_push_header(xsk::gsc::context* ctx, const std::string& file) void iw7_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/iw7/parser.ypp b/gen/iw7/parser.ypp index ee4b169..595e0e5 100644 --- a/gen/iw7/parser.ypp +++ b/gen/iw7/parser.ypp @@ -136,10 +136,7 @@ xsk::gsc::iw7::parser::symbol_type IW7lex(yyscan_t yyscanner, xsk::gsc::context* %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -458,7 +455,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -811,15 +808,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/iw8/lexer.lpp b/gen/iw8/lexer.lpp index b1b8dcd..a606d53 100644 --- a/gen/iw8/lexer.lpp +++ b/gen/iw8/lexer.lpp @@ -28,7 +28,8 @@ void iw8_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -108,8 +109,8 @@ RGX_DEFAULT (.|\n) "self" { return iw8::parser::make_SELF(ctx->loc); } "anim" { return iw8::parser::make_ANIM(ctx->loc); } "level" { return iw8::parser::make_LEVEL(ctx->loc); } -(?i:isdefined) { return iw8::parser::make_ISDEFINED(ctx->loc); } -(?i:istrue) { return iw8::parser::make_ISTRUE(ctx->loc); } +(?i:isdefined) { return iw8::parser::make_ISDEFINED(ctx->loc); } +(?i:istrue) { return iw8::parser::make_ISTRUE(ctx->loc); } \( { return iw8::parser::make_LPAREN(ctx->loc); } \) { return iw8::parser::make_RPAREN(ctx->loc); } \{ { return iw8::parser::make_LBRACE(ctx->loc); } @@ -155,16 +156,17 @@ RGX_DEFAULT (.|\n) \| { return iw8::parser::make_BITWISE_OR(ctx->loc); } \& { return iw8::parser::make_BITWISE_AND(ctx->loc); } \^ { return iw8::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return iw8::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return iw8::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return iw8::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return iw8::parser::make_PATH(xsk::gsc::iw8::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return iw8::parser::make_IDENTIFIER(xsk::gsc::iw8::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return iw8::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return iw8::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return iw8::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return iw8::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return iw8::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return iw8::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return iw8::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return iw8::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return iw8::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return iw8::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return iw8::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return iw8::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return iw8::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return iw8::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) iw8_pop_header(ctx); else return iw8::parser::make_IW8EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw iw8::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -172,60 +174,60 @@ RGX_DEFAULT (.|\n) void iw8_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -233,8 +235,8 @@ void iw8_push_header(xsk::gsc::context* ctx, const std::string& file) void iw8_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/iw8/parser.ypp b/gen/iw8/parser.ypp index 9ac91fb..3581999 100644 --- a/gen/iw8/parser.ypp +++ b/gen/iw8/parser.ypp @@ -139,10 +139,7 @@ xsk::gsc::iw8::parser::symbol_type IW8lex(yyscan_t yyscanner, xsk::gsc::context* %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -472,7 +469,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -837,15 +834,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/s1/lexer.lpp b/gen/s1/lexer.lpp index 3c9fc46..0e95406 100644 --- a/gen/s1/lexer.lpp +++ b/gen/s1/lexer.lpp @@ -28,7 +28,8 @@ void s1_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -153,16 +154,17 @@ RGX_DEFAULT (.|\n) \| { return s1::parser::make_BITWISE_OR(ctx->loc); } \& { return s1::parser::make_BITWISE_AND(ctx->loc); } \^ { return s1::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return s1::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return s1::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return s1::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return s1::parser::make_PATH(xsk::gsc::s1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return s1::parser::make_IDENTIFIER(xsk::gsc::s1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return s1::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return s1::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return s1::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return s1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return s1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return s1::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return s1::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return s1::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return s1::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return s1::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return s1::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return s1::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return s1::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return s1::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) s1_pop_header(ctx); else return s1::parser::make_S1EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw s1::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -170,60 +172,60 @@ RGX_DEFAULT (.|\n) void s1_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -231,8 +233,8 @@ void s1_push_header(xsk::gsc::context* ctx, const std::string& file) void s1_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/s1/parser.ypp b/gen/s1/parser.ypp index 413ca94..b760102 100644 --- a/gen/s1/parser.ypp +++ b/gen/s1/parser.ypp @@ -137,10 +137,7 @@ xsk::gsc::s1::parser::symbol_type S1lex(yyscan_t yyscanner, xsk::gsc::context* c %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -468,7 +465,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -821,15 +818,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/s2/lexer.lpp b/gen/s2/lexer.lpp index 16e5650..37e6010 100644 --- a/gen/s2/lexer.lpp +++ b/gen/s2/lexer.lpp @@ -28,7 +28,8 @@ void s2_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -153,16 +154,17 @@ RGX_DEFAULT (.|\n) \| { return s2::parser::make_BITWISE_OR(ctx->loc); } \& { return s2::parser::make_BITWISE_AND(ctx->loc); } \^ { return s2::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return s2::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return s2::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return s2::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return s2::parser::make_PATH(xsk::gsc::s2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return s2::parser::make_IDENTIFIER(xsk::gsc::s2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return s2::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return s2::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return s2::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return s2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return s2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return s2::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return s2::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return s2::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return s2::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return s2::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return s2::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return s2::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return s2::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return s2::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) s2_pop_header(ctx); else return s2::parser::make_S2EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw s2::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -170,60 +172,60 @@ RGX_DEFAULT (.|\n) void s2_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -231,8 +233,8 @@ void s2_push_header(xsk::gsc::context* ctx, const std::string& file) void s2_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/s2/parser.ypp b/gen/s2/parser.ypp index bcfe681..111b00c 100644 --- a/gen/s2/parser.ypp +++ b/gen/s2/parser.ypp @@ -137,10 +137,7 @@ xsk::gsc::s2::parser::symbol_type S2lex(yyscan_t yyscanner, xsk::gsc::context* c %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -468,7 +465,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -821,15 +818,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/gen/s4/lexer.lpp b/gen/s4/lexer.lpp index 3b85640..c625460 100644 --- a/gen/s4/lexer.lpp +++ b/gen/s4/lexer.lpp @@ -28,7 +28,8 @@ void s4_pop_header(xsk::gsc::context* ctx); RGX_PATH ([_A-Za-z0-9]+\\)+[_A-Za-z0-9]+ RGX_IDENTIFIER [_A-Za-z][_A-Za-z0-9]* RGX_STRING \"(?:\\.|[^\"])*?\"|\'(?:\\.|[^\'])*?\' -RGX_COLOR #([0-9a-fA-F]{6}|[0-9a-fA-F]{3}) +RGX_COLOR_S #[0-9a-fA-F]{3} +RGX_COLOR_L #[0-9a-fA-F]{6} RGX_FLT_DEC [0-9]+\.(?:[0-9]*)?f?|\.[0-9]+f? RGX_INT_OCT 0[1-7][0-7]* RGX_INT_BIN 0[bB][01]+ @@ -108,8 +109,8 @@ RGX_DEFAULT (.|\n) "self" { return s4::parser::make_SELF(ctx->loc); } "anim" { return s4::parser::make_ANIM(ctx->loc); } "level" { return s4::parser::make_LEVEL(ctx->loc); } -(?i:isdefined) { return s4::parser::make_ISDEFINED(ctx->loc); } -(?i:istrue) { return s4::parser::make_ISTRUE(ctx->loc); } +(?i:isdefined) { return s4::parser::make_ISDEFINED(ctx->loc); } +(?i:istrue) { return s4::parser::make_ISTRUE(ctx->loc); } \( { return s4::parser::make_LPAREN(ctx->loc); } \) { return s4::parser::make_RPAREN(ctx->loc); } \{ { return s4::parser::make_LBRACE(ctx->loc); } @@ -155,16 +156,17 @@ RGX_DEFAULT (.|\n) \| { return s4::parser::make_BITWISE_OR(ctx->loc); } \& { return s4::parser::make_BITWISE_AND(ctx->loc); } \^ { return s4::parser::make_BITWISE_EXOR(ctx->loc); } -{RGX_PATH} { return s4::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } -{RGX_IDENTIFIER} { return s4::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } -\&{RGX_STRING} { return s4::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +{RGX_PATH} { return s4::parser::make_PATH(xsk::gsc::s4::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +{RGX_IDENTIFIER} { return s4::parser::make_IDENTIFIER(xsk::gsc::s4::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } +\&{RGX_STRING} { return s4::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } {RGX_STRING} { return s4::parser::make_STRING(std::string(yytext), ctx->loc); } -{RGX_COLOR} { return s4::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +{RGX_COLOR_S} { return s4::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } +{RGX_COLOR_L} { return s4::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } {RGX_FLT_DEC} { return s4::parser::make_FLOAT(std::string(yytext), ctx->loc); } -{RGX_INT_OCT} { return s4::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } -{RGX_INT_BIN} { return s4::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } -{RGX_INT_HEX} { return s4::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } -{RGX_INT_DEC} { return s4::parser::make_INT_DEC(std::string(yytext), ctx->loc); } +{RGX_INT_OCT} { return s4::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +{RGX_INT_BIN} { return s4::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +{RGX_INT_HEX} { return s4::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +{RGX_INT_DEC} { return s4::parser::make_INTEGER(std::string(yytext), ctx->loc); } <> { if(ctx->header_top > 0) s4_pop_header(ctx); else return s4::parser::make_S4EOF(ctx->loc); } <*>{RGX_DEFAULT} { throw s4::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } @@ -172,60 +174,60 @@ RGX_DEFAULT (.|\n) void s4_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -233,8 +235,8 @@ void s4_push_header(xsk::gsc::context* ctx, const std::string& file) void s4_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/gen/s4/parser.ypp b/gen/s4/parser.ypp index 3d3274a..ce27400 100644 --- a/gen/s4/parser.ypp +++ b/gen/s4/parser.ypp @@ -139,10 +139,7 @@ xsk::gsc::s4::parser::symbol_type S4lex(yyscan_t yyscanner, xsk::gsc::context* c %token ISTRING "localized string" %token COLOR "color" %token FLOAT "float" -%token INT_DEC "int" -%token INT_OCT "octal int" -%token INT_BIN "binary int" -%token INT_HEX "hexadecimal int" +%token INTEGER "integer" %type program %type include @@ -472,7 +469,7 @@ stmt_default ; stmt_break - : BREAK SEMICOLON + : BREAK SEMICOLON { $$ = std::make_unique(@$); } ; @@ -837,15 +834,9 @@ expr_float ; expr_integer - : SUB INT_DEC %prec NEG + : SUB INTEGER %prec NEG { $$ = std::make_unique(@$, "-" + $2); }; - | INT_DEC - { $$ = std::make_unique(@$, $1); }; - | INT_OCT - { $$ = std::make_unique(@$, $1); }; - | INT_BIN - { $$ = std::make_unique(@$, $1); }; - | INT_HEX + | INTEGER { $$ = std::make_unique(@$, $1); }; ; diff --git a/premake5.lua b/premake5.lua index e362cca..b09e3df 100644 --- a/premake5.lua +++ b/premake5.lua @@ -19,7 +19,7 @@ workspace "gsc-tool" targetname "%{prj.name}" language "C++" - cppdialect "C++17" + cppdialect "C++20" architecture "x86_64" filter "action:vs*" diff --git a/src/h1/stdafx.hpp b/src/h1/stdafx.hpp index 1db66b7..99cffde 100644 --- a/src/h1/stdafx.hpp +++ b/src/h1/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/h1/xsk/assembler.cpp b/src/h1/xsk/assembler.cpp index 80843bf..77896dc 100644 --- a/src/h1/xsk/assembler.cpp +++ b/src/h1/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -379,24 +393,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -405,9 +407,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -423,33 +424,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint16_t file_id = 0; - std::uint16_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -458,22 +451,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -487,25 +471,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -514,25 +499,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = (std::uint16_t)std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFF; - if (field_id == 0) - { - field_id = 0xFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 0xA7ED) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -543,7 +516,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -572,24 +545,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/h1/xsk/assembler.hpp b/src/h1/xsk/assembler.hpp index 0035926..acd5c70 100644 --- a/src/h1/xsk/assembler.hpp +++ b/src/h1/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::h1 diff --git a/src/h1/xsk/compiler.cpp b/src/h1/xsk/compiler.cpp index 0386d14..f72e030 100644 --- a/src/h1/xsk/compiler.cpp +++ b/src/h1/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = h1__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -393,9 +393,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -534,7 +534,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -588,7 +588,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -734,7 +734,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -755,9 +755,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -847,7 +847,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -897,7 +897,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1055,7 +1055,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1109,7 +1109,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1372,10 +1372,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1392,7 +1392,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1408,7 +1408,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1490,10 +1490,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1510,7 +1510,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1526,7 +1526,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1548,7 +1548,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1624,7 +1624,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1791,7 +1791,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2083,7 +2083,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2095,7 +2095,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2108,7 +2108,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2225,7 +2225,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2262,7 +2262,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2305,7 +2305,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2435,7 +2435,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2707,7 +2707,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2736,7 +2736,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/h1/xsk/compiler.hpp b/src/h1/xsk/compiler.hpp index 8a337f7..7bdca33 100644 --- a/src/h1/xsk/compiler.hpp +++ b/src/h1/xsk/compiler.hpp @@ -88,7 +88,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/h1/xsk/decompiler.cpp b/src/h1/xsk/decompiler.cpp index 745300b..487de51 100644 --- a/src/h1/xsk/decompiler.cpp +++ b/src/h1/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1365,7 +1365,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1846,7 +1846,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1921,7 +1921,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2057,7 +2057,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2164,11 +2164,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2566,7 +2566,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2685,7 +2685,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3076,7 +3076,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/h1/xsk/disassembler.cpp b/src/h1/xsk/disassembler.cpp index 764fec3..d3f8778 100644 --- a/src/h1/xsk/disassembler.cpp +++ b/src/h1/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// H1 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,8 +69,8 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); @@ -169,7 +169,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -311,19 +311,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -342,88 +337,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint16_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0xA7ED) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x40000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -431,24 +381,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -458,7 +448,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 10; @@ -467,24 +457,24 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { - case opcode::OP_GetLocalFunction: - case opcode::OP_ScriptLocalFunctionCall: - case opcode::OP_ScriptLocalFunctionCall2: - case opcode::OP_ScriptLocalMethodCall: - case opcode::OP_ScriptLocalThreadCall: - case opcode::OP_ScriptLocalChildThreadCall: - case opcode::OP_ScriptLocalMethodThreadCall: - case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); - break; - default: - break; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = resolve_function(inst->data[0]); + break; + default: + break; } } } @@ -513,9 +503,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -533,40 +523,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/h1/xsk/disassembler.hpp b/src/h1/xsk/disassembler.hpp index 1ebc542..bad5150 100644 --- a/src/h1/xsk/disassembler.hpp +++ b/src/h1/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/h1/xsk/h1.hpp b/src/h1/xsk/h1.hpp index 72e4c94..3ea1c44 100644 --- a/src/h1/xsk/h1.hpp +++ b/src/h1/xsk/h1.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::h1 { +constexpr std::uint16_t max_string_id = 0xA7ED; + enum class opcode : std::uint8_t { OP_SetNewLocalVariableFieldCached0 = 0x17, diff --git a/src/h1/xsk/lexer.cpp b/src/h1/xsk/lexer.cpp index d5a9722..ac83516 100644 --- a/src/h1/xsk/lexer.cpp +++ b/src/h1/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 111 -#define YY_END_OF_BUFFER 112 +#define YY_NUM_RULES 112 +#define YY_END_OF_BUFFER 113 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[333] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, - 1, 2, 95, 110, 110, 94, 98, 110, 55, 56, - 92, 90, 61, 91, 62, 93, 109, 109, 64, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 111, + 1, 2, 95, 111, 111, 94, 98, 111, 55, 56, + 92, 90, 61, 91, 62, 93, 110, 110, 64, 65, 79, 89, 80, 66, 101, 59, 60, 99, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 57, 97, 58, 96, 5, 6, - 5, 12, 13, 12, 110, 92, 93, 76, 0, 103, + 5, 12, 13, 12, 111, 92, 93, 76, 0, 103, 0, 15, 0, 0, 0, 0, 85, 0, 74, 0, - 87, 0, 0, 8, 83, 67, 81, 68, 82, 105, - 0, 11, 4, 3, 84, 105, 109, 106, 0, 0, + 87, 0, 0, 8, 83, 67, 81, 68, 82, 106, + 0, 11, 4, 3, 84, 106, 110, 107, 0, 0, 0, 0, 63, 71, 77, 75, 78, 72, 101, 88, 101, 101, 101, 101, 101, 101, 29, 101, 101, 101, 101, 101, 27, 33, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 86, 73, 7, 14, 10, 9, 0, 103, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 103, 0, 105, 0, 3, 105, - 105, 106, 107, 108, 100, 69, 70, 101, 101, 101, + 0, 0, 0, 0, 103, 0, 106, 0, 3, 106, + 106, 107, 108, 109, 100, 69, 70, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 31, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 104, 0, 0, 0, 0, 0, 102, 0, 0, @@ -595,7 +595,7 @@ static const flex_int16_t yy_accept[333] = 54, 101, 101, 101, 101, 101, 101, 101, 101, 101, 30, 0, 0, 0, 0, 0, 101, 101, 101, 101, 101, 21, 101, 101, 39, 34, 101, 43, 101, 101, - 101, 104, 0, 0, 16, 0, 101, 101, 101, 36, + 101, 105, 0, 0, 16, 0, 101, 101, 101, 36, 32, 101, 101, 101, 101, 101, 101, 0, 17, 0, 101, 101, 38, 101, 42, 101, 101, 101, 23, 19, @@ -1193,11 +1193,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1256,582 +1256,587 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw h1::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw h1::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw h1::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return h1::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw h1::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return h1::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw h1::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw h1::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return h1::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return h1::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return h1::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return h1::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return h1::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return h1::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return h1::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return h1::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return h1::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return h1::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return h1::parser::make_WAITFRAME(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return h1::parser::make_IF(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return h1::parser::make_ELSE(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return h1::parser::make_DO(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return h1::parser::make_WHILE(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return h1::parser::make_FOR(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return h1::parser::make_FOREACH(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return h1::parser::make_IN(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return h1::parser::make_SWITCH(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return h1::parser::make_CASE(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return h1::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return h1::parser::make_BREAK(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return h1::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return h1::parser::make_RETURN(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return h1::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return h1::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return h1::parser::make_PROFEND(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return h1::parser::make_THREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return h1::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return h1::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return h1::parser::make_CALL(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return h1::parser::make_TRUE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return h1::parser::make_FALSE(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return h1::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return h1::parser::make_SIZE(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return h1::parser::make_GAME(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return h1::parser::make_SELF(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return h1::parser::make_ANIM(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return h1::parser::make_LEVEL(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return h1::parser::make_LPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return h1::parser::make_RPAREN(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return h1::parser::make_LBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return h1::parser::make_RBRACE(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return h1::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return h1::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return h1::parser::make_COMMA(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return h1::parser::make_DOT(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return h1::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return h1::parser::make_COLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return h1::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return h1::parser::make_QMARK(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return h1::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return h1::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return h1::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return h1::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return h1::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return h1::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return h1::parser::make_OR(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return h1::parser::make_AND(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return h1::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return h1::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return h1::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return h1::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return h1::parser::make_LESS(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return h1::parser::make_GREATER(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return h1::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return h1::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return h1::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return h1::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return h1::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return h1::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return h1::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return h1::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return h1::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return h1::parser::make_ADD(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return h1::parser::make_SUB(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return h1::parser::make_MUL(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return h1::parser::make_DIV(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return h1::parser::make_MOD(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return h1::parser::make_NOT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return h1::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return h1::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return h1::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" +#line 157 "lexer.lpp" { return h1::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return h1::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return h1::parser::make_PATH(xsk::gsc::h1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return h1::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 159 "lexer.lpp" +{ return h1::parser::make_IDENTIFIER(xsk::gsc::h1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" -{ return h1::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 160 "lexer.lpp" +{ return h1::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 103: /* rule 103 can match eol */ YY_RULE_SETUP -#line 160 "lexer.lpp" +#line 161 "lexer.lpp" { return h1::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return h1::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 162 "lexer.lpp" +{ return h1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return h1::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return h1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return h1::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return h1::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return h1::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return h1::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return h1::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 166 "lexer.lpp" +{ return h1::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 109: YY_RULE_SETUP -#line 166 "lexer.lpp" -{ return h1::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 167 "lexer.lpp" -{ if(ctx->header_top > 0) h1_pop_header(ctx); else return h1::parser::make_H1EOF(ctx->loc); } +{ return h1::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 110: -/* rule 110 can match eol */ YY_RULE_SETUP #line 168 "lexer.lpp" -{ throw h1::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return h1::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 169 "lexer.lpp" +{ if(ctx->header_top > 0) h1_pop_header(ctx); else return h1::parser::make_H1EOF(ctx->loc); } YY_BREAK case 111: +/* rule 111 can match eol */ YY_RULE_SETUP #line 170 "lexer.lpp" +{ throw h1::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 172 "lexer.lpp" ECHO; YY_BREAK -#line 1834 "lexer.cpp" +#line 1839 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2961,65 +2966,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" void h1_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3027,9 +3032,9 @@ void h1_push_header(xsk::gsc::context* ctx, const std::string& file) void h1_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/h1/xsk/lexer.hpp b/src/h1/xsk/lexer.hpp index 1205201..a5e0276 100644 --- a/src/h1/xsk/lexer.hpp +++ b/src/h1/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/h1/xsk/parser.cpp b/src/h1/xsk/parser.cpp index ff7dc1f..22be956 100644 --- a/src/h1/xsk/parser.cpp +++ b/src/h1/xsk/parser.cpp @@ -498,10 +498,7 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -802,10 +799,7 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1106,10 +1100,7 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1409,10 +1400,7 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1967,10 +1955,7 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1995,1321 +1980,1303 @@ namespace xsk { namespace gsc { namespace h1 { switch (yyn) { case 2: // root: program -#line 254 "parser.ypp" +#line 251 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2001 "parser.cpp" +#line 1986 "parser.cpp" break; case 3: // root: %empty -#line 255 "parser.ypp" +#line 252 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 2007 "parser.cpp" +#line 1992 "parser.cpp" break; case 4: // program: program inline -#line 260 "parser.ypp" +#line 257 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2013 "parser.cpp" +#line 1998 "parser.cpp" break; case 5: // program: program include -#line 262 "parser.ypp" +#line 259 "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 2019 "parser.cpp" +#line 2004 "parser.cpp" break; case 6: // program: program declaration -#line 264 "parser.ypp" +#line 261 "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 2025 "parser.cpp" +#line 2010 "parser.cpp" break; case 7: // program: inline -#line 266 "parser.ypp" +#line 263 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2031 "parser.cpp" +#line 2016 "parser.cpp" break; case 8: // program: include -#line 268 "parser.ypp" +#line 265 "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 2037 "parser.cpp" +#line 2022 "parser.cpp" break; case 9: // program: declaration -#line 270 "parser.ypp" +#line 267 "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 2043 "parser.cpp" +#line 2028 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 274 "parser.ypp" +#line 271 "parser.ypp" { h1_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2049 "parser.cpp" +#line 2034 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 279 "parser.ypp" +#line 276 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2055 "parser.cpp" +#line 2040 "parser.cpp" break; case 12: // declaration: "/#" -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2061 "parser.cpp" +#line 2046 "parser.cpp" break; case 13: // declaration: "#/" -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2067 "parser.cpp" +#line 2052 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2073 "parser.cpp" +#line 2058 "parser.cpp" break; case 15: // declaration: decl_constant -#line 286 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2079 "parser.cpp" +#line 2064 "parser.cpp" break; case 16: // declaration: decl_thread -#line 287 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2085 "parser.cpp" +#line 2070 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 292 "parser.ypp" +#line 289 "parser.ypp" { ctx->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 2091 "parser.cpp" +#line 2076 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 297 "parser.ypp" +#line 294 "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 2097 "parser.cpp" +#line 2082 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 302 "parser.ypp" +#line 299 "parser.ypp" { ctx->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 2103 "parser.cpp" +#line 2088 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2109 "parser.cpp" +#line 2094 "parser.cpp" break; case 21: // stmt: stmt_block -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2115 "parser.cpp" +#line 2100 "parser.cpp" break; case 22: // stmt: stmt_call -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2121 "parser.cpp" +#line 2106 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2127 "parser.cpp" +#line 2112 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2133 "parser.cpp" +#line 2118 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2139 "parser.cpp" +#line 2124 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2145 "parser.cpp" +#line 2130 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2151 "parser.cpp" +#line 2136 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2157 "parser.cpp" +#line 2142 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2163 "parser.cpp" +#line 2148 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } -#line 2169 "parser.cpp" +#line 2154 "parser.cpp" break; case 31: // stmt: stmt_if -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2175 "parser.cpp" +#line 2160 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2181 "parser.cpp" +#line 2166 "parser.cpp" break; case 33: // stmt: stmt_while -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2187 "parser.cpp" +#line 2172 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2193 "parser.cpp" +#line 2178 "parser.cpp" break; case 35: // stmt: stmt_for -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2199 "parser.cpp" +#line 2184 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2205 "parser.cpp" +#line 2190 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2211 "parser.cpp" +#line 2196 "parser.cpp" break; case 38: // stmt: stmt_case -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2217 "parser.cpp" +#line 2202 "parser.cpp" break; case 39: // stmt: stmt_default -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2223 "parser.cpp" +#line 2208 "parser.cpp" break; case 40: // stmt: stmt_break -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2229 "parser.cpp" +#line 2214 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2235 "parser.cpp" +#line 2220 "parser.cpp" break; case 42: // stmt: stmt_return -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2241 "parser.cpp" +#line 2226 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 329 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2247 "parser.cpp" +#line 2232 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 330 "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 2253 "parser.cpp" +#line 2238 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 331 "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 2259 "parser.cpp" +#line 2244 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 335 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2265 "parser.cpp" +#line 2250 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 336 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2271 "parser.cpp" +#line 2256 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 340 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2277 "parser.cpp" +#line 2262 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 341 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2283 "parser.cpp" +#line 2268 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 346 "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 2289 "parser.cpp" +#line 2274 "parser.cpp" break; case 51: // stmt_list: stmt -#line 348 "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 2295 "parser.cpp" +#line 2280 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 353 "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 2301 "parser.cpp" +#line 2286 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 355 "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 2307 "parser.cpp" +#line 2292 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 357 "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 2313 "parser.cpp" +#line 2298 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 359 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2319 "parser.cpp" +#line 2304 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 364 "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 2325 "parser.cpp" +#line 2310 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 366 "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 2331 "parser.cpp" +#line 2316 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 371 "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 2337 "parser.cpp" +#line 2322 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 373 "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 2343 "parser.cpp" +#line 2328 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 375 "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 2349 "parser.cpp" +#line 2334 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 380 "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 2355 "parser.cpp" +#line 2340 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 385 "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 2361 "parser.cpp" +#line 2346 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 387 "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 2367 "parser.cpp" +#line 2352 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 392 "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 2373 "parser.cpp" +#line 2358 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 397 "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 2379 "parser.cpp" +#line 2364 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 399 "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 2385 "parser.cpp" +#line 2370 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 404 "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 2391 "parser.cpp" +#line 2376 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 406 "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 2397 "parser.cpp" +#line 2382 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 411 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2403 "parser.cpp" +#line 2388 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 416 "parser.ypp" +#line 413 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2409 "parser.cpp" +#line 2394 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 418 "parser.ypp" +#line 415 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2415 "parser.cpp" +#line 2400 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2421 "parser.cpp" +#line 2406 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 428 "parser.ypp" +#line 425 "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 2427 "parser.cpp" +#line 2412 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2433 "parser.cpp" +#line 2418 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 438 "parser.ypp" +#line 435 "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 2439 "parser.cpp" +#line 2424 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 443 "parser.ypp" +#line 440 "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 2445 "parser.cpp" +#line 2430 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 448 "parser.ypp" +#line 445 "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 2451 "parser.cpp" +#line 2436 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 450 "parser.ypp" +#line 447 "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 2457 "parser.cpp" +#line 2442 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 455 "parser.ypp" +#line 452 "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 2463 "parser.cpp" +#line 2448 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 460 "parser.ypp" +#line 457 "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 2469 "parser.cpp" +#line 2454 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 462 "parser.ypp" +#line 459 "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 2475 "parser.cpp" +#line 2460 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2481 "parser.cpp" +#line 2466 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2487 "parser.cpp" +#line 2472 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 477 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2493 "parser.cpp" +#line 2478 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 482 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2499 "parser.cpp" +#line 2484 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 484 "parser.ypp" +#line 481 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2505 "parser.cpp" +#line 2490 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 489 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2511 "parser.cpp" +#line 2496 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 494 "parser.ypp" +#line 491 "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 2517 "parser.cpp" +#line 2502 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 499 "parser.ypp" +#line 496 "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 2523 "parser.cpp" +#line 2508 "parser.cpp" break; case 90: // expr: expr_ternary -#line 503 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2529 "parser.cpp" +#line 2514 "parser.cpp" break; case 91: // expr: expr_binary -#line 504 "parser.ypp" +#line 501 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2535 "parser.cpp" +#line 2520 "parser.cpp" break; case 92: // expr: expr_primitive -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2541 "parser.cpp" +#line 2526 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2547 "parser.cpp" +#line 2532 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 510 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2553 "parser.cpp" +#line 2538 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2559 "parser.cpp" +#line 2544 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2565 "parser.cpp" +#line 2550 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2571 "parser.cpp" +#line 2556 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2577 "parser.cpp" +#line 2562 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2583 "parser.cpp" +#line 2568 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2589 "parser.cpp" +#line 2574 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 527 "parser.ypp" +#line 524 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2595 "parser.cpp" +#line 2580 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 529 "parser.ypp" +#line 526 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2601 "parser.cpp" +#line 2586 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 531 "parser.ypp" +#line 528 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2607 "parser.cpp" +#line 2592 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 533 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2613 "parser.cpp" +#line 2598 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 535 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2619 "parser.cpp" +#line 2604 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 540 "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 2625 "parser.cpp" +#line 2610 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 542 "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 2631 "parser.cpp" +#line 2616 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 547 "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 2637 "parser.cpp" +#line 2622 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 549 "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 2643 "parser.cpp" +#line 2628 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 554 "parser.ypp" +#line 551 "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 2649 "parser.cpp" +#line 2634 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2655 "parser.cpp" +#line 2640 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2661 "parser.cpp" +#line 2646 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2667 "parser.cpp" +#line 2652 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2673 "parser.cpp" +#line 2658 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2679 "parser.cpp" +#line 2664 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2685 "parser.cpp" +#line 2670 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2691 "parser.cpp" +#line 2676 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2697 "parser.cpp" +#line 2682 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2703 "parser.cpp" +#line 2688 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2709 "parser.cpp" +#line 2694 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2715 "parser.cpp" +#line 2700 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2721 "parser.cpp" +#line 2706 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2727 "parser.cpp" +#line 2712 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 585 "parser.ypp" +#line 582 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2733 "parser.cpp" +#line 2718 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2739 "parser.cpp" +#line 2724 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2745 "parser.cpp" +#line 2730 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2751 "parser.cpp" +#line 2736 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2757 "parser.cpp" +#line 2742 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2763 "parser.cpp" +#line 2748 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2769 "parser.cpp" +#line 2754 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2775 "parser.cpp" +#line 2760 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2781 "parser.cpp" +#line 2766 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2787 "parser.cpp" +#line 2772 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2793 "parser.cpp" +#line 2778 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2799 "parser.cpp" +#line 2784 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2805 "parser.cpp" +#line 2790 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2811 "parser.cpp" +#line 2796 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2817 "parser.cpp" +#line 2802 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2823 "parser.cpp" +#line 2808 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2829 "parser.cpp" +#line 2814 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2835 "parser.cpp" +#line 2820 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2841 "parser.cpp" +#line 2826 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2847 "parser.cpp" +#line 2832 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2853 "parser.cpp" +#line 2838 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2859 "parser.cpp" +#line 2844 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2865 "parser.cpp" +#line 2850 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 615 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2871 "parser.cpp" +#line 2856 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 616 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2877 "parser.cpp" +#line 2862 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 617 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2883 "parser.cpp" +#line 2868 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 618 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2889 "parser.cpp" +#line 2874 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2895 "parser.cpp" +#line 2880 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 620 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2901 "parser.cpp" +#line 2886 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 621 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2907 "parser.cpp" +#line 2892 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 622 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2913 "parser.cpp" +#line 2898 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 623 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2919 "parser.cpp" +#line 2904 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2925 "parser.cpp" +#line 2910 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2931 "parser.cpp" +#line 2916 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 634 "parser.ypp" +#line 631 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2937 "parser.cpp" +#line 2922 "parser.cpp" break; case 159: // expr_call: expr_function -#line 638 "parser.ypp" +#line 635 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2943 "parser.cpp" +#line 2928 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 639 "parser.ypp" +#line 636 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2949 "parser.cpp" +#line 2934 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 642 "parser.ypp" +#line 639 "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 2955 "parser.cpp" +#line 2940 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 643 "parser.ypp" +#line 640 "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 2961 "parser.cpp" +#line 2946 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2967 "parser.cpp" +#line 2952 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 647 "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 2973 "parser.cpp" +#line 2958 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 649 "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 2979 "parser.cpp" +#line 2964 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 651 "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 2985 "parser.cpp" +#line 2970 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 653 "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 2991 "parser.cpp" +#line 2976 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 658 "parser.ypp" +#line 655 "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 2997 "parser.cpp" +#line 2982 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 660 "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 3003 "parser.cpp" +#line 2988 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 665 "parser.ypp" +#line 662 "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 3009 "parser.cpp" +#line 2994 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 667 "parser.ypp" +#line 664 "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 3015 "parser.cpp" +#line 3000 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 669 "parser.ypp" +#line 666 "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 3021 "parser.cpp" +#line 3006 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 674 "parser.ypp" +#line 671 "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 3027 "parser.cpp" +#line 3012 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 679 "parser.ypp" +#line 676 "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 3033 "parser.cpp" +#line 3018 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 681 "parser.ypp" +#line 678 "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 3039 "parser.cpp" +#line 3024 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 683 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3045 "parser.cpp" +#line 3030 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 688 "parser.ypp" +#line 685 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3051 "parser.cpp" +#line 3036 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 690 "parser.ypp" +#line 687 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3057 "parser.cpp" +#line 3042 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 695 "parser.ypp" +#line 692 "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 3063 "parser.cpp" +#line 3048 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 697 "parser.ypp" +#line 694 "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 3069 "parser.cpp" +#line 3054 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 702 "parser.ypp" +#line 699 "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 3075 "parser.cpp" +#line 3060 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3081 "parser.cpp" +#line 3066 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 709 "parser.ypp" +#line 706 "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 3087 "parser.cpp" +#line 3072 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 714 "parser.ypp" +#line 711 "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 3093 "parser.cpp" +#line 3078 "parser.cpp" break; case 185: // expr_size: expr_object ".size" -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3099 "parser.cpp" +#line 3084 "parser.cpp" break; case 186: // expr_paren: "(" expr ")" -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3105 "parser.cpp" +#line 3090 "parser.cpp" break; case 187: // expr_object: expr_call -#line 728 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3111 "parser.cpp" +#line 3096 "parser.cpp" break; case 188: // expr_object: expr_method -#line 729 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3117 "parser.cpp" +#line 3102 "parser.cpp" break; case 189: // expr_object: expr_array -#line 730 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3123 "parser.cpp" +#line 3108 "parser.cpp" break; case 190: // expr_object: expr_field -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3129 "parser.cpp" +#line 3114 "parser.cpp" break; case 191: // expr_object: expr_game -#line 732 "parser.ypp" +#line 729 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3135 "parser.cpp" +#line 3120 "parser.cpp" break; case 192: // expr_object: expr_self -#line 733 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3141 "parser.cpp" +#line 3126 "parser.cpp" break; case 193: // expr_object: expr_anim -#line 734 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3147 "parser.cpp" +#line 3132 "parser.cpp" break; case 194: // expr_object: expr_level -#line 735 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3153 "parser.cpp" +#line 3138 "parser.cpp" break; case 195: // expr_object: expr_identifier -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3159 "parser.cpp" +#line 3144 "parser.cpp" break; case 196: // expr_thisthread: "thisthread" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3165 "parser.cpp" +#line 3150 "parser.cpp" break; case 197: // expr_empty_array: "[" "]" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3171 "parser.cpp" +#line 3156 "parser.cpp" break; case 198: // expr_undefined: "undefined" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3177 "parser.cpp" +#line 3162 "parser.cpp" break; case 199: // expr_game: "game" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3183 "parser.cpp" +#line 3168 "parser.cpp" break; case 200: // expr_self: "self" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3189 "parser.cpp" +#line 3174 "parser.cpp" break; case 201: // expr_anim: "anim" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3195 "parser.cpp" +#line 3180 "parser.cpp" break; case 202: // expr_level: "level" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3201 "parser.cpp" +#line 3186 "parser.cpp" break; case 203: // expr_animation: "%" "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3207 "parser.cpp" +#line 3192 "parser.cpp" break; case 204: // expr_animtree: "#animtree" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3213 "parser.cpp" +#line 3198 "parser.cpp" break; case 205: // expr_identifier: "identifier" -#line 786 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3219 "parser.cpp" +#line 3204 "parser.cpp" break; case 206: // expr_path: "path" -#line 791 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3225 "parser.cpp" +#line 3210 "parser.cpp" break; case 207: // expr_path: expr_identifier -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3231 "parser.cpp" +#line 3216 "parser.cpp" break; case 208: // expr_istring: "localized string" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3237 "parser.cpp" +#line 3222 "parser.cpp" break; case 209: // expr_string: "string literal" -#line 803 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3243 "parser.cpp" +#line 3228 "parser.cpp" break; case 210: // expr_color: "color" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3249 "parser.cpp" +#line 3234 "parser.cpp" break; case 211: // expr_vector: "(" expr "," expr "," expr ")" -#line 813 "parser.ypp" +#line 810 "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 3255 "parser.cpp" +#line 3240 "parser.cpp" break; case 212: // expr_float: "-" "float" -#line 818 "parser.ypp" +#line 815 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3261 "parser.cpp" +#line 3246 "parser.cpp" break; case 213: // expr_float: "float" -#line 820 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3267 "parser.cpp" +#line 3252 "parser.cpp" break; - case 214: // expr_integer: "-" "int" -#line 825 "parser.ypp" + case 214: // expr_integer: "-" "integer" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3273 "parser.cpp" +#line 3258 "parser.cpp" break; - case 215: // expr_integer: "int" -#line 827 "parser.ypp" + case 215: // expr_integer: "integer" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3279 "parser.cpp" +#line 3264 "parser.cpp" break; - case 216: // expr_integer: "octal int" + case 216: // expr_false: "false" #line 829 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3285 "parser.cpp" - break; - - case 217: // expr_integer: "binary int" -#line 831 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3291 "parser.cpp" - break; - - case 218: // expr_integer: "hexadecimal int" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3297 "parser.cpp" - break; - - case 219: // expr_false: "false" -#line 838 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3303 "parser.cpp" +#line 3270 "parser.cpp" break; - case 220: // expr_true: "true" -#line 843 "parser.ypp" + case 217: // expr_true: "true" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3309 "parser.cpp" +#line 3276 "parser.cpp" break; -#line 3313 "parser.cpp" +#line 3280 "parser.cpp" default: break; @@ -3504,25 +3471,24 @@ namespace xsk { namespace gsc { namespace h1 { ">>", "||", "&&", "==", "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", - "localized string", "color", "float", "int", "octal int", "binary int", - "hexadecimal int", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", - "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", - "inline", "include", "declaration", "decl_usingtree", "decl_constant", - "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", - "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", - "stmt_wait", "stmt_waittill", "stmt_waittillmatch", - "stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", + "localized string", "color", "float", "integer", "ADD_ARRAY", "THEN", + "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", "POSTINC", "POSTDEC", + "$accept", "root", "program", "inline", "include", "declaration", + "decl_usingtree", "decl_constant", "decl_thread", "stmt", "stmt_dev", + "stmt_block", "stmt_list", "stmt_expr", "stmt_call", "stmt_assign", + "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", + "stmt_waittillmatch", "stmt_waittillframeend", "stmt_waitframe", + "stmt_if", "stmt_ifelse", "stmt_while", "stmt_dowhile", "stmt_for", + "stmt_foreach", "stmt_switch", "stmt_case", "stmt_default", "stmt_break", + "stmt_continue", "stmt_return", "stmt_breakpoint", "stmt_prof_begin", + "stmt_prof_end", "expr", "expr_or_empty", "expr_assign", + "expr_increment", "expr_decrement", "expr_ternary", "expr_binary", + "expr_primitive", "expr_complement", "expr_not", "expr_call", + "expr_method", "expr_function", "expr_pointer", "expr_add_array", + "expr_parameters", "expr_arguments", "expr_arguments_no_empty", + "expr_reference", "expr_array", "expr_field", "expr_size", "expr_paren", + "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", + "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier", "expr_path", "expr_istring", "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR @@ -3790,58 +3756,57 @@ namespace xsk { namespace gsc { namespace h1 { } - const short parser::yypact_ninf_ = -269; + const short parser::yypact_ninf_ = -261; const short parser::yytable_ninf_ = -208; const short parser::yypact_[] = { - 15, -269, -269, 10, 10, -32, -269, 26, 15, -269, - -269, -269, -269, -269, -269, -20, -269, -269, -24, -21, - -49, -269, -269, -269, -269, -30, 858, -269, -269, -269, - 25, -18, -269, -269, -35, -25, -269, 28, -269, -269, - -269, -269, -269, -269, -269, 858, 724, -30, 858, 858, - 55, -17, -269, -269, -269, -269, -269, -269, -269, 2001, - -269, -269, -269, -269, -269, 198, 435, -269, -269, -269, - -269, 589, 690, -269, -269, 814, -269, -269, -269, 819, - 881, 886, 1084, -269, -269, 552, 67, -269, -269, -269, - -269, -269, -269, -269, -269, 80, 34, -30, 75, 107, - 105, 112, 120, 115, 121, 1287, 724, -269, 2084, 118, - 128, -269, -269, -269, -269, -269, -269, -269, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, -269, 925, -30, - -269, -269, 135, 132, 858, -30, -269, 1021, -269, -269, - 858, 858, -30, 858, 858, -30, 858, -269, 858, 1731, - 858, -269, 1966, 117, 117, 920, 2115, 2166, 2166, 309, - 309, 309, 309, 2125, 632, 2156, 54, 54, -269, -269, - -269, 1771, -269, -30, 13, -269, 141, 1072, 858, 136, - 12, 145, 1225, 147, 150, 153, 155, 33, 156, 152, - 157, 791, 161, 166, 173, -269, 177, 130, 130, -269, - -269, -269, 1123, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, 172, 174, 175, - 178, 180, -269, -269, 36, -269, -269, -269, -269, 7, - 1811, 22, 183, 1851, 29, 192, 1891, 1930, 193, 2084, - 858, -269, 141, -269, 858, -269, 1174, 2036, -269, 200, - -269, 858, 228, 858, -4, -30, 858, 158, 199, 202, - -269, -269, -269, -269, 2071, -269, 858, 858, 858, -269, - -269, 69, 69, -269, -269, -269, -269, -269, -269, -269, - 207, 212, 213, 214, -269, -269, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 210, -269, 858, - 211, -269, 858, 215, 858, 217, 2084, 38, -269, -269, - 209, 1453, 221, 1487, 222, -269, -269, -269, 1251, -7, - 1521, -269, -269, -269, 44, 45, 1731, 858, 858, 858, - 858, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, - 2084, 2084, 223, 46, 225, 53, 227, 1555, 858, -269, - -269, 1225, 858, 1225, 858, 858, -30, 34, 224, 232, - 1589, 1331, 1375, 1419, 858, -269, 858, -269, 858, -269, - 77, 256, 1623, -269, 2084, 235, 1657, 255, -269, -269, - -269, 236, 239, 858, 240, 858, 241, 858, 87, 88, - 98, -269, 1225, 246, -4, 1225, 858, -269, -269, 234, - -269, 254, -269, 257, -269, -269, -269, -269, -269, 258, - -269, 1691, 247, 250, 253, 1225, 1225, -269, -269, -269, - -269, -269 + 24, -261, -261, -71, -71, -23, -261, 39, 24, -261, + -261, -261, -261, -261, -261, -20, -261, -261, -5, -3, + -26, -261, -261, -261, -261, -35, 1143, -261, -261, -261, + 28, 17, -261, -261, -36, -33, -261, 27, -261, -261, + -261, -261, -261, -261, -261, 1143, 1015, -35, 1143, 1143, + -58, 7, -261, -261, -261, -261, 1897, -261, -261, -261, + -261, -261, 345, 435, -261, -261, -261, -261, 581, 609, + -261, -261, 614, -261, -261, -261, 848, 950, 1104, 1168, + -261, -261, 74, 46, -261, -261, -261, -261, -261, -261, + -261, -261, 54, 69, -35, 79, 73, 91, 83, 104, + 101, 110, 1222, 1015, -261, 1980, 111, 116, -261, -261, + -261, -261, -261, -261, -261, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, -261, 1207, -35, -261, -261, 122, + 121, 1143, -35, -261, 785, -261, -261, 1143, 1143, -35, + 1143, 1143, -35, 1143, -261, 1143, 1666, 1143, -261, 1862, + 114, 114, 2011, 2021, 2103, 2103, 53, 53, 53, 53, + 2052, 2093, 2062, 59, 59, -261, -261, -261, 1706, -261, + -35, 18, -261, 130, 836, 1143, 125, -11, 137, 989, + 138, 139, 150, 159, -53, 153, 154, 158, 1079, 160, + 163, 176, -261, 173, 127, 127, -261, -261, -261, 887, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, 168, 171, 174, 179, 180, -261, + -261, 683, -261, -261, -261, -261, 8, 1746, 21, 183, + 1786, 29, 186, 1826, 1010, 182, 1980, 1143, -261, 130, + -261, 1143, -261, 938, 1932, -261, 193, -261, 1143, 220, + 1143, 550, -35, 1143, 145, 191, 195, -261, -261, -261, + -261, 1967, -261, 1143, 1143, 1143, -261, -261, 210, 210, + -261, -261, -261, -261, -261, -261, -261, 202, 208, 212, + 216, -261, -261, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 205, -261, 1143, 213, -261, 1143, + 215, 1143, 222, 1980, 31, -261, -261, 214, 1388, 223, + 1422, 219, -261, -261, -261, 13, -6, 1456, -261, -261, + -261, 32, 50, 1666, 1143, 1143, 1143, 1143, 1980, 1980, + 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 230, + 51, 231, 60, 232, 1490, 1143, -261, -261, 989, 1143, + 989, 1143, 1143, -35, 69, 224, 225, 1524, 1266, 1310, + 1354, 1143, -261, 1143, -261, 1143, -261, 71, 263, 1558, + -261, 1980, 227, 1592, 260, -261, -261, -261, 233, 237, + 1143, 238, 1143, 239, 1143, 78, 84, 85, -261, 989, + 242, 550, 989, 1143, -261, -261, 252, -261, 253, -261, + 256, -261, -261, -261, -261, -261, 278, -261, 1626, 271, + 274, 276, 989, 989, -261, -261, -261, -261, -261 }; const unsigned char @@ -3850,616 +3815,601 @@ namespace xsk { namespace gsc { namespace h1 { 3, 12, 13, 0, 0, 0, 205, 0, 2, 7, 8, 9, 14, 15, 16, 0, 206, 207, 0, 0, 0, 1, 4, 5, 6, 176, 0, 10, 11, 209, - 0, 0, 175, 204, 0, 0, 196, 0, 220, 219, + 0, 0, 175, 204, 0, 0, 196, 0, 217, 216, 198, 199, 200, 201, 202, 0, 178, 0, 0, 0, - 0, 0, 208, 210, 213, 215, 216, 217, 218, 0, - 90, 91, 92, 129, 130, 131, 132, 159, 160, 133, - 134, 135, 136, 137, 138, 0, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 0, 149, 150, 151, - 152, 153, 154, 155, 156, 0, 0, 0, 0, 207, - 0, 0, 207, 0, 0, 0, 178, 197, 180, 0, - 177, 181, 158, 157, 212, 214, 203, 18, 0, 0, + 0, 0, 208, 210, 213, 215, 0, 90, 91, 92, + 129, 130, 131, 132, 159, 160, 133, 134, 135, 136, + 137, 138, 0, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 149, 150, 151, 152, 153, 154, + 155, 156, 0, 0, 0, 0, 207, 0, 0, 207, + 0, 0, 0, 178, 197, 180, 0, 177, 181, 158, + 157, 212, 214, 203, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, - 161, 162, 207, 0, 178, 0, 17, 0, 19, 174, - 0, 178, 0, 0, 178, 0, 0, 186, 0, 180, - 0, 173, 0, 122, 123, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 124, 125, 126, 127, - 128, 0, 184, 0, 0, 177, 182, 0, 0, 0, + 0, 0, 0, 0, 185, 0, 0, 161, 162, 207, + 0, 178, 0, 17, 0, 19, 174, 0, 178, 0, + 0, 178, 0, 0, 186, 0, 180, 0, 173, 0, + 122, 123, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 124, 125, 126, 127, 128, 0, 184, + 0, 0, 177, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 49, 0, 0, 0, 51, - 20, 21, 0, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, - 187, 188, 189, 190, 0, 191, 192, 193, 194, 195, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, - 0, 183, 0, 163, 178, 47, 0, 0, 69, 0, - 70, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 82, 83, 84, 86, 0, 87, 178, 178, 0, 187, - 188, 106, 108, 48, 50, 58, 59, 60, 56, 57, - 0, 0, 0, 0, 107, 109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 165, 178, - 0, 167, 178, 0, 0, 0, 110, 0, 46, 64, - 0, 0, 0, 0, 0, 52, 53, 54, 0, 0, - 0, 81, 80, 85, 0, 0, 0, 0, 0, 0, - 0, 95, 101, 102, 103, 104, 105, 96, 97, 98, - 100, 99, 0, 0, 0, 0, 0, 0, 178, 164, - 71, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 178, 166, 178, 168, 178, 211, - 0, 72, 0, 74, 93, 0, 0, 0, 79, 88, - 89, 0, 0, 178, 0, 178, 0, 178, 0, 0, - 0, 169, 0, 0, 55, 0, 0, 61, 63, 177, - 66, 177, 68, 177, 170, 171, 172, 73, 75, 0, - 77, 0, 0, 0, 0, 0, 0, 62, 65, 67, - 76, 78 + 0, 0, 49, 0, 0, 0, 51, 20, 21, 0, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 0, 0, 0, 187, 188, 189, + 190, 0, 191, 192, 193, 194, 195, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 0, 183, 0, + 163, 178, 47, 0, 0, 69, 0, 70, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 82, 83, 84, + 86, 0, 87, 178, 178, 0, 187, 188, 106, 108, + 48, 50, 58, 59, 60, 56, 57, 0, 0, 0, + 0, 107, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 165, 178, 0, 167, 178, + 0, 0, 0, 110, 0, 46, 64, 0, 0, 0, + 0, 0, 52, 53, 54, 0, 0, 0, 81, 80, + 85, 0, 0, 0, 0, 0, 0, 0, 95, 101, + 102, 103, 104, 105, 96, 97, 98, 100, 99, 0, + 0, 0, 0, 0, 0, 178, 164, 71, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 178, 166, 178, 168, 178, 211, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 178, 0, 178, 0, 178, 0, 0, 0, 169, 0, + 0, 55, 0, 0, 61, 63, 177, 66, 177, 68, + 177, 170, 171, 172, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 62, 65, 67, 76, 78 }; const short parser::yypgoto_[] = { - -269, -269, -269, 273, 319, 321, -269, -269, -269, 163, - -269, -94, 143, -83, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, 190, -269, - -268, -260, -258, -269, -269, -269, -269, -269, -130, -26, - -70, -68, -269, -269, 325, -45, -269, -12, 219, -269, - -269, 245, -269, -269, -269, 252, 300, 335, 369, -269, - -269, 0, 6, -269, -9, -269, -269, -269, 137, -269, - -269 + -261, -261, -261, 321, 323, 324, -261, -261, -261, -183, + -261, -88, 100, -78, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, 187, -261, + -260, -257, -254, -261, -261, -261, -261, -261, -85, -12, + -70, -65, -261, -261, -128, -45, -261, 177, 247, -261, + -261, 257, -261, -261, -261, 275, 332, 359, 365, -261, + -261, 0, 6, -261, 2, -261, -261, -261, 142, -261, + -261 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 209, - 210, 211, 212, 334, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 108, 395, - 237, 238, 239, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 31, 109, 185, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 206, + 207, 208, 209, 331, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 105, 392, + 234, 235, 236, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 31, 106, 182, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 335, 141, 15, 18, - 19, 30, 20, 98, 336, 375, 337, 240, 1, 2, - 3, 4, 5, 101, 25, 32, 21, 96, 34, 35, - 27, 37, 97, 28, 99, 102, 41, 42, 43, 44, - 100, 103, 29, 376, 206, 300, 301, 111, 302, 303, - 26, 144, 207, 208, 16, 6, 269, 240, 263, -207, - 6, 110, 240, 160, 16, 6, 270, 318, 34, 35, - 95, 37, 160, 116, 321, 142, 104, 289, 289, 160, - 147, 143, 240, 369, 138, 16, 6, 139, 160, 378, - 379, 385, 304, 305, 160, 160, 160, 149, 387, 16, - 6, 34, 35, 160, 37, 6, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 138, 277, 145, - 139, 241, 411, 150, 29, 16, 6, 160, 55, 56, - 57, 58, 424, 425, 146, 242, 240, 160, 160, 182, - 134, 135, 136, 426, 289, 186, 335, 249, 160, 114, - 115, 151, 252, 143, 336, 255, 337, 152, 16, 6, - 153, 241, 34, 35, 154, 37, 241, 155, 160, 156, - 41, 42, 43, 44, 140, 242, 141, 161, 206, 144, - 242, 290, 290, 262, 183, 264, 241, 249, 278, 271, - 268, 273, 249, 143, 274, 242, 242, 275, 143, 276, - 242, 132, 133, 134, 135, 136, 281, 249, 249, 280, - 286, 282, 249, 143, 143, 285, 59, 287, 143, 16, - 6, 140, 140, 141, 141, 288, 295, 319, 296, 297, - -187, -187, 298, -187, 299, 105, 322, -187, 112, 113, - 241, 240, 325, 240, 142, 330, -187, 332, 290, -187, - 143, 347, 341, 115, 242, 342, 348, 349, 350, 362, - 364, 368, 242, 370, 366, 372, 249, 384, 140, 386, - 141, 388, 143, 412, 249, 339, 374, 416, 399, 432, - 143, 22, 240, 398, 289, 240, 400, -187, -187, 414, - 417, 142, 142, 418, 420, 422, 159, 143, 143, 433, - 428, 437, 434, 435, 438, 240, 240, 439, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 23, 181, 24, - 266, 429, 0, 0, 279, 0, 0, 0, 142, 0, - 250, 0, 0, 253, 143, 241, 256, 241, 257, 0, - 259, 0, 0, 0, 0, 272, 0, 0, 419, 242, - 421, 242, 423, 0, 0, 0, 243, 119, 120, 0, - 0, 249, 0, 249, 0, 294, 397, 143, 267, 143, - 0, 0, 0, 0, 0, 0, 241, 0, 290, 241, - 0, 284, 244, 132, 133, 134, 135, 136, 0, 245, - 242, 0, 242, 242, 0, 0, 243, 0, 0, 241, - 241, 243, 249, 0, 249, 249, 0, 0, 143, 0, - 143, 143, 0, 242, 242, 0, 243, 243, 0, 294, - 0, 243, 244, 0, 0, 249, 249, 244, 0, 245, - 0, 143, 143, 0, 245, 0, 0, 246, 0, 0, - 326, 0, 291, 292, 0, 0, 0, 244, 0, 245, - 245, 331, 0, 333, 245, 0, 340, -188, -188, 184, - -188, 0, 0, 0, -188, 0, 251, 0, 346, 254, - 0, 0, 247, -188, 0, 243, -188, 246, 0, 0, - 0, 0, 246, 243, 0, 0, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 246, 246, 0, - 0, 244, 246, 0, 367, 0, 248, 0, 245, 338, - 0, 0, 247, 0, -188, -188, 245, 247, 0, 0, - 0, 0, 0, 0, 391, 0, 393, 380, 381, 382, - 383, 0, 247, 247, 0, 0, 0, 247, 0, 0, - 0, 0, 0, 0, 0, 0, 248, 0, 0, 0, - 0, 248, 392, 0, 394, 396, 246, 0, 0, 0, - 0, 0, 0, 0, 246, 427, 248, 248, 430, 0, - 0, 248, 0, 0, -195, -195, 0, -195, 0, 327, - 243, -195, 243, 0, 0, 0, 144, 0, 440, 441, - -195, 247, 0, -195, -207, 0, 431, 0, 0, 247, - 0, 344, 345, 0, 0, 0, 244, 0, 244, 0, - 0, -189, -189, 245, -189, 245, 0, 0, -189, 0, - 0, 243, 0, 243, 243, 248, 0, -189, 0, 0, - -189, -195, -195, 248, 363, 0, 0, 365, 0, 0, - 0, 0, 0, 0, 243, 243, 0, 244, 0, 338, - 244, 0, 0, 0, 245, 0, 245, 245, 0, 0, - 0, 246, 0, 246, 0, 0, 0, 0, -189, -189, - 244, 244, 0, 0, 0, 0, 0, 245, 245, 0, - 119, 120, 0, 390, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 247, 0, 247, 408, - 0, 409, 246, 410, 246, 246, 132, 133, 134, 135, - 136, 0, -190, -190, 0, -190, 0, 0, 0, -190, - 0, 0, 33, 0, 0, 246, 246, 0, -190, 0, - 248, -190, 248, 0, 0, 0, 0, 247, 0, 247, - 247, 0, 0, 0, 0, 0, 34, 35, 36, 37, - 38, 39, 40, 0, 41, 42, 43, 44, 45, 0, - 247, 247, 106, 107, 0, 0, 47, 0, 0, -190, - -190, 248, 0, 248, 248, 0, 0, 0, 0, 0, - 0, 0, 48, 49, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 248, 248, 0, 0, 0, 50, - 0, 0, 51, 16, 6, 29, 52, 53, 54, 55, - 56, 57, 58, 34, 35, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 44, 45, 0, 0, 0, 46, - 0, 0, 0, 47, 0, 283, 34, 35, 0, 37, - 0, -191, -191, 137, -191, 0, 0, 0, -191, 48, - 49, 0, 138, 0, 0, 139, 33, -191, 0, 0, - -191, 0, 0, 0, 0, 0, 50, 0, 0, 51, - 16, 6, 29, 52, 53, 54, 55, 56, 57, 58, - 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, - 43, 44, 45, 16, 6, 0, 46, 0, -191, -191, - 47, 0, 0, -192, -192, 0, -192, 0, -193, -193, - -192, -193, 0, 0, 0, -193, 48, 49, 0, -192, - 0, 0, -192, 33, -193, 0, 0, -193, 0, 0, - 0, 0, 0, 50, 0, 0, 51, 16, 6, 29, - 52, 53, 54, 55, 56, 57, 58, 34, 35, 36, + 15, 107, 137, 17, 17, 145, 269, 138, 15, 18, + 19, 332, 95, 181, 333, 98, 372, 334, 16, 6, + 248, 20, 30, 251, 25, 32, 291, 1, 2, 3, + 4, 5, 274, 266, 96, 99, 111, 112, 29, 21, + 97, 100, 55, 267, 373, 34, 35, 108, 37, 27, + 26, 28, 141, 16, 6, 6, 16, 6, 107, 237, + -207, 135, 93, 260, 136, 29, 315, 94, 157, 301, + 302, 157, 139, 92, 318, 101, 366, 375, 140, 157, + 291, 157, 157, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 146, 376, 382, 113, 142, 237, + 157, 157, 16, 6, 237, 384, -195, -195, 143, -195, + 157, 116, 117, -195, 6, 144, 408, 148, 141, 286, + 286, 157, -195, 421, 237, -195, -207, 147, 157, 422, + 423, 150, 238, 324, 157, 157, 179, 129, 130, 131, + 132, 133, 183, 149, 246, 131, 132, 133, 151, 249, + 140, 332, 252, 152, 333, 341, 342, 334, 153, 34, + 35, 157, 37, -195, -195, 158, 141, 41, 42, 43, + 44, 137, 238, 180, 261, 203, 138, 238, 237, 265, + 259, 268, 270, 271, 246, 388, 286, 390, 360, 246, + 140, 362, 287, 287, 272, 140, 275, 238, 129, 130, + 131, 132, 133, 273, 246, 246, 277, 283, 278, 246, + 140, 140, 279, 56, 282, 140, 16, 6, 137, 137, + 284, 285, 292, 138, 138, 293, 424, 316, 294, 427, + 319, 322, 102, 295, 296, 109, 110, 387, 327, 329, + 112, 139, 34, 35, 338, 37, 344, 140, 339, 437, + 438, 238, 345, 405, 359, 406, 346, 407, 135, 287, + 347, 136, 361, 246, 363, 137, 365, 369, 367, 140, + 138, 246, 336, 371, 381, 383, 385, 140, 396, 397, + 409, 411, 413, 237, 263, 237, 395, 414, 139, 139, + 156, 415, 417, 419, 140, 140, 425, 429, 430, 16, + 6, 431, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 239, 178, 432, 237, 434, 286, 237, 435, 22, + 436, 23, 24, 426, 247, 139, 276, 250, 0, 0, + 253, 140, 254, 0, 256, 0, 0, 237, 237, 0, + 0, 0, 0, 0, 0, 416, 238, 418, 238, 420, + 0, 239, 0, 0, 0, 0, 239, 0, 246, 0, + 246, 0, 264, 394, 140, 0, 140, -187, -187, 0, + -187, 239, 239, 0, -187, 281, 239, 0, 0, 0, + 0, 240, 0, -187, 0, 0, -187, 238, 0, 287, + 238, 241, 0, 0, 0, 0, 0, 0, 0, 246, + 0, 246, 246, 0, 0, 140, 0, 140, 140, 242, + 238, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 240, 246, 246, -187, -187, 240, 0, 140, 140, + 239, 241, 0, 0, 323, 0, 241, 0, 239, 0, + 0, 240, 240, 0, 0, 328, 240, 330, 0, 242, + 337, 288, 289, 0, 242, 0, 241, -188, -188, 0, + -188, 0, 343, 0, -188, 0, 243, 0, 0, 242, + 242, 0, 0, -188, 242, 0, -188, 0, 0, 0, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 0, 0, 244, 0, 0, 0, 0, 364, 245, + 240, 0, 0, 0, 0, 0, 243, 0, 240, 0, + 241, 243, 0, 0, -188, -188, 0, 0, 335, 0, + 0, 377, 378, 379, 380, 0, 243, 243, 242, 0, + 0, 243, 0, 244, 0, 239, 242, 239, 244, 245, + 0, 0, 0, 0, 245, 0, 389, 0, 391, 393, + 0, 0, 0, 244, 244, 0, 0, 0, 244, 245, + 245, 0, 0, 0, 245, 0, 0, 0, 0, 0, + 0, 0, 34, 35, 0, 37, 239, 0, 239, 239, + 41, 42, 43, 44, 0, 243, 0, 0, 203, 0, + 428, 0, 0, 243, 0, 0, 204, 205, 0, 239, + 239, 0, 0, -189, -189, 240, -189, 240, 0, 0, + -189, 0, 244, 0, 0, 241, 0, 241, 245, -189, + 244, 0, -189, 0, 0, 0, 245, 0, 0, 16, + 6, -190, -190, 242, -190, 242, 34, 35, -190, 37, + 0, 0, 0, 134, 0, 0, 240, -190, 240, 240, + -190, 0, 135, 0, 0, 136, 241, 0, 335, 241, + -189, -189, 0, 0, 0, 0, 0, 0, 0, 240, + 240, 0, 0, 0, 242, 0, 242, 242, 0, 241, + 241, 0, 297, 298, 0, 299, 300, 0, -190, -190, + 243, 0, 243, 16, 6, 0, 0, 242, 242, 0, + 0, 0, 0, 0, 0, 34, 35, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 244, 0, 244, + 0, 135, 0, 245, 136, 245, 0, 0, 0, 301, + 302, 243, 0, 243, 243, 0, 0, 0, 0, 0, + 0, 0, 0, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 243, 243, 0, 0, 244, 0, + 244, 244, 16, 6, 245, 0, 245, 245, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, + 0, 244, 244, 0, 0, 0, 185, 245, 245, 186, + 187, 188, 0, 189, 190, 191, 192, 0, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 34, 35, 0, + 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, + 0, 144, 202, 203, 0, 0, 0, 0, 0, 184, + 262, 204, 205, 0, 0, 0, 0, 185, 0, 0, + 186, 187, 188, 0, 189, 190, 191, 192, 0, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 34, 35, + 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, + -191, -191, 144, -191, 203, 0, 0, -191, 0, 0, + 184, 0, 204, 205, 0, 0, -191, 0, 185, -191, + 0, 186, 187, 188, 0, 189, 190, 191, 192, 0, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 34, + 35, 0, 37, 0, 0, 16, 6, 41, 42, 43, + 44, 0, 0, 144, 290, 203, 0, -191, -191, 0, + 0, 184, 325, 204, 205, 0, 0, 0, 0, 185, + 0, 0, 186, 187, 188, 0, 189, 190, 191, 192, + 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 34, 35, 0, 37, 0, 0, 16, 6, 41, 42, + 43, 44, -192, -192, 144, -192, 203, 0, 0, -192, + 0, 0, 184, 0, 204, 205, 0, 0, -192, 0, + 185, -192, 0, 186, 187, 188, 0, 189, 190, 191, + 192, 0, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 34, 35, 33, 37, 0, 0, 16, 6, 41, + 42, 43, 44, 0, 0, 144, 0, 203, 0, -192, + -192, 0, 0, 0, 0, 204, 205, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, - -192, -192, 0, 106, 0, -193, -193, 47, 119, 120, - 0, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 48, 49, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 0, + 321, 0, 0, 103, 104, 115, 0, 47, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 16, 6, + 0, 0, 0, 48, 49, 0, 0, 33, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, - 55, 56, 57, 58, 187, 0, 0, 0, 0, 0, - 0, 0, 188, 0, 0, 189, 190, 191, 0, 192, - 193, 194, 195, 0, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 34, 35, 0, 37, 0, 0, 0, - 0, 41, 42, 43, 44, 0, 0, 147, 205, 206, - 0, 0, 0, 0, 0, 187, 265, 207, 208, 0, - 0, 0, 0, 188, 0, 0, 189, 190, 191, 0, - 192, 193, 194, 195, 0, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 34, 35, 0, 37, 0, 0, - 16, 6, 41, 42, 43, 44, -194, -194, 147, -194, - 206, 0, 0, -194, 0, 0, 187, 0, 207, 208, - 0, 0, -194, 0, 188, -194, 0, 189, 190, 191, - 0, 192, 193, 194, 195, 0, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 34, 35, 0, 37, 0, - 0, 16, 6, 41, 42, 43, 44, 0, 0, 147, - 293, 206, 0, -194, -194, 0, 0, 187, 328, 207, - 208, 0, 0, 0, 0, 188, 0, 0, 189, 190, - 191, 0, 192, 193, 194, 195, 0, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 34, 35, 0, 37, - 0, 0, 16, 6, 41, 42, 43, 44, 0, 0, - 147, 0, 206, 0, 0, 0, 0, 0, 187, 0, - 207, 208, 0, 0, 0, 0, 188, 0, 0, 189, - 190, 191, 0, 192, 193, 194, 195, 0, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 34, 35, 0, - 37, 0, 0, 16, 6, 41, 42, 43, 44, 0, - 0, 147, 0, 206, 0, 0, 0, 0, 0, 0, - 0, 207, 208, 34, 35, 0, 37, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, - 0, 0, 139, 0, 0, 0, 0, 304, 305, 0, - 0, 0, 0, 0, 16, 6, 0, 0, 0, 0, - 0, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 157, 0, 0, 0, 0, 158, 0, 0, - 16, 6, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 402, 0, 0, 0, - 0, 403, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, + 0, 47, 0, 280, 0, 0, -193, -193, 0, -193, + 0, 0, 0, -193, 0, 0, 0, 48, 49, 0, + 0, 33, -193, 0, 0, -193, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 46, 0, -193, -193, 47, 0, 0, 0, 0, + -194, -194, 0, -194, 0, 0, 0, -194, 0, 0, + 0, 48, 49, 0, 0, 33, -194, 0, 0, -194, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 34, + 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, + 44, 45, 0, 0, 0, 103, 0, -194, -194, 47, + 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, + 0, 0, 155, 0, 0, 48, 49, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 50, 0, 0, 51, 16, 6, 29, 52, + 53, 54, 55, 126, 127, 128, 129, 130, 131, 132, + 133, 399, 0, 0, 0, 0, 400, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 401, 0, 0, 0, 0, + 402, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 404, 0, 0, 0, 0, 405, 0, 0, 0, 0, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 406, 0, 0, 0, 0, 407, - 0, 0, 0, 0, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 371, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 373, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 377, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 403, + 0, 0, 0, 0, 404, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 368, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 370, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 389, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 401, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 436, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 374, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 386, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 410, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 433, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 255, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 258, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 314, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 317, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 320, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 257, 0, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 261, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 114, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 126, 127, + 128, 129, 130, 131, 132, 133, 326, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 317, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 320, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 323, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 324, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 260, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 117, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 329, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 343, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 0, 0, 0, 0, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 0, 0, 0, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 0, 0, - 125, 126, 127, 128, 0, 0, 0, 0, 130, 0, - 132, 133, 134, 135, 136, 0, 0, 0, 0, 0, - 132, 133, 134, 135, 136 + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 340, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 116, + 117, 0, 119, 120, 121, 122, 123, 124, 125, 116, + 117, 0, 0, 120, 121, 122, 123, 124, 125, 0, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 127, 128, 129, 130, 131, 132, + 133, 0, 0, 0, 127, 0, 129, 130, 131, 132, + 133, 116, 117, 0, 0, 120, 121, 122, 123, 124, + 125, 116, 117, 0, 0, 0, 0, 122, 123, 124, + 125, 0, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 274, 75, 8, 3, - 4, 20, 44, 48, 274, 22, 274, 147, 3, 4, - 5, 6, 7, 48, 44, 25, 0, 45, 32, 33, - 54, 35, 50, 54, 34, 35, 40, 41, 42, 43, - 34, 35, 91, 50, 48, 9, 10, 47, 12, 13, - 70, 44, 56, 57, 89, 90, 44, 187, 45, 52, - 90, 106, 192, 50, 89, 90, 54, 45, 32, 33, - 45, 35, 50, 90, 45, 75, 48, 207, 208, 50, - 46, 75, 212, 45, 48, 89, 90, 51, 50, 45, - 45, 45, 56, 57, 50, 50, 50, 97, 45, 89, - 90, 32, 33, 50, 35, 90, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 85, 52, - 51, 147, 45, 48, 91, 89, 90, 50, 95, 96, - 97, 98, 45, 45, 54, 147, 266, 50, 50, 139, - 86, 87, 88, 45, 274, 145, 414, 147, 50, 94, - 95, 44, 152, 147, 414, 155, 414, 52, 89, 90, - 48, 187, 32, 33, 44, 35, 192, 52, 50, 48, - 40, 41, 42, 43, 244, 187, 244, 49, 48, 44, - 192, 207, 208, 183, 52, 44, 212, 187, 197, 44, - 54, 44, 192, 187, 44, 207, 208, 44, 192, 44, - 212, 84, 85, 86, 87, 88, 54, 207, 208, 53, - 44, 54, 212, 207, 208, 54, 26, 44, 212, 89, - 90, 291, 292, 291, 292, 48, 54, 44, 54, 54, - 32, 33, 54, 35, 54, 45, 44, 39, 48, 49, - 266, 371, 49, 373, 244, 45, 48, 19, 274, 51, - 244, 44, 53, 95, 266, 53, 44, 44, 44, 49, - 49, 44, 274, 54, 49, 44, 266, 44, 338, 44, - 338, 44, 266, 17, 274, 275, 54, 22, 54, 45, - 274, 8, 412, 377, 414, 415, 54, 89, 90, 54, - 54, 291, 292, 54, 54, 54, 106, 291, 292, 45, - 54, 54, 45, 45, 54, 435, 436, 54, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 8, 138, 8, - 187, 414, -1, -1, 197, -1, -1, -1, 338, -1, - 150, -1, -1, 153, 338, 371, 156, 373, 158, -1, - 160, -1, -1, -1, -1, 192, -1, -1, 403, 371, - 405, 373, 407, -1, -1, -1, 147, 58, 59, -1, - -1, 371, -1, 373, -1, 212, 376, 371, 188, 373, - -1, -1, -1, -1, -1, -1, 412, -1, 414, 415, - -1, 201, 147, 84, 85, 86, 87, 88, -1, 147, - 412, -1, 414, 415, -1, -1, 187, -1, -1, 435, - 436, 192, 412, -1, 414, 415, -1, -1, 412, -1, - 414, 415, -1, 435, 436, -1, 207, 208, -1, 266, - -1, 212, 187, -1, -1, 435, 436, 192, -1, 187, - -1, 435, 436, -1, 192, -1, -1, 147, -1, -1, - 260, -1, 207, 208, -1, -1, -1, 212, -1, 207, - 208, 271, -1, 273, 212, -1, 276, 32, 33, 144, - 35, -1, -1, -1, 39, -1, 151, -1, 288, 154, - -1, -1, 147, 48, -1, 266, 51, 187, -1, -1, - -1, -1, 192, 274, -1, -1, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 207, 208, -1, - -1, 266, 212, -1, 324, -1, 147, -1, 266, 274, - -1, -1, 187, -1, 89, 90, 274, 192, -1, -1, - -1, -1, -1, -1, 371, -1, 373, 347, 348, 349, - 350, -1, 207, 208, -1, -1, -1, 212, -1, -1, - -1, -1, -1, -1, -1, -1, 187, -1, -1, -1, - -1, 192, 372, -1, 374, 375, 266, -1, -1, -1, - -1, -1, -1, -1, 274, 412, 207, 208, 415, -1, - -1, 212, -1, -1, 32, 33, -1, 35, -1, 264, - 371, 39, 373, -1, -1, -1, 44, -1, 435, 436, - 48, 266, -1, 51, 52, -1, 416, -1, -1, 274, - -1, 286, 287, -1, -1, -1, 371, -1, 373, -1, - -1, 32, 33, 371, 35, 373, -1, -1, 39, -1, - -1, 412, -1, 414, 415, 266, -1, 48, -1, -1, - 51, 89, 90, 274, 319, -1, -1, 322, -1, -1, - -1, -1, -1, -1, 435, 436, -1, 412, -1, 414, - 415, -1, -1, -1, 412, -1, 414, 415, -1, -1, - -1, 371, -1, 373, -1, -1, -1, -1, 89, 90, - 435, 436, -1, -1, -1, -1, -1, 435, 436, -1, - 58, 59, -1, 368, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, -1, -1, 371, -1, 373, 384, - -1, 386, 412, 388, 414, 415, 84, 85, 86, 87, - 88, -1, 32, 33, -1, 35, -1, -1, -1, 39, - -1, -1, 8, -1, -1, 435, 436, -1, 48, -1, - 371, 51, 373, -1, -1, -1, -1, 412, -1, 414, - 415, -1, -1, -1, -1, -1, 32, 33, 34, 35, - 36, 37, 38, -1, 40, 41, 42, 43, 44, -1, - 435, 436, 48, 49, -1, -1, 52, -1, -1, 89, - 90, 412, -1, 414, 415, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, -1, -1, -1, -1, 8, - -1, -1, -1, -1, 435, 436, -1, -1, -1, 85, - -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 32, 33, 34, 35, 36, 37, 38, - -1, 40, 41, 42, 43, 44, -1, -1, -1, 48, - -1, -1, -1, 52, -1, 54, 32, 33, -1, 35, - -1, 32, 33, 39, 35, -1, -1, -1, 39, 68, - 69, -1, 48, -1, -1, 51, 8, 48, -1, -1, - 51, -1, -1, -1, -1, -1, 85, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, 89, 90, -1, 48, -1, 89, 90, - 52, -1, -1, 32, 33, -1, 35, -1, 32, 33, - 39, 35, -1, -1, -1, 39, 68, 69, -1, 48, - -1, -1, 51, 8, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 32, 33, 34, - 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, - 89, 90, -1, 48, -1, 89, 90, 52, 58, 59, - -1, 61, 62, 63, 64, 65, 66, 67, -1, -1, - -1, -1, -1, 68, 69, -1, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, - 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 3, -1, -1, -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, -1, - -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, - -1, -1, -1, -1, -1, 3, 4, 56, 57, -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, - 89, 90, 40, 41, 42, 43, 32, 33, 46, 35, - 48, -1, -1, 39, -1, -1, 3, -1, 56, 57, - -1, -1, 48, -1, 11, 51, -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, 89, 90, 40, 41, 42, 43, -1, -1, 46, - 47, 48, -1, 89, 90, -1, -1, 3, 4, 56, - 57, -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, 89, 90, 40, 41, 42, 43, -1, -1, - 46, -1, 48, -1, -1, -1, -1, -1, 3, -1, - 56, 57, -1, -1, -1, -1, 11, -1, -1, 14, + 0, 46, 72, 3, 4, 93, 189, 72, 8, 3, + 4, 271, 48, 141, 271, 48, 22, 271, 89, 90, + 148, 44, 20, 151, 44, 25, 209, 3, 4, 5, + 6, 7, 85, 44, 34, 35, 94, 95, 91, 0, + 34, 35, 95, 54, 50, 32, 33, 47, 35, 54, + 70, 54, 44, 89, 90, 90, 89, 90, 103, 144, + 52, 48, 45, 45, 51, 91, 45, 50, 50, 56, + 57, 50, 72, 45, 45, 48, 45, 45, 72, 50, + 263, 50, 50, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 94, 45, 45, 90, 52, 184, + 50, 50, 89, 90, 189, 45, 32, 33, 54, 35, + 50, 58, 59, 39, 90, 46, 45, 44, 44, 204, + 205, 50, 48, 45, 209, 51, 52, 48, 50, 45, + 45, 48, 144, 261, 50, 50, 136, 84, 85, 86, + 87, 88, 142, 52, 144, 86, 87, 88, 44, 149, + 144, 411, 152, 52, 411, 283, 284, 411, 48, 32, + 33, 50, 35, 89, 90, 49, 44, 40, 41, 42, + 43, 241, 184, 52, 44, 48, 241, 189, 263, 54, + 180, 44, 44, 44, 184, 368, 271, 370, 316, 189, + 184, 319, 204, 205, 44, 189, 194, 209, 84, 85, + 86, 87, 88, 44, 204, 205, 53, 44, 54, 209, + 204, 205, 54, 26, 54, 209, 89, 90, 288, 289, + 44, 48, 54, 288, 289, 54, 409, 44, 54, 412, + 44, 49, 45, 54, 54, 48, 49, 365, 45, 19, + 95, 241, 32, 33, 53, 35, 44, 241, 53, 432, + 433, 263, 44, 381, 49, 383, 44, 385, 48, 271, + 44, 51, 49, 263, 49, 335, 44, 44, 54, 263, + 335, 271, 272, 54, 44, 44, 44, 271, 54, 54, + 17, 54, 22, 368, 184, 370, 374, 54, 288, 289, + 103, 54, 54, 54, 288, 289, 54, 45, 45, 89, + 90, 45, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 144, 135, 45, 409, 54, 411, 412, 54, 8, + 54, 8, 8, 411, 147, 335, 194, 150, -1, -1, + 153, 335, 155, -1, 157, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 400, 368, 402, 370, 404, + -1, 184, -1, -1, -1, -1, 189, -1, 368, -1, + 370, -1, 185, 373, 368, -1, 370, 32, 33, -1, + 35, 204, 205, -1, 39, 198, 209, -1, -1, -1, + -1, 144, -1, 48, -1, -1, 51, 409, -1, 411, + 412, 144, -1, -1, -1, -1, -1, -1, -1, 409, + -1, 411, 412, -1, -1, 409, -1, 411, 412, 144, + 432, 433, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 184, 432, 433, 89, 90, 189, -1, 432, 433, + 263, 184, -1, -1, 257, -1, 189, -1, 271, -1, + -1, 204, 205, -1, -1, 268, 209, 270, -1, 184, + 273, 204, 205, -1, 189, -1, 209, 32, 33, -1, + 35, -1, 285, -1, 39, -1, 144, -1, -1, 204, + 205, -1, -1, 48, 209, -1, 51, -1, -1, -1, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, -1, -1, 144, -1, -1, -1, -1, 321, 144, + 263, -1, -1, -1, -1, -1, 184, -1, 271, -1, + 263, 189, -1, -1, 89, 90, -1, -1, 271, -1, + -1, 344, 345, 346, 347, -1, 204, 205, 263, -1, + -1, 209, -1, 184, -1, 368, 271, 370, 189, 184, + -1, -1, -1, -1, 189, -1, 369, -1, 371, 372, + -1, -1, -1, 204, 205, -1, -1, -1, 209, 204, + 205, -1, -1, -1, 209, -1, -1, -1, -1, -1, + -1, -1, 32, 33, -1, 35, 409, -1, 411, 412, + 40, 41, 42, 43, -1, 263, -1, -1, 48, -1, + 413, -1, -1, 271, -1, -1, 56, 57, -1, 432, + 433, -1, -1, 32, 33, 368, 35, 370, -1, -1, + 39, -1, 263, -1, -1, 368, -1, 370, 263, 48, + 271, -1, 51, -1, -1, -1, 271, -1, -1, 89, + 90, 32, 33, 368, 35, 370, 32, 33, 39, 35, + -1, -1, -1, 39, -1, -1, 409, 48, 411, 412, + 51, -1, 48, -1, -1, 51, 409, -1, 411, 412, + 89, 90, -1, -1, -1, -1, -1, -1, -1, 432, + 433, -1, -1, -1, 409, -1, 411, 412, -1, 432, + 433, -1, 9, 10, -1, 12, 13, -1, 89, 90, + 368, -1, 370, 89, 90, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 48, -1, 368, 51, 370, -1, -1, -1, 56, + 57, 409, -1, 411, 412, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 432, 433, -1, -1, 409, -1, + 411, 412, 89, 90, 409, -1, 411, 412, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, + -1, 432, 433, -1, -1, -1, 11, 432, 433, 14, 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, 89, 90, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - -1, 56, 57, 32, 33, -1, 35, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, - -1, -1, 51, -1, -1, -1, -1, 56, 57, -1, - -1, -1, -1, -1, 89, 90, -1, -1, -1, -1, - -1, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 45, -1, -1, -1, -1, 50, -1, -1, - 89, 90, 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, -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, -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, - 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, + 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, + -1, 46, 47, 48, -1, -1, -1, -1, -1, 3, + 4, 56, 57, -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, 89, 90, 40, 41, 42, 43, + 32, 33, 46, 35, 48, -1, -1, 39, -1, -1, + 3, -1, 56, 57, -1, -1, 48, -1, 11, 51, + -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, 89, 90, 40, 41, 42, + 43, -1, -1, 46, 47, 48, -1, 89, 90, -1, + -1, 3, 4, 56, 57, -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, 89, 90, 40, 41, + 42, 43, 32, 33, 46, 35, 48, -1, -1, 39, + -1, -1, 3, -1, 56, 57, -1, -1, 48, -1, + 11, 51, -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, 89, 90, 40, + 41, 42, 43, -1, -1, 46, -1, 48, -1, 89, + 90, -1, -1, -1, -1, 56, 57, 32, 33, 34, + 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, + 50, -1, -1, 48, 49, 55, -1, 52, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 89, 90, + -1, -1, -1, 68, 69, -1, -1, 8, -1, -1, + -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, + 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 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, 32, 33, -1, 35, + -1, -1, -1, 39, -1, -1, -1, 68, 69, -1, + -1, 8, 48, -1, -1, 51, -1, -1, -1, -1, + -1, -1, -1, -1, 85, -1, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 32, 33, 34, 35, 36, + 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, + -1, 48, -1, 89, 90, 52, -1, -1, -1, -1, + 32, 33, -1, 35, -1, -1, -1, 39, -1, -1, + -1, 68, 69, -1, -1, 8, 48, -1, -1, 51, + -1, -1, -1, -1, -1, -1, -1, -1, 85, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 32, + 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, + 43, 44, -1, -1, -1, 48, -1, 89, 90, 52, + -1, -1, -1, -1, -1, -1, -1, 45, -1, -1, + -1, -1, 50, -1, -1, 68, 69, 55, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, 85, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 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, 54, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 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, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 54, 55, -1, -1, 58, 59, 60, 61, 62, 63, + -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, -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, 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, -1, 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, -1, 82, 83, 84, - 85, 86, 87, 88, 58, 59, -1, -1, 62, 63, - 64, 65, 66, 67, 58, 59, -1, -1, -1, -1, - 64, 65, 66, 67, -1, -1, -1, -1, 82, -1, - 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, - 84, 85, 86, 87, 88 + 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, 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, 53, -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, 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, -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, 58, 59, -1, -1, -1, -1, 64, 65, 66, + 67, -1, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 109, 110, 111, - 112, 113, 114, 115, 116, 179, 89, 179, 180, 180, - 44, 0, 111, 112, 113, 44, 70, 54, 54, 91, - 182, 161, 179, 8, 32, 33, 34, 35, 36, 37, + 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, + 109, 110, 111, 112, 113, 176, 89, 176, 177, 177, + 44, 0, 108, 109, 110, 44, 70, 54, 54, 91, + 179, 158, 176, 8, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 92, 93, 94, 95, 96, 97, 98, 146, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 85, 88, 92, 93, 94, 95, 143, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 161, 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, 187, 188, 45, 45, 50, 48, 179, - 180, 48, 179, 180, 48, 146, 48, 49, 146, 162, - 163, 179, 146, 146, 94, 95, 90, 54, 55, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 81, - 82, 83, 84, 85, 86, 87, 88, 39, 48, 51, - 158, 159, 179, 180, 44, 52, 54, 46, 119, 179, - 48, 44, 52, 48, 44, 52, 48, 45, 50, 146, - 50, 49, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 179, 52, 162, 163, 179, 3, 11, 14, - 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 47, 48, 56, 57, 117, - 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, + 184, 185, 45, 45, 50, 48, 176, 177, 48, 176, + 177, 48, 143, 48, 49, 143, 159, 160, 176, 143, + 143, 94, 95, 90, 54, 55, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, + 85, 86, 87, 88, 39, 48, 51, 155, 156, 176, + 177, 44, 52, 54, 46, 116, 176, 48, 44, 52, + 48, 44, 52, 48, 45, 50, 143, 50, 49, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 176, + 52, 159, 160, 176, 3, 11, 14, 15, 16, 18, + 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 47, 48, 56, 57, 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, 142, 143, 144, 145, 148, 149, 150, - 156, 157, 165, 166, 169, 173, 174, 175, 176, 179, - 146, 162, 179, 146, 162, 179, 146, 146, 49, 146, - 53, 49, 179, 45, 44, 4, 120, 146, 54, 44, - 54, 44, 117, 44, 44, 44, 44, 85, 182, 186, - 53, 54, 54, 54, 146, 54, 44, 44, 48, 156, - 157, 169, 169, 47, 117, 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, 146, 162, 4, 54, - 45, 146, 19, 146, 121, 148, 149, 150, 169, 179, - 146, 53, 53, 54, 162, 162, 146, 44, 44, 44, - 44, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 49, 162, 49, 162, 49, 146, 44, 45, - 54, 45, 44, 45, 54, 22, 50, 45, 45, 45, - 146, 146, 146, 146, 44, 45, 44, 45, 44, 45, - 162, 117, 146, 117, 146, 147, 146, 179, 119, 54, - 54, 45, 45, 50, 45, 50, 45, 50, 162, 162, - 162, 45, 17, 45, 54, 45, 22, 54, 54, 163, - 54, 163, 54, 163, 45, 45, 45, 117, 54, 121, - 117, 146, 45, 45, 45, 45, 45, 54, 54, 54, - 117, 117 + 139, 140, 141, 142, 145, 146, 147, 153, 154, 162, + 163, 166, 170, 171, 172, 173, 176, 143, 159, 176, + 143, 159, 176, 143, 143, 49, 143, 53, 49, 176, + 45, 44, 4, 117, 143, 54, 44, 54, 44, 114, + 44, 44, 44, 44, 85, 179, 183, 53, 54, 54, + 54, 143, 54, 44, 44, 48, 153, 154, 166, 166, + 47, 114, 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, 143, 159, 4, 54, 45, 143, 19, + 143, 118, 145, 146, 147, 166, 176, 143, 53, 53, + 54, 159, 159, 143, 44, 44, 44, 44, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 49, + 159, 49, 159, 49, 143, 44, 45, 54, 45, 44, + 45, 54, 22, 50, 45, 45, 45, 143, 143, 143, + 143, 44, 45, 44, 45, 44, 45, 159, 114, 143, + 114, 143, 144, 143, 176, 116, 54, 54, 45, 45, + 50, 45, 50, 45, 50, 159, 159, 159, 45, 17, + 45, 54, 45, 22, 54, 54, 160, 54, 160, 54, + 160, 45, 45, 45, 114, 54, 118, 114, 143, 45, + 45, 45, 45, 45, 54, 54, 54, 114, 114 }; 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, 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, 164, 165, 166, 167, 168, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 180, 181, 182, - 183, 184, 185, 185, 186, 186, 186, 186, 186, 187, - 188 + 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, 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, 127, 128, 129, 130, 131, 132, 133, 133, 134, + 135, 135, 136, 137, 138, 139, 139, 140, 141, 142, + 143, 143, 143, 144, 144, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 146, 146, 147, 147, + 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 151, 152, 153, + 153, 154, 154, 155, 155, 155, 155, 155, 155, 156, + 156, 156, 156, 157, 158, 158, 158, 159, 159, 160, + 160, 161, 161, 162, 163, 164, 165, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 177, 178, 179, + 180, 181, 182, 182, 183, 183, 184, 185 }; const signed char @@ -4486,8 +4436,7 @@ namespace xsk { namespace gsc { namespace h1 { 1, 2, 3, 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 7, 2, 1, 2, 1, 1, 1, 1, 1, - 1 + 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4497,29 +4446,28 @@ namespace xsk { namespace gsc { namespace h1 { const short parser::yyrline_[] = { - 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, 718, 723, 728, 729, 730, - 731, 732, 733, 734, 735, 736, 740, 745, 750, 755, - 760, 765, 770, 775, 780, 785, 790, 792, 797, 802, - 807, 812, 817, 819, 824, 826, 828, 830, 832, 837, - 842 + 0, 251, 251, 252, 256, 258, 260, 262, 264, 266, + 271, 275, 280, 281, 282, 283, 284, 288, 293, 298, + 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, 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, 414, 419, 424, 429, 434, 439, 444, 446, 451, + 456, 458, 463, 468, 473, 478, 480, 485, 490, 495, + 500, 501, 502, 506, 507, 511, 513, 515, 517, 519, + 521, 523, 525, 527, 529, 531, 536, 538, 543, 545, + 550, 555, 557, 559, 561, 563, 565, 567, 569, 571, + 573, 575, 577, 579, 581, 583, 585, 587, 589, 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, 625, 630, 635, + 636, 639, 640, 644, 646, 648, 650, 652, 654, 659, + 661, 663, 665, 670, 675, 677, 680, 684, 687, 691, + 693, 698, 700, 705, 710, 715, 720, 725, 726, 727, + 728, 729, 730, 731, 732, 733, 737, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 789, 794, 799, + 804, 809, 814, 816, 821, 823, 828, 833 }; void @@ -4552,9 +4500,9 @@ namespace xsk { namespace gsc { namespace h1 { #line 13 "parser.ypp" } } } // xsk::gsc::h1 -#line 4556 "parser.cpp" +#line 4504 "parser.cpp" -#line 846 "parser.ypp" +#line 837 "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 3a766cc..3a62bfc 100644 --- a/src/h1/xsk/parser.hpp +++ b/src/h1/xsk/parser.hpp @@ -624,10 +624,7 @@ namespace xsk { namespace gsc { namespace h1 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy67[sizeof (std::string)]; }; @@ -772,19 +769,16 @@ namespace xsk { namespace gsc { namespace h1 { ISTRING = 92, // "localized string" COLOR = 93, // "color" FLOAT = 94, // "float" - INT_DEC = 95, // "int" - INT_OCT = 96, // "octal int" - INT_BIN = 97, // "binary int" - INT_HEX = 98, // "hexadecimal int" - 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 + 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 }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -801,7 +795,7 @@ namespace xsk { namespace gsc { namespace h1 { { enum symbol_kind_type { - YYNTOKENS = 108, ///< Number of tokens. + YYNTOKENS = 105, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -898,100 +892,97 @@ namespace xsk { namespace gsc { namespace h1 { S_ISTRING = 92, // "localized string" S_COLOR = 93, // "color" S_FLOAT = 94, // "float" - S_INT_DEC = 95, // "int" - S_INT_OCT = 96, // "octal int" - S_INT_BIN = 97, // "binary int" - S_INT_HEX = 98, // "hexadecimal int" - 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_reference = 164, // expr_reference - S_expr_array = 165, // expr_array - S_expr_field = 166, // expr_field - S_expr_size = 167, // expr_size - S_expr_paren = 168, // expr_paren - S_expr_object = 169, // expr_object - S_expr_thisthread = 170, // expr_thisthread - S_expr_empty_array = 171, // expr_empty_array - S_expr_undefined = 172, // expr_undefined - S_expr_game = 173, // expr_game - S_expr_self = 174, // expr_self - S_expr_anim = 175, // expr_anim - S_expr_level = 176, // expr_level - S_expr_animation = 177, // expr_animation - S_expr_animtree = 178, // expr_animtree - S_expr_identifier = 179, // expr_identifier - S_expr_path = 180, // expr_path - S_expr_istring = 181, // expr_istring - S_expr_string = 182, // expr_string - S_expr_color = 183, // expr_color - S_expr_vector = 184, // expr_vector - S_expr_float = 185, // expr_float - S_expr_integer = 186, // expr_integer - S_expr_false = 187, // expr_false - S_expr_true = 188 // expr_true + 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_waitframe = 127, // stmt_waitframe + S_stmt_if = 128, // stmt_if + S_stmt_ifelse = 129, // stmt_ifelse + S_stmt_while = 130, // stmt_while + S_stmt_dowhile = 131, // stmt_dowhile + S_stmt_for = 132, // stmt_for + S_stmt_foreach = 133, // stmt_foreach + S_stmt_switch = 134, // stmt_switch + S_stmt_case = 135, // stmt_case + S_stmt_default = 136, // stmt_default + S_stmt_break = 137, // stmt_break + S_stmt_continue = 138, // stmt_continue + S_stmt_return = 139, // stmt_return + S_stmt_breakpoint = 140, // stmt_breakpoint + S_stmt_prof_begin = 141, // stmt_prof_begin + S_stmt_prof_end = 142, // stmt_prof_end + S_expr = 143, // expr + S_expr_or_empty = 144, // expr_or_empty + S_expr_assign = 145, // expr_assign + S_expr_increment = 146, // expr_increment + S_expr_decrement = 147, // expr_decrement + S_expr_ternary = 148, // expr_ternary + S_expr_binary = 149, // expr_binary + S_expr_primitive = 150, // expr_primitive + S_expr_complement = 151, // expr_complement + S_expr_not = 152, // expr_not + S_expr_call = 153, // expr_call + S_expr_method = 154, // expr_method + S_expr_function = 155, // expr_function + S_expr_pointer = 156, // expr_pointer + S_expr_add_array = 157, // expr_add_array + S_expr_parameters = 158, // expr_parameters + S_expr_arguments = 159, // expr_arguments + S_expr_arguments_no_empty = 160, // expr_arguments_no_empty + S_expr_reference = 161, // expr_reference + S_expr_array = 162, // expr_array + S_expr_field = 163, // expr_field + S_expr_size = 164, // expr_size + S_expr_paren = 165, // expr_paren + S_expr_object = 166, // expr_object + S_expr_thisthread = 167, // expr_thisthread + S_expr_empty_array = 168, // expr_empty_array + S_expr_undefined = 169, // expr_undefined + S_expr_game = 170, // expr_game + S_expr_self = 171, // expr_self + S_expr_anim = 172, // expr_anim + S_expr_level = 173, // expr_level + S_expr_animation = 174, // expr_animation + S_expr_animtree = 175, // expr_animtree + S_expr_identifier = 176, // expr_identifier + S_expr_path = 177, // expr_path + S_expr_istring = 178, // expr_istring + S_expr_string = 179, // expr_string + S_expr_color = 180, // expr_color + S_expr_vector = 181, // expr_vector + S_expr_float = 182, // expr_float + S_expr_integer = 183, // expr_integer + S_expr_false = 184, // expr_false + S_expr_true = 185 // expr_true }; }; @@ -1310,10 +1301,7 @@ namespace xsk { namespace gsc { namespace h1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2582,10 +2570,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2695,7 +2680,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - H1_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + H1_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4173,61 +4158,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4709,7 +4649,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2254, ///< Last index in yytable_. + yylast_ = 2191, ///< Last index in yytable_. yynnts_ = 81, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -5020,10 +4960,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5338,10 +5275,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5408,7 +5342,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::h1 -#line 5412 "parser.hpp" +#line 5346 "parser.hpp" diff --git a/src/h1/xsk/resolver.cpp b/src/h1/xsk/resolver.cpp index f1d8245..722cc84 100644 --- a/src/h1/xsk/resolver.cpp +++ b/src/h1/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::h1 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +125,19 @@ auto resolver::file_name(std::uint16_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +154,16 @@ auto resolver::token_name(std::uint16_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -164,165 +188,183 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 154> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, - { std::uint8_t(opcode::OP_waitFrame), "WAITFRAME" }, + { 0x17, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x18, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x19, "RETN" }, + { 0x1A, "CALL_BUILTIN_FUNC_0" }, + { 0x1B, "CALL_BUILTIN_FUNC_1" }, + { 0x1C, "CALL_BUILTIN_FUNC_2" }, + { 0x1D, "CALL_BUILTIN_FUNC_3" }, + { 0x1E, "CALL_BUILTIN_FUNC_4" }, + { 0x1F, "CALL_BUILTIN_FUNC_5" }, + { 0x20, "CALL_BUILTIN_FUNC" }, + { 0x21, "BOOL_NOT" }, + { 0x22, "CALL_FAR_METHOD_THEAD" }, + { 0x23, "JMP_EXPR_TRUE" }, + { 0x24, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x25, "CAST_BOOL" }, + { 0x26, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x27, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x28, "INEQUALITY" }, + { 0x29, "GET_THISTHREAD" }, + { 0x2A, "CLEAR_FIELD_VARIABLE" }, + { 0x2B, "GET_FLOAT" }, + { 0x2C, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x2D, "CALL_FAR_FUNC2" }, + { 0x2E, "CALL_FAR_FUNC" }, + { 0x2F, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x30, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x31, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x32, "CHECK_CLEAR_PARAMS" }, + { 0x33, "CAST_FIELD_OBJ" }, + { 0x34, "END" }, + { 0x35, "SIZE" }, + { 0x36, "EMPTY_ARRAY" }, + { 0x37, "BIT_AND" }, + { 0x38, "LESSEQUAL" }, + { 0x39, "VOIDCODEPOS" }, + { 0x3A, "CALL_METHOD_THREAD_POINTER" }, + { 0x3B, "ENDSWITCH" }, + { 0x3C, "CLEAR_VARIABLE_FIELD" }, + { 0x3D, "DIV" }, + { 0x3E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x3F, "GET_USHORT" }, + { 0x40, "JMP_TRUE" }, + { 0x41, "GET_SELF" }, + { 0x42, "CALL_FAR_FUNC_THREAD" }, + { 0x43, "CALL_LOCAL_FUNC_THREAD" }, + { 0x44, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x45, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x46, "PLUS" }, + { 0x47, "BOOL_COMPLEMENT" }, + { 0x48, "CALL_METHOD_POINTER" }, + { 0x49, "INC" }, + { 0x4A, "REMOVE_LOCAL_VARIABLES" }, + { 0x4B, "JMP_EXPR_FALSE" }, + { 0x4C, "SWITCH" }, + { 0x4D, "CLEAR_PARAMS" }, + { 0x4E, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x4F, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x50, "CALL_LOCAL_METHOD" }, + { 0x51, "EVAL_FIELD_VARIABLE" }, + { 0x52, "EVAL_FIELD_VARIABLE_REF" }, + { 0x53, "GET_STRING" }, + { 0x54, "CALL_FUNC_POINTER" }, + { 0x55, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x56, "GET_VECTOR" }, + { 0x57, "ENDON" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "GET_SELF_OBJ" }, + { 0x5A, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x5B, "SET_VARIABLE_FIELD" }, + { 0x5C, "CALL_LOCAL_FUNC2" }, + { 0x5D, "CALL_LOCAL_FUNC" }, + { 0x5E, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x5F, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x60, "GET_FAR_FUNC" }, + { 0x61, "LESS" }, + { 0x62, "GET_GAME_REF" }, + { 0x63, "WAITFRAME" }, + { 0x64, "WAITTILLFRAMEEND" }, + { 0x65, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x66, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x67, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x68, "GET_LEVEL" }, + { 0x69, "NOTIFY" }, + { 0x6A, "DEC_TOP" }, + { 0x6B, "SHIFT_LEFT" }, + { 0x6C, "CALL_LOCAL_METHOD_THREAD" }, + { 0x6D, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x6E, "GREATER" }, + { 0x6F, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x70, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x71, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x72, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x73, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x74, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x75, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x76, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x77, "JMP" }, + { 0x78, "CALL_FUNC_THREAD_POINTER" }, + { 0x79, "GET_ZERO" }, + { 0x7A, "WAIT" }, + { 0x7B, "MINUS" }, + { 0x7C, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7D, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x7E, "MULT" }, + { 0x7F, "CREATE_LOCAL_VARIABLE" }, + { 0x80, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x81, "GET_INT" }, + { 0x82, "MOD" }, + { 0x83, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x84, "GET_BUILTIN_FUNC" }, + { 0x85, "GET_GAME" }, + { 0x86, "WAITTILL" }, + { 0x87, "DEC" }, + { 0x88, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x89, "PRE_CALL" }, + { 0x8A, "GET_ANIM" }, + { 0x8B, "GET_UNDEFINED" }, + { 0x8C, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x8D, "GET_ANIM_OBJ" }, + { 0x8E, "GET_LEVEL_OBJ" }, + { 0x8F, "BIT_EXOR" }, + { 0x90, "EQUALITY" }, + { 0x91, "CLEAR_ARRAY" }, + { 0x92, "JMP_BACK" }, + { 0x93, "GET_ANIMATION" }, + { 0x94, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x95, "GET_ANIMTREE" }, + { 0x96, "GET_ISTRING" }, + { 0x97, "EVAL_ARRAY_REF" }, + { 0x98, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x99, "GET_NBYTE" }, + { 0x9A, "GET_BUILTIN_METHOD" }, + { 0x9B, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x9C, "EVAL_ARRAY" }, + { 0x9D, "VECTOR" }, + { 0x9E, "CALL_FAR_METHOD" }, + { 0x9F, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0xA0, "GET_BYTE" }, + { 0xA1, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0xA2, "BIT_OR" }, + { 0xA3, "ADD_ARRAY" }, + { 0xA4, "WAITTILLMATCH2" }, + { 0xA5, "WAITTILLMATCH" }, + { 0xA6, "GET_LOCAL_FUNC" }, + { 0xA7, "GET_NUSHORT" }, + { 0xA8, "SHIFT_RIGHT" }, + { 0xA9, "CALL_BUILTIN_METHOD_0" }, + { 0xAA, "CALL_BUILTIN_METHOD_1" }, + { 0xAB, "CALL_BUILTIN_METHOD_2" }, + { 0xAC, "CALL_BUILTIN_METHOD_3" }, + { 0xAD, "CALL_BUILTIN_METHOD_4" }, + { 0xAE, "CALL_BUILTIN_METHOD_5" }, + { 0xAF, "CALL_BUILTIN_METHOD" }, + { 0xB0, "JMP_FALSE" }, }}; -const std::array function_list +const std::array, 778> function_list {{ { 0x001, "_func_001" }, { 0x002, "_func_002" }, @@ -339,8 +381,8 @@ const std::array function_list { 0x00D, "_func_00D" }, { 0x00E, "_func_00E" }, { 0x00F, "_func_00F" }, - { 0x010, "_func_010" }, - { 0x011, "_func_011" }, + { 0x010, "print" }, + { 0x011, "println" }, { 0x012, "_func_012" }, { 0x013, "_func_013" }, { 0x014, "_func_014" }, @@ -586,13 +628,13 @@ const std::array function_list { 0x104, "_func_104" }, { 0x105, "_func_105" }, { 0x106, "_func_106" }, - { 0x107, "_func_107" }, - { 0x108, "_func_108" }, - { 0x109, "_func_109" }, - { 0x10A, "_func_10A" }, - { 0x10B, "_func_10B" }, - { 0x10C, "_func_10C" }, - { 0x10D, "_func_10D" }, + { 0x107, "createthreatbiasgroup" }, + { 0x108, "threatbiasgroupexists" }, + { 0x109, "getthreatbias" }, + { 0x10A, "setthreatbias" }, + { 0x10B, "setthreatbiasagainstall" }, + { 0x10C, "setignoremegroup" }, + { 0x10D, "isenemyteam" }, { 0x10E, "_func_10E" }, { 0x10F, "_func_10F" }, { 0x110, "_func_110" }, @@ -721,21 +763,21 @@ const std::array function_list { 0x18B, "_func_18B" }, { 0x18C, "_func_18C" }, { 0x18D, "_func_18D" }, - { 0x18E, "_func_18E" }, - { 0x18F, "_func_18F" }, - { 0x190, "_func_190" }, - { 0x191, "_func_191" }, - { 0x192, "_func_192" }, - { 0x193, "_func_193" }, - { 0x194, "_func_194" }, - { 0x195, "_func_195" }, - { 0x196, "_func_196" }, - { 0x197, "_func_197" }, - { 0x198, "_func_198" }, - { 0x199, "_func_199" }, - { 0x19A, "_func_19A" }, - { 0x19B, "_func_19B" }, - { 0x19C, "_func_19C" }, + { 0x18E, "objective_onentity" }, + { 0x18F, "objective_onentitywithrotation" }, + { 0x190, "objective_team" }, + { 0x191, "objective_player" }, + { 0x192, "objective_playerteam" }, + { 0x193, "objective_playerenemyteam" }, + { 0x194, "objective_playermask_hidefromall" }, + { 0x195, "objective_playermask_hidefrom" }, + { 0x196, "objective_playermask_showtoall" }, + { 0x197, "objective_playermask_showto" }, + { 0x198, "iprintln" }, + { 0x199, "iprintlnbold" }, + { 0x19A, "logstring" }, + { 0x19B, "getent" }, + { 0x19C, "getentarray" }, { 0x19D, "_func_19D" }, { 0x19E, "_func_19E" }, { 0x19F, "_func_19F" }, @@ -800,13 +842,13 @@ const std::array function_list { 0x1DA, "_func_1DA" }, { 0x1DB, "_func_1DB" }, { 0x1DC, "_func_1DC" }, - { 0x1DD, "_func_1DD" }, - { 0x1DE, "_func_1DE" }, - { 0x1DF, "_func_1DF" }, - { 0x1E0, "_func_1E0" }, + { 0x1DD, "objective_add" }, + { 0x1DE, "objective_delete" }, + { 0x1DF, "objective_state" }, + { 0x1E0, "objective_icon" }, { 0x1E1, "_func_1E1" }, - { 0x1E2, "_func_1E2" }, - { 0x1E3, "_func_1E3" }, + { 0x1E2, "objective_position" }, + { 0x1E3, "objective_current" }, { 0x1E4, "_func_1E4" }, { 0x1E5, "_func_1E5" }, { 0x1E6, "_func_1E6" }, @@ -976,7 +1018,7 @@ const std::array function_list { 0x28A, "_func_28A" }, { 0x28B, "_func_28B" }, { 0x28C, "_func_28C" }, - { 0x28D, "_func_28D" }, + { 0x28D, "isalliedsentient" }, { 0x28E, "_func_28E" }, { 0x28F, "_func_28F" }, { 0x290, "_func_290" }, @@ -1026,7 +1068,7 @@ const std::array function_list { 0x2BC, "_func_2BC" }, { 0x2BD, "_func_2BD" }, { 0x2BE, "_func_2BE" }, - { 0x2BF, "_func_2BF" }, + { 0x2BF, "objective_mlgspectator" }, { 0x2C0, "_func_2C0" }, { 0x2C1, "_func_2C1" }, { 0x2C2, "_func_2C2" }, @@ -1104,7 +1146,7 @@ const std::array function_list { 0x30A, "_func_30A" }, }}; -const std::array method_list +const std::array, 1415> method_list {{ { 0x8000, "_meth_8000" }, { 0x8001, "_meth_8001" }, @@ -2523,14 +2565,1371 @@ const std::array method_list { 0x8586, "_meth_8586" }, }}; -const std::array file_list +const std::array, 16> file_list {{ - { 0, "DUMMY" }, + { 0x53D, "codescripts/delete" }, + { 0x53E, "codescripts/struct" }, + { 0x53F, "codescripts/message" }, + { 0x540, "maps/mp/gametypes/_callbacksetup" }, + { 0xA4EF, "codescripts/character" }, + { 0xA4F0, "common_scripts/_artcommon" }, + { 0xA4F1, "common_scripts/_bcs_location_trigs" }, + { 0xA4F2, "common_scripts/_createfx" }, + { 0xA4F3, "common_scripts/_createfxmenu" }, + { 0xA4F4, "common_scripts/_destructible" }, + { 0xA4F5, "common_scripts/_dynamic_world" }, + { 0xA4F6, "common_scripts/_elevator" }, + { 0xA4F7, "common_scripts/_exploder" }, + { 0xA4F8, "common_scripts/_fx" }, + { 0xA4F9, "common_scripts/_pipes" }, + { 0xA4FA, "common_scripts/utility" }, }}; -const std::array token_list +const std::array, 1340> token_list {{ - { 0, "DUMMY" }, + { 0x0000, "" }, + { 0x0001, "pl#" }, + { 0x0002, "-" }, + { 0x0003, "radius`" }, + { 0x0004, "note:" }, + { 0x0005, "_" }, + { 0x0006, "_custom" }, + { 0x0007, "a" }, + { 0x0008, "ability" }, + { 0x0009, "accumulate" }, + { 0x000A, "accuracy" }, + { 0x000B, "actionslot1" }, + { 0x000C, "actionslot2" }, + { 0x000D, "actionslot3" }, + { 0x000E, "actionslot4" }, + { 0x000F, "actionslot5" }, + { 0x0010, "actionslot6" }, + { 0x0011, "actionslot7" }, + { 0x0012, "actionslot8" }, + { 0x0013, "activator" }, + { 0x0014, "active" }, + { 0x0015, "activecostume" }, + { 0x0016, "activeemblemslot" }, + { 0x0017, "activesquadmember" }, + { 0x0018, "activevisionset" }, + { 0x0019, "activevisionsetduration" }, + { 0x001A, "agent" }, + { 0x001B, "agenthealth" }, + { 0x001C, "agentname" }, + { 0x001D, "agentteam" }, + { 0x001E, "ai_event" }, + { 0x001F, "ai_sight_line_cycle_group" }, + { 0x0020, "ai_sight_line_group" }, + { 0x0021, "aim_highest_bone" }, + { 0x0022, "aim_vis_bone" }, + { 0x0023, "aiSpread" }, + { 0x0024, "aisquadmembers" }, + { 0x0025, "alert" }, + { 0x0026, "alertlevel" }, + { 0x0027, "alertlevelint" }, + { 0x0028, "alien" }, + { 0x0029, "alienplayerloadout" }, + { 0x002A, "alienplayerstats" }, + { 0x002B, "aliensession" }, + { 0x002C, "alignx" }, + { 0x002D, "aligny" }, + { 0x002E, "all" }, + { 0x002F, "allies" }, + { 0x0030, "allowcrouch" }, + { 0x0031, "allowdeath" }, + { 0x0032, "allowjump" }, + { 0x0033, "allowladders" }, + { 0x0034, "allowpain" }, + { 0x0035, "allowprone" }, + { 0x0036, "allstreaksrestricted" }, + { 0x0037, "alpha" }, + { 0x0038, "altmode" }, + { 0x0039, "always" }, + { 0x003A, "ambient" }, + { 0x003B, "ambienttrack" }, + { 0x003C, "ambienttrack_ac130" }, + { 0x003D, "ambush" }, + { 0x003E, "ambush_nodes_only" }, + { 0x003F, "angle_deltas" }, + { 0x0040, "anglelerprate" }, + { 0x0041, "angles" }, + { 0x0042, "anim_angle_delta" }, + { 0x0043, "anim_deltas" }, + { 0x0044, "anim_pose" }, + { 0x0045, "anim_will_finish" }, + { 0x0046, "animation" }, + { 0x0047, "animscript" }, + { 0x0048, "archived" }, + { 0x0049, "archivetime" }, + { 0x004A, "armor" }, + { 0x004B, "asleep" }, + { 0x004C, "aspectratio" }, + { 0x004D, "assaultstreaks" }, + { 0x004E, "assignedbucket" }, + { 0x004F, "assists" }, + { 0x0050, "attachment" }, + { 0x0051, "attachmentclassrestricted" }, + { 0x0052, "attachmentrestricted" }, + { 0x0053, "attachments" }, + { 0x0054, "attachtag" }, + { 0x0055, "attacker" }, + { 0x0056, "attackeraccuracy" }, + { 0x0057, "attackercount" }, + { 0x0058, "attackerisjuggernaut" }, + { 0x0059, "attackerpos" }, + { 0x005A, "author" }, + { 0x005B, "auto_ai" }, + { 0x005C, "auto_change" }, + { 0x005D, "auto_nonai" }, + { 0x005E, "avoidanceboundshalfsize" }, + { 0x005F, "awards" }, + { 0x0060, "axis" }, + { 0x0061, "b" }, + { 0x0062, "back" }, + { 0x0063, "back_left" }, + { 0x0064, "back_low" }, + { 0x0065, "back_mid" }, + { 0x0066, "back_right" }, + { 0x0067, "back_up" }, + { 0x0068, "background" }, + { 0x0069, "bad_guys" }, + { 0x006A, "bad_path" }, + { 0x006B, "badplaceawareness" }, + { 0x006C, "ball_off" }, + { 0x006D, "ball_on" }, + { 0x006E, "ball_pass" }, + { 0x006F, "bandwidthdown" }, + { 0x0070, "bandwidthtestcount" }, + { 0x0071, "bandwidthup" }, + { 0x0072, "baselineoverflow_max" }, + { 0x0073, "baselineoverflow_worst" }, + { 0x0074, "battery_discharge_begin" }, + { 0x0075, "battery_discharge_end" }, + { 0x0076, "begin" }, + { 0x0077, "begin_custom_anim" }, + { 0x0078, "begin_firing" }, + { 0x0079, "begin_firing_left" }, + { 0x007A, "bestweapon" }, + { 0x007B, "bestweaponindex" }, + { 0x007C, "bipods" }, + { 0x007D, "birthtime" }, + { 0x007E, "bl_rotor1" }, + { 0x007F, "bl_rotor2" }, + { 0x0080, "bl_rotor3" }, + { 0x0081, "blackops2prestige" }, + { 0x0082, "blackops2rank" }, + { 0x0083, "blade_hide" }, + { 0x0084, "blade_show" }, + { 0x0085, "blockfriendlies" }, + { 0x0086, "blurradius" }, + { 0x0087, "body" }, + { 0x0088, "body_animate_jnt" }, + { 0x0089, "bottomarc" }, + { 0x008A, "br_rotor1" }, + { 0x008B, "br_rotor2" }, + { 0x008C, "br_rotor3" }, + { 0x008D, "breadcrumbheader" }, + { 0x008E, "buff" }, + { 0x008F, "bullet_hitshield" }, + { 0x0090, "bullethit" }, + { 0x0091, "bulletwhizby" }, + { 0x0092, "c" }, + { 0x0093, "callingcardindex" }, + { 0x0094, "camo" }, + { 0x0095, "cancel_location" }, + { 0x0096, "canclimbladders" }, + { 0x0097, "canjumppath" }, + { 0x0098, "cardicon" }, + { 0x0099, "cardnameplate" }, + { 0x009A, "cardtitle" }, + { 0x009B, "cgmchecksum" }, + { 0x009C, "ch_prestige" }, + { 0x009D, "ch_prestige_max" }, + { 0x009E, "chainfallback" }, + { 0x009F, "chainnode" }, + { 0x00A0, "challengeprogress" }, + { 0x00A1, "challengestate" }, + { 0x00A2, "chest" }, + { 0x00A3, "churnscores" }, + { 0x00A4, "chyron_message1" }, + { 0x00A5, "chyron_message2" }, + { 0x00A6, "chyron_message3" }, + { 0x00A7, "civilian" }, + { 0x00A8, "clanidhigh" }, + { 0x00A9, "clanidlow" }, + { 0x00AA, "classname" }, + { 0x00AB, "clipdistance" }, + { 0x00AC, "code_classname" }, + { 0x00AD, "code_damageradius" }, + { 0x00AE, "code_move" }, + { 0x00AF, "code_move_slide" }, + { 0x00B0, "codecallback_agentadded" }, + { 0x00B1, "codecallback_agentdamaged" }, + { 0x00B2, "codecallback_agentkilled" }, + { 0x00B3, "codecallback_bullethitentity" }, + { 0x00B4, "codecallback_codeendgame" }, + { 0x00B5, "codecallback_entitydamage" }, + { 0x00B6, "codecallback_entityoutofworld" }, + { 0x00B7, "codecallback_handleinstantmessage" }, + { 0x00B8, "codecallback_hostmigration" }, + { 0x00B9, "codecallback_leaderdialog" }, + { 0x00BA, "codecallback_partymembers" }, + { 0x00BB, "codecallback_playerconnect" }, + { 0x00BC, "codecallback_playerdamage" }, + { 0x00BD, "codecallback_playerdisconnect" }, + { 0x00BE, "codecallback_playergrenadesuicide" }, + { 0x00BF, "codecallback_playerkilled" }, + { 0x00C0, "codecallback_playerlaststand" }, + { 0x00C1, "codecallback_playermigrated" }, + { 0x00C2, "codecallback_startgametype" }, + { 0x00C3, "codecallback_vehicledamage" }, // 195 +// + { 0x0C4, "color" }, + { 0x0C5, "color_blind_toggled" }, + { 0x0C6, "combat" }, + { 0x0C7, "combatmode" }, + { 0x0C8, "combatrecord" }, + { 0x0C9, "commonoption" }, + { 0x0CA, "confirm_location" }, + { 0x0CB, "connection_id" }, + { 0x0CC, "connectionidchunkhigh" }, + { 0x0CD, "connectionidchunklow" }, + { 0x0CE, "consolegame" }, + { 0x0CF, "consoleidchunkhigh" }, + { 0x0D0, "consoleidchunklow" }, + { 0x0D1, "constrained" }, + { 0x0D2, "contact" }, + { 0x0D3, "contextleanenabled" }, + { 0x0D4, "convergencetime" }, + { 0x0D5, "coopactivesquadmember" }, + { 0x0D6, "coopsquadmembers" }, + { 0x0D7, "costumes" }, + { 0x0D8, "count" }, + { 0x0D9, "cover" }, + { 0x0DA, "cover_approach" }, + { 0x0DB, "coversearchinterval" }, + { 0x0DC, "createstruct" }, + { 0x0DD, "createtime" }, + { 0x0DE, "criticalbulletdamagedist" }, + { 0x0DF, "crouch" }, + { 0x0E0, "currency" }, + { 0x0E1, "current" }, + { 0x0E2, "currentanimtime" }, + { 0x0E3, "currentgen" }, + { 0x0E4, "currentwinstreak" }, + { 0x0E5, "cursorhint" }, + { 0x0E6, "custom_attach_00" }, + { 0x0E7, "custom_attach_01" }, + { 0x0E8, "custom_attach_02" }, + { 0x0E9, "custom_attach_03" }, + { 0x0EA, "custom_attach_04" }, + { 0x0EB, "custom_attach_05" }, + { 0x0EC, "custom_attach_06" }, + { 0x0ED, "custom_attach_07" }, + { 0x0EE, "custom_attach_08" }, + { 0x0EF, "custom_attach_09" }, + { 0x0F0, "custom_attach_10" }, + { 0x0F1, "custom_attach_11" }, + { 0x0F2, "custom_attach_12" }, + { 0x0F3, "custom_attach_13" }, + { 0x0F4, "custom_attach_14" }, + { 0x0F5, "custom_attach_15" }, + { 0x0F6, "customclasses" }, + { 0x0F7, "customization_loaded" }, + { 0x0F8, "d" }, + { 0x0F9, "dailychallengeid" }, + { 0x0FA, "damage" }, + { 0x0FB, "damage_notdone" }, + { 0x0FC, "damagedir" }, + { 0x0FD, "damagelocation" }, + { 0x0FE, "damagemod" }, + { 0x0FF, "damagemultiplier" }, + { 0x100, "damageshield" }, + { 0x101, "damagetaken" }, + { 0x102, "damageweapon" }, + { 0x103, "damageyaw" }, + { 0x104, "dangerreactduration" }, + { 0x105, "datalength" }, + { 0x106, "dcid" }, + { 0x107, "dead" }, + { 0x108, "death" }, + { 0x109, "deathangles" }, + { 0x10A, "deathinvulnerabletime" }, + { 0x10B, "deathplant" }, + { 0x10C, "deathpos" }, + { 0x10D, "deaths" }, + { 0x10E, "deathshield" }, + { 0x10F, "defaultclasses" }, + { 0x110, "defense" }, + { 0x111, "defense_level" }, + { 0x112, "delayeddeath" }, + { 0x113, "deploy_riotshield" }, + { 0x114, "desc" }, + { 0x115, "descmodified" }, + { 0x116, "desiredangle" }, + { 0x117, "destructible_type" }, + { 0x118, "detectable" }, + { 0x119, "detected" }, + { 0x11A, "detonate" }, + { 0x11B, "device_id_high" }, + { 0x11C, "device_id_low" }, + { 0x11D, "deviceconnectionhistory" }, + { 0x11E, "deviceusefrequency" }, + { 0x11F, "diequietly" }, + { 0x120, "diffusefraction" }, + { 0x121, "direct" }, + { 0x122, "disable" }, + { 0x123, "disableplayeradsloscheck" }, + { 0x124, "dlight" }, + { 0x125, "dmg" }, + { 0x126, "dodamagetoall" }, + { 0x127, "dodangerreact" }, + { 0x128, "doffar" }, + { 0x129, "dofnear" }, + { 0x12A, "dofphysicalfocusdistance" }, + { 0x12B, "dofphysicalfstop" }, + { 0x12C, "dog" }, + { 0x12D, "doghandler" }, + { 0x12E, "doingambush" }, + { 0x12F, "done" }, + { 0x130, "dontavoidplayer" }, + { 0x131, "dotofdeath" }, + { 0x132, "down" }, + { 0x133, "downaimlimit" }, + { 0x134, "drawoncompass" }, + { 0x135, "dropweapon" }, + { 0x136, "duration" }, + { 0x137, "eftarc" }, + { 0x138, "empty" }, + { 0x139, "empty_offhand" }, + { 0x13A, "enable" }, + { 0x13B, "enablehudlighting" }, + { 0x13C, "enableshadows" }, + { 0x13D, "end_firing" }, + { 0x13E, "end_firing_left" }, + { 0x13F, "end_script" }, + { 0x140, "enddeaths" }, + { 0x141, "endkills" }, + { 0x142, "enemy" }, + { 0x143, "enemy_sighted" }, + { 0x144, "enemy_sighted_lost" }, + { 0x145, "enemy_visible" }, + { 0x146, "enemyname" }, + { 0x147, "enemyplatform" }, + { 0x148, "enemyradarmode" }, + { 0x149, "enemyxuidhigh" }, + { 0x14A, "enemyxuidlow" }, + { 0x14B, "energy_fire" }, + { 0x14C, "engagemaxdist" }, + { 0x14D, "engagemaxfalloffdist" }, + { 0x14E, "engagemindist" }, + { 0x14F, "engageminfalloffdist" }, + { 0x150, "enhanceable" }, + { 0x151, "entity" }, + { 0x152, "entitydeleted" }, + { 0x153, "entityoverflow_max" }, + { 0x154, "entityoverflow_worst" }, + { 0x155, "equipment" }, + { 0x156, "equipmentsetups" }, + { 0x157, "escaped" }, + { 0x158, "exclusive" }, + { 0x159, "exo_ability_activate" }, + { 0x15A, "exo_adrenaline_fire" }, + { 0x15B, "exo_boost" }, + { 0x15C, "exo_dodge" }, + { 0x15D, "exo_power" }, + { 0x15E, "exo_slide" }, + { 0x15F, "exo_slide_hit_player" }, + { 0x160, "exoattachment1" }, + { 0x161, "exoattachment2" }, + { 0x162, "experience" }, + { 0x163, "explode" }, + { 0x164, "exposedduration" }, + { 0x165, "extracustomclassesentitlement" }, + { 0x166, "extracustomclassesprestige" }, + { 0x167, "extrascore0" }, + { 0x168, "extrascore1" }, + { 0x169, "face_angle" }, + { 0x16A, "face_angle_3d" }, + { 0x16B, "face_angle_abs" }, + { 0x16C, "face_angle_rel" }, + { 0x16D, "face_current" }, + { 0x16E, "face_default" }, + { 0x16F, "face_direction" }, + { 0x170, "face_enemy" }, + { 0x171, "face_enemy_or_motion" }, + { 0x172, "face_goal" }, + { 0x173, "face_motion" }, + { 0x174, "face_point" }, + { 0x175, "facemotion" }, + { 0x176, "failed" }, + { 0x177, "falling" }, + { 0x178, "fast_radar" }, + { 0x179, "favoriteenemy" }, + { 0x17A, "finalaccuracy" }, + { 0x17B, "first_person" }, + { 0x17C, "firstplayedsptime" }, + { 0x17D, "fixednode" }, + { 0x17E, "fixednodesaferadius" }, + { 0x17F, "fl_rotor1" }, + { 0x180, "fl_rotor2" }, + { 0x181, "fl_rotor3" }, + { 0x182, "flash" }, + { 0x183, "flashbang" }, + { 0x184, "foley" }, + { 0x185, "follow" }, + { 0x186, "followmax" }, + { 0x187, "followmin" }, + { 0x188, "font" }, + { 0x189, "fontscale" }, + { 0x18A, "foot_ik_active" }, + { 0x18B, "foot_ik_blend_in" }, + { 0x18C, "foot_ik_blend_out" }, + { 0x18D, "foot_ik_inactive" }, + { 0x18E, "footstepdetectdist" }, + { 0x18F, "footstepdetectdistsprint" }, + { 0x190, "footstepdetectdistwalk" }, + { 0x191, "force_off" }, + { 0x192, "force_on" }, + { 0x193, "force_fully_on" }, + { 0x194, "forcepartyskillignore" }, + { 0x195, "forceragdollimmediate" }, + { 0x196, "forcespectatorclient" }, + { 0x197, "foregrip_off" }, + { 0x198, "foreground" }, + { 0x199, "forward" }, + { 0x19A, "fov" }, + { 0x19B, "fovcosine" }, + { 0x19C, "fovcosinebusy" }, + { 0x19D, "fovcosinez" }, + { 0x19E, "fr_rotor1" }, + { 0x19F, "fr_rotor2" }, + { 0x1A0, "fr_rotor3" }, + { 0x1A1, "fraction" }, + { 0x1A2, "frag" }, + { 0x1A3, "free" }, + { 0x1A4, "freecamera" }, + { 0x1A5, "freelook" }, + { 0x1A6, "frequency" }, + { 0x1A7, "friendlyfire" }, + { 0x1A8, "front_left" }, + { 0x1A9, "front_right" }, + { 0x1AA, "frontshieldanglecos" }, + { 0x1AB, "fs_concrete" }, + { 0x1AC, "fs_dirt" }, + { 0x1AD, "fs_metal" }, + { 0x1AE, "fs_wood" }, + { 0x1AF, "game_extrainfo" }, + { 0x1B0, "gamecount" }, + { 0x1B1, "gamertag" }, + { 0x1B2, "gamesplayed" }, + { 0x1B3, "gametype" }, + { 0x1B4, "gender" }, + { 0x1B5, "ghostsprestige" }, + { 0x1B6, "ghostsrank" }, + { 0x1B7, "glass" }, + { 0x1B8, "glass_damaged" }, + { 0x1B9, "glass_destroyed" }, + { 0x1BA, "globalcostume" }, + { 0x1BB, "gloves" }, + { 0x1BC, "glowalpha" }, + { 0x1BD, "glowcolor" }, + { 0x1BE, "goal" }, + { 0x1BF, "goal_changed" }, + { 0x1C0, "goal_reached" }, + { 0x1C1, "goal_yaw" }, + { 0x1C2, "goalheight" }, + { 0x1C3, "goalpos" }, + { 0x1C4, "goalradius" }, + { 0x1C5, "goaltime" }, + { 0x1C6, "goalweight" }, + { 0x1C7, "goingtoruntopos" }, + { 0x1C8, "gravity" }, + { 0x1C9, "gravity_noclip" }, + { 0x1CA, "grenade" }, + { 0x1CB, "grenade_fire" }, + { 0x1CC, "grenade_off" }, + { 0x1CD, "grenade_on" }, + { 0x1CE, "grenade_pullback" }, + { 0x1CF, "grenade_return_hand_tag" }, + { 0x1D0, "grenadeammo" }, + { 0x1D1, "grenadeawareness" }, + { 0x1D2, "grenadedanger" }, + { 0x1D3, "grenadeweapon" }, + { 0x1D4, "ground_slam" }, + { 0x1D5, "ground_slam_hit_player" }, + { 0x1D6, "groundentchanged" }, + { 0x1D7, "groundtype" }, + { 0x1D8, "gunblockedbywall" }, + { 0x1D9, "gunshot" }, + { 0x1DA, "gunshot_teammate" }, + { 0x1DB, "hardcoremodeon" }, + { 0x1DC, "hasdoublexpitem" }, + { 0x1DD, "hasradar" }, + { 0x1DE, "hasvalidcostumeselfieimage" }, + { 0x1DF, "head" }, + { 0x1E0, "headicon" }, + { 0x1E1, "headiconteam" }, + { 0x1E2, "headshots" }, + { 0x1E3, "health" }, + { 0x1E4, "healthregen" }, + { 0x1E5, "height" }, + { 0x1E6, "helmet" }, + { 0x1E7, "hidein3rdperson" }, + { 0x1E8, "hidewhendead" }, + { 0x1E9, "hidewhenindemo" }, + { 0x1EA, "hidewheninmenu" }, + { 0x1EB, "high_priority" }, + { 0x1EC, "highlyawareradius" }, + { 0x1ED, "hindlegstraceoffset" }, + { 0x1EE, "hintstring" }, + { 0x1EF, "hit_by_missile" }, + { 0x1F0, "horzalign" }, + { 0x1F1, "host_sucks_end_game" }, + { 0x1F2, "hostfailures" }, + { 0x1F3, "hostquits" }, + { 0x1F4, "hostsuccesses" }, + { 0x1F5, "human" }, + { 0x1F6, "iconnew" }, + { 0x1F7, "iconunlocked" }, + { 0x1F8, "ignoreall" }, + { 0x1F9, "ignoreclosefoliage" }, + { 0x1FA, "ignoreexplosionevents" }, + { 0x1FB, "ignoreforfixednodesafecheck" }, + { 0x1FC, "ignoreme" }, + { 0x1FD, "ignorerandombulletdamage" }, + { 0x1FE, "ignoresuppression" }, + { 0x1FF, "ignoretriggers" }, + { 0x200, "ikweight" }, + { 0x201, "index" }, + { 0x202, "infinite_energy" }, + { 0x203, "info_notnull" }, + { 0x204, "info_player_start" }, + { 0x205, "init" }, + { 0x206, "initstructs" }, + { 0x207, "insolid" }, + { 0x208, "intermission" }, + { 0x209, "interval" }, + { 0x20A, "inuse" }, + { 0x20B, "invalid_parent" }, + { 0x20C, "invisible" }, + { 0x20D, "isradarblocked" }, + { 0x20E, "item" }, + { 0x20F, "j_exo_rcket_arm02" }, + { 0x210, "j_exoclav04_l" }, + { 0x211, "j_exoclav04_r" }, + { 0x212, "j_exohip04_l" }, + { 0x213, "j_exohip04_r" }, + { 0x214, "j_eyeball_le" }, + { 0x215, "j_eyeball_ri" }, + { 0x216, "j_gun" }, + { 0x217, "j_head" }, + { 0x218, "j_hip_l" }, + { 0x219, "j_hip_r" }, + { 0x21A, "j_knee_le" }, + { 0x21B, "j_knee_ri" }, + { 0x21C, "j_left_elbow" }, + { 0x21D, "j_left_hand" }, + { 0x21E, "j_left_shoulder" }, + { 0x21F, "j_mainroot" }, + { 0x220, "j_neck" }, + { 0x221, "j_right_elbow" }, + { 0x222, "j_right_hand" }, + { 0x223, "j_right_hand_placement" }, + { 0x224, "j_right_shoulder" }, + { 0x225, "j_rocket" }, + { 0x226, "j_spine4" }, + { 0x227, "j_spinelower" }, + { 0x228, "j_spineupper" }, + { 0x229, "jumpcost" }, + { 0x22A, "jumping" }, + { 0x22B, "justclass" }, + { 0x22C, "kdratio" }, + { 0x22D, "keepclaimednode" }, + { 0x22E, "keepclaimednodeifvalid" }, + { 0x22F, "keepnodeduringscriptedanim" }, + { 0x230, "key1" }, + { 0x231, "key2" }, + { 0x232, "kill_timestamp" }, + { 0x233, "killanimscript" }, + { 0x234, "killcamentity" }, + { 0x235, "killcamentitylookat" }, + { 0x236, "kills" }, + { 0x237, "killstreak" }, + { 0x238, "killstreakcount" }, + { 0x239, "killstreakrestricted" }, + { 0x23A, "killstreakunlocked" }, + { 0x23B, "knife_off" }, + { 0x23C, "knife_on" }, + { 0x23D, "known_event" }, + { 0x23E, "label" }, + { 0x23F, "ladder_down" }, + { 0x240, "ladder_up" }, + { 0x241, "land" }, + { 0x242, "last_stand_count" }, + { 0x243, "lastattacker" }, + { 0x244, "lastenemysightpos" }, + { 0x245, "lastplayedtime" }, + { 0x246, "laststand" }, + { 0x247, "leanamount" }, + { 0x248, "ledge" }, + { 0x249, "left" }, + { 0x24A, "leftaimlimit" }, + { 0x24B, "leftarc" }, + { 0x24C, "lethal" }, + { 0x24D, "lifecount" }, + { 0x24E, "light" }, + { 0x24F, "lives" }, + { 0x250, "loadouts" }, + { 0x251, "lockorientation" }, + { 0x252, "lod" }, + { 0x253, "look" }, + { 0x254, "lookahead" }, + { 0x255, "lookaheaddir" }, + { 0x256, "lookaheaddist" }, + { 0x257, "lookaheadhitsstairs" }, + { 0x258, "lookforward" }, + { 0x259, "lookright" }, + { 0x25A, "looktarget" }, + { 0x25B, "lookup" }, + { 0x25C, "loot" }, + { 0x25D, "lootnew" }, + { 0x25E, "loses" }, + { 0x25F, "low_priority" }, + { 0x260, "lowresbackground" }, + { 0x261, "luinotifyserver" }, + { 0x262, "mag_eject" }, + { 0x263, "mag_eject_left" }, + { 0x264, "main" }, + { 0x265, "manual" }, + { 0x266, "manual_ai" }, + { 0x267, "manual_change" }, + { 0x268, "map" }, + { 0x269, "matchid" }, + { 0x26A, "matchmakingsettingsversion" }, + { 0x26B, "matchmakingtesttype" }, + { 0x26C, "max_time" }, + { 0x26D, "maxfaceenemydist" }, + { 0x26E, "maxhealth" }, + { 0x26F, "maxrange" }, + { 0x270, "maxsightdistsqrd" }, + { 0x271, "maxturnspeed" }, + { 0x272, "maxvisibledist" }, + { 0x273, "melee_fired" }, + { 0x274, "melee_hit_react" }, + { 0x275, "meleeattackdist" }, + { 0x276, "menuresponse" }, + { 0x277, "micro_dlc_bits_last_gen" }, + { 0x278, "micro_dlc_bits_next_gen" }, + { 0x279, "middle_left" }, + { 0x27A, "middle_right" }, + { 0x27B, "migrateablequits" }, + { 0x27C, "min_energy" }, + { 0x27D, "min_time" }, + { 0x27E, "minpaindamage" }, + { 0x27F, "minusedistsq" }, + { 0x280, "missile_fire" }, + { 0x281, "missile_passed_target" }, + { 0x282, "missile_stuck" }, + { 0x283, "mlgversion" }, + { 0x284, "mod" }, + { 0x285, "mod_crush" }, + { 0x286, "mod_energy" }, + { 0x287, "mod_explosive" }, + { 0x288, "mod_explosive_bullet" }, + { 0x289, "mod_falling" }, + { 0x28A, "mod_grenade" }, + { 0x28B, "mod_grenade_splash" }, + { 0x28C, "mod_head_shot" }, + { 0x28D, "mod_impact" }, + { 0x28E, "mod_melee" }, + { 0x28F, "mod_melee_alien" }, + { 0x290, "mod_melee_alt" }, + { 0x291, "mod_melee_dog" }, + { 0x292, "mod_pistol_bullet" }, + { 0x293, "mod_projectile" }, + { 0x294, "mod_projectile_splash" }, + { 0x295, "mod_rifle_bullet" }, + { 0x296, "mod_suicide" }, + { 0x297, "mod_trigger_hurt" }, + { 0x298, "mod_unknown" }, + { 0x299, "model" }, + { 0x29A, "modeprefix" }, + { 0x29B, "modifiers" }, + { 0x29C, "motiontrackerenabled" }, + { 0x29D, "mounted_dlc_bits" }, + { 0x29E, "movedone" }, + { 0x29F, "movemode" }, + { 0x2A0, "munition" }, + { 0x2A1, "munition_level" }, + { 0x2A2, "mw3prestige" }, + { 0x2A3, "mw3rank" }, + { 0x2A4, "name" }, + { 0x2A5, "namemodified" }, + { 0x2A6, "near_goal" }, + { 0x2A7, "nearz" }, + { 0x2A8, "neutral" }, + { 0x2A9, "never" }, + { 0x2AA, "newenemyreactiondistsq" }, + { 0x2AB, "newentitlement" }, + { 0x2AC, "nextgen" }, + { 0x2AD, "nextreadblackops2" }, + { 0x2AE, "nextreadghosts0" }, + { 0x2AF, "nextreadghosts1" }, + { 0x2B0, "nextreadmw3" }, + { 0x2B1, "night_vision_off" }, + { 0x2B2, "night_vision_on" }, + { 0x2B3, "no_bot_random_path" }, + { 0x2B4, "no_cover" }, + { 0x2B5, "no_gravity" }, + { 0x2B6, "noattackeraccuracymod" }, + { 0x2B7, "noclip" }, + { 0x2B8, "node" }, + { 0x2B9, "node_not_safe" }, + { 0x2BA, "node_out_of_range" }, + { 0x2BB, "node_relinquished" }, + { 0x2BC, "node_taken" }, + { 0x2BD, "nodeoffsetpos" }, + { 0x2BE, "nododgemove" }, + { 0x2BF, "nogravity" }, + { 0x2C0, "nogrenadereturnthrow" }, + { 0x2C1, "noncombat" }, + { 0x2C2, "none" }, + { 0x2C3, "nonmigrateablequits" }, + { 0x2C4, "nophysics" }, + { 0x2C5, "normal" }, + { 0x2C6, "normal_radar" }, + { 0x2C7, "northyaw" }, + { 0x2C8, "notifyname" }, + { 0x2C9, "notinsolid" }, + { 0x2CA, "num0" }, + { 0x2CB, "num1" }, + { 0x2CC, "num2" }, + { 0x2CD, "num3" }, + { 0x2CE, "num4" }, + { 0x2CF, "objective" }, + { 0x2D0, "obstacle" }, + { 0x2D1, "offense" }, + { 0x2D2, "offense_level" }, + { 0x2D3, "offhand" }, + { 0x2D4, "offhand_end" }, + { 0x2D5, "offhandweapon" }, + { 0x2D6, "oldtime" }, + { 0x2D7, "ondeactivate" }, + { 0x2D8, "onenterstate" }, + { 0x2D9, "only_sky" }, + { 0x2DA, "onlygoodnearestnodes" }, + { 0x2DB, "onwifi" }, + { 0x2DC, "operationsdeadline" }, + { 0x2DD, "oriented" }, + { 0x2DE, "orientto_complete" }, + { 0x2DF, "origin" }, + { 0x2E0, "other" }, + { 0x2E1, "over" }, + { 0x2E2, "owner" }, + { 0x2E3, "pacifist" }, + { 0x2E4, "pacifistwait" }, + { 0x2E5, "pain" }, + { 0x2E6, "pantssize" }, + { 0x2E7, "parentindex" }, + { 0x2E8, "parentname" }, + { 0x2E9, "partyid" }, + { 0x2EA, "pasttitledata" }, + { 0x2EB, "patch" }, + { 0x2EC, "patchbacking" }, + { 0x2ED, "path_blocked" }, + { 0x2EE, "path_changed" }, + { 0x2EF, "path_dir_change" }, + { 0x2F0, "path_enemy" }, + { 0x2F1, "path_need_dodge" }, + { 0x2F2, "path_set" }, + { 0x2F3, "pathenemyfightdist" }, + { 0x2F4, "pathenemylookahead" }, + { 0x2F5, "pathgoalpos" }, + { 0x2F6, "pathlookaheaddist" }, + { 0x2F7, "pathrandompercent" }, + { 0x2F8, "pc" }, + { 0x2F9, "pccg" }, + { 0x2FA, "pelvis" }, + { 0x2FB, "perk1" }, + { 0x2FC, "perk2" }, + { 0x2FD, "perk3" }, + { 0x2FE, "perk4" }, + { 0x2FF, "perk5" }, + { 0x300, "perk6" }, + { 0x301, "perkclassrestricted" }, + { 0x302, "perkrestricted" }, + { 0x303, "perks" }, + { 0x304, "perkslots" }, + { 0x305, "pers" }, + { 0x306, "persistentperksunlocked" }, + { 0x307, "persistentweaponsunlocked" }, + { 0x308, "phone_off" }, + { 0x309, "phone_on" }, + { 0x30A, "physics_finished" }, + { 0x30B, "physics_impact" }, + { 0x30C, "pickup" }, + { 0x30D, "pickup_riotshield" }, + { 0x30E, "pistol" }, + { 0x30F, "pitchamount" }, + { 0x310, "pitchconvergencetime" }, + { 0x311, "plane_waypoint" }, + { 0x312, "playedblackops2" }, + { 0x313, "playedghosts" }, + { 0x314, "playedmw3" }, + { 0x315, "player" }, + { 0x316, "player_controller" }, + { 0x317, "player_pushed" }, + { 0x318, "playercardbackground" }, + { 0x319, "playercardpatch" }, + { 0x31A, "playercardpatchbacking" }, + { 0x31B, "playerconnectionhistory" }, + { 0x31C, "playerid" }, + { 0x31D, "playerip" }, + { 0x31E, "playername" }, + { 0x31F, "playerpositions" }, + { 0x320, "players" }, + { 0x321, "playerSpread" }, + { 0x322, "playerxuidhigh" }, + { 0x323, "playerxuidlow" }, + { 0x324, "playing" }, + { 0x325, "points" }, + { 0x326, "position" }, + { 0x327, "positioninworld" }, + { 0x328, "postsharpturnlookaheaddist" }, + { 0x329, "precache" }, + { 0x32A, "predicted_projectile_impact" }, + { 0x32B, "prestige" }, + { 0x32C, "prestigedoublexp" }, + { 0x32D, "prestigedoublexpmaxtimeplayed" }, + { 0x32E, "prestigeshoptokens" }, + { 0x32F, "prestigeshoptokensentitlement" }, + { 0x330, "prevanimdelta" }, + { 0x331, "prevnode" }, + { 0x332, "prevscript" }, + { 0x333, "primary" }, + { 0x334, "primaryattachment1" }, + { 0x335, "primaryattachment2" }, + { 0x336, "primaryattachment3" }, + { 0x337, "primaryattachments" }, + { 0x338, "primaryattachkit" }, + { 0x339, "primarycamo" }, + { 0x33A, "primaryfurniturekit" }, + { 0x33B, "primaryoffhand" }, + { 0x33C, "primaryreticle" }, + { 0x33D, "primaryweapon" }, + { 0x33E, "privatematchactivesquadmember" }, + { 0x33F, "privatematchcustomclasses" }, + { 0x340, "privatematchsquadmembers" }, + { 0x341, "projectile_impact" }, + { 0x342, "projectile_impact_player" }, + { 0x343, "prone" }, + { 0x344, "proneok" }, + { 0x345, "providecoveringfire" }, + { 0x346, "ps3" }, + { 0x347, "ps4" }, + { 0x348, "psoffsettime" }, + { 0x349, "pushable" }, + { 0x34A, "radaralwayson" }, + { 0x34B, "radarmode" }, + { 0x34C, "radarshowenemydirection" }, + { 0x34D, "radarstrength" }, + { 0x34E, "radius" }, + { 0x34F, "ragdoll_early_result" }, + { 0x350, "raise_riotshield" }, + { 0x351, "rank" }, + { 0x352, "rate" }, + { 0x353, "reached_end_node" }, + { 0x354, "reached_wait_node" }, + { 0x355, "reached_wait_speed" }, + { 0x356, "reactiontargetpos" }, + { 0x357, "realtimedelta" }, + { 0x358, "receiver" }, + { 0x359, "recipename" }, + { 0x35A, "reciprocality" }, + { 0x35B, "reflection_clear_color" }, + { 0x35C, "reinforcement" }, + { 0x35D, "relativedir" }, + { 0x35E, "relativeoffset" }, + { 0x35F, "reload" }, + { 0x360, "reload_start" }, + { 0x361, "remotemissilespawn" }, + { 0x362, "rendertotexture" }, + { 0x363, "reportindex" }, + { 0x364, "reports" }, + { 0x365, "reputation" }, + { 0x366, "requestarrivalnotify" }, + { 0x367, "requirement_beat100waves" }, + { 0x368, "requirement_beat200waves" }, + { 0x369, "requirement_beat50waves" }, + { 0x36A, "requirement_beatenzombies" }, + { 0x36B, "requirement_maxarmorproficiency" }, + { 0x36C, "requirement_maxweaponproficiency" }, + { 0x36D, "requirement_playedallmaps" }, + { 0x36E, "requirement_unlockedprison" }, + { 0x36F, "requirement_unlockedtier2" }, + { 0x370, "requirement_unlockedtier3" }, + { 0x371, "reserved" }, + { 0x372, "respawndelay" }, + { 0x373, "result" }, + { 0x374, "reticle" }, + { 0x375, "return_pitch" }, + { 0x376, "reverse" }, + { 0x377, "revives" }, + { 0x378, "right" }, + { 0x379, "rightaimlimit" }, + { 0x37A, "rightarc" }, + { 0x37B, "riotshield_damaged" }, + { 0x37C, "riotshield_hit" }, + { 0x37D, "rocket" }, + { 0x37E, "rocket_off" }, + { 0x37F, "rocket_on" }, + { 0x380, "rotatedone" }, + { 0x381, "rotation" }, + { 0x382, "run" }, + { 0x383, "runcost" }, + { 0x384, "runto_arrived" }, + { 0x385, "safetochangescript" }, + { 0x386, "scavenger" }, + { 0x387, "scope_cap" }, + { 0x388, "scope_center" }, + { 0x389, "scope_top" }, + { 0x38A, "score" }, + { 0x38B, "script" }, + { 0x38C, "script_brushmodel" }, + { 0x38D, "script_clut" }, + { 0x38E, "script_context" }, + { 0x38F, "script_delay" }, + { 0x390, "script_goal_changed" }, + { 0x391, "script_label" }, + { 0x392, "script_lightset" }, + { 0x393, "script_linkname" }, + { 0x394, "script_model" }, + { 0x395, "script_noteworthy" }, + { 0x396, "script_origin" }, + { 0x397, "script_parent" }, + { 0x398, "script_parentname" }, + { 0x399, "script_pushable" }, + { 0x39A, "script_vehicle" }, + { 0x39B, "script_vehicle_collision" }, + { 0x39C, "script_vehicle_collmap" }, + { 0x39D, "script_vehicle_corpse" }, + { 0x39E, "script_visionset" }, + { 0x39F, "script_water" }, + { 0x3A0, "script_reverb" }, + { 0x3A1, "script_zone" }, + { 0x3A2, "scriptable" }, + { 0x3A3, "scriptableactor" }, + { 0x3A4, "scripted_viewmodel_anim" }, + { 0x3A5, "scriptedarrivalent" }, + { 0x3A6, "search_end" }, + { 0x3A7, "secondary" }, + { 0x3A8, "secondaryattachment1" }, + { 0x3A9, "secondaryattachment2" }, + { 0x3AA, "secondaryattachments" }, + { 0x3AB, "secondaryattachkit" }, + { 0x3AC, "secondarycamo" }, + { 0x3AD, "secondaryfurniturekit" }, + { 0x3AE, "secondaryoffhand" }, + { 0x3AF, "secondaryreticle" }, + { 0x3B0, "secondaryweapon" }, + { 0x3B1, "sentry" }, + { 0x3B2, "sentry_manual" }, + { 0x3B3, "sentry_offline" }, + { 0x3B4, "servertimecount" }, + { 0x3B5, "servertimeexceedcount" }, + { 0x3B6, "servertimemax" }, + { 0x3B7, "servertimetotal" }, + { 0x3B8, "servertimetotalexceed" }, + { 0x3B9, "sessionstate" }, + { 0x3BA, "sessionteam" }, + { 0x3BB, "sharpturn" }, + { 0x3BC, "sharpturnlookaheaddist" }, + { 0x3BD, "sharpturnnotifydist" }, + { 0x3BE, "sharpturntooclosetodestdist" }, + { 0x3BF, "shirt" }, + { 0x3C0, "showinkillcam" }, + { 0x3C1, "showkillcam" }, + { 0x3C2, "sightlatency" }, + { 0x3C3, "silenced_shot" }, + { 0x3C4, "skill_points" }, + { 0x3C5, "skillbucket" }, + { 0x3C6, "skillrating" }, + { 0x3C7, "skillratingtype" }, + { 0x3C8, "slidevelocity" }, + { 0x3C9, "slowmo_active" }, + { 0x3CA, "slowmo_passive" }, + { 0x3CB, "smoke" }, + { 0x3CC, "snd_channelvolprio_holdbreath" }, + { 0x3CD, "snd_channelvolprio_pain" }, + { 0x3CE, "snd_channelvolprio_shellshock" }, + { 0x3CF, "snd_enveffectsprio_level" }, + { 0x3D0, "snd_enveffectsprio_shellshock" }, + { 0x3D1, "sort" }, + { 0x3D2, "sound_blend" }, + { 0x3D3, "soundeventdone" }, + { 0x3D4, "space" }, + { 0x3D5, "spawned" }, + { 0x3D6, "spawner" }, + { 0x3D7, "spawnflags" }, + { 0x3D8, "spawnpos" }, + { 0x3D9, "spawntime" }, + { 0x3DA, "specialgrenade" }, + { 0x3DB, "spectatekillcam" }, + { 0x3DC, "spectating_cycle" }, + { 0x3DD, "spectator" }, + { 0x3DE, "speechcommand" }, + { 0x3DF, "speed" }, + { 0x3E0, "splatter" }, + { 0x3E1, "splineplanereachednode" }, + { 0x3E2, "sprint_begin" }, + { 0x3E3, "sprint_end" }, + { 0x3E4, "sprint_slide_begin" }, + { 0x3E5, "sprint_slide_end" }, + { 0x3E6, "squad_base" }, + { 0x3E7, "squad_mode" }, + { 0x3E8, "squad_name" }, + { 0x3E9, "squadhq" }, + { 0x3EA, "squadmembers" }, + { 0x3EB, "squadmemxp" }, + { 0x3EC, "squadname" }, + { 0x3ED, "stairs" }, + { 0x3EE, "stairsstate" }, + { 0x3EF, "stand" }, + { 0x3F0, "start_blend" }, + { 0x3F1, "start_move" }, + { 0x3F2, "start_ragdoll" }, + { 0x3F3, "startdeaths" }, + { 0x3F4, "startdeploy_riotshield" }, + { 0x3F5, "startingoffsetforlife" }, + { 0x3F6, "startkills" }, + { 0x3F7, "state_changed" }, + { 0x3F8, "statelocked" }, + { 0x3F9, "stencil_disable" }, + { 0x3FA, "stencil_onesided" }, + { 0x3FB, "stencil_twosided" }, + { 0x3FC, "stencilfunc_always" }, + { 0x3FD, "stencilfunc_equal" }, + { 0x3FE, "stencilfunc_greater" }, + { 0x3FF, "stencilfunc_greaterequal" }, + { 0x400, "stencilfunc_less" }, + { 0x401, "stencilfunc_lessequal" }, + { 0x402, "stencilfunc_never" }, + { 0x403, "stencilfunc_notequal" }, + { 0x404, "stencilop_decr" }, + { 0x405, "stencilop_decrsat" }, + { 0x406, "stencilop_incr" }, + { 0x407, "stencilop_incrsat" }, + { 0x408, "stencilop_invert" }, + { 0x409, "stencilop_keep" }, + { 0x40A, "stencilop_replace" }, + { 0x40B, "stencilop_zero" }, + { 0x40C, "stop" }, + { 0x40D, "stop_soon" }, + { 0x40E, "stopanimdistsq" }, + { 0x40F, "stopsoonnotifydist" }, + { 0x410, "streak" }, + { 0x411, "streaktype" }, + { 0x412, "suckedashost" }, + { 0x413, "suncolor" }, + { 0x414, "sundirection" }, + { 0x415, "sunlight" }, + { 0x416, "support" }, + { 0x417, "support_level" }, + { 0x418, "suppression" }, + { 0x419, "suppression_end" }, + { 0x41A, "suppressionduration" }, + { 0x41B, "suppressionmeter" }, + { 0x41C, "suppressionstarttime" }, + { 0x41D, "suppressionTime" }, + { 0x41E, "suppressionwait" }, + { 0x41F, "surfacetype" }, + { 0x420, "surprisedbymedistsq" }, + { 0x421, "swimmer" }, + { 0x422, "switched_var_grenade" }, + { 0x423, "syncedmeleetarget" }, + { 0x424, "tactical" }, + { 0x425, "tag" }, + { 0x426, "tag_ai_aim_target" }, + { 0x427, "tag_aim" }, + { 0x428, "tag_aim_animated" }, + { 0x429, "tag_aim_pivot" }, + { 0x42A, "tag_barrel" }, + { 0x42B, "tag_blade_off" }, + { 0x42C, "tag_body" }, + { 0x42D, "tag_brass" }, + { 0x42E, "tag_brass_2" }, + { 0x42F, "tag_butt" }, + { 0x430, "tag_camera" }, + { 0x431, "tag_clip" }, + { 0x432, "tag_clip_dual" }, + { 0x433, "tag_clip_dual2" }, + { 0x434, "tag_detach" }, + { 0x435, "tag_engine_left" }, + { 0x436, "tag_engine_right" }, + { 0x437, "tag_eotech_reticle" }, + { 0x438, "tag_eye" }, + { 0x439, "tag_flash" }, + { 0x43A, "tag_flash_11" }, + { 0x43B, "tag_flash_2" }, + { 0x43C, "tag_flash_22" }, + { 0x43D, "tag_flash_3" }, + { 0x43E, "tag_flash_launcher" }, + { 0x43F, "tag_flash_silenced" }, + { 0x440, "tag_fx" }, + { 0x441, "tag_gasmask" }, + { 0x442, "tag_gasmask2" }, + { 0x443, "tag_ik_ankle_fl" }, + { 0x444, "tag_ik_ankle_fr" }, + { 0x445, "tag_ik_ankle_kl" }, + { 0x446, "tag_ik_ankle_kr" }, + { 0x447, "tag_ik_ankle_ml" }, + { 0x448, "tag_ik_ankle_mr" }, + { 0x449, "tag_ik_footflat_fl" }, + { 0x44A, "tag_ik_footflat_fr" }, + { 0x44B, "tag_ik_footflat_kl" }, + { 0x44C, "tag_ik_footflat_kr" }, + { 0x44D, "tag_ik_footflat_ml" }, + { 0x44E, "tag_ik_footflat_mr" }, + { 0x44F, "tag_ik_hip_fl" }, + { 0x450, "tag_ik_hip_fr" }, + { 0x451, "tag_ik_hip_kl" }, + { 0x452, "tag_ik_hip_kr" }, + { 0x453, "tag_ik_hip_ml" }, + { 0x454, "tag_ik_hip_mr" }, + { 0x455, "tag_ik_knee_fl" }, + { 0x456, "tag_ik_knee_fr" }, + { 0x457, "tag_ik_knee_kl" }, + { 0x458, "tag_ik_knee_kr" }, + { 0x459, "tag_ik_knee_ml" }, + { 0x45A, "tag_ik_knee_mr" }, + { 0x45B, "tag_ik_loc_le" }, + { 0x45C, "tag_ik_loc_le_foregrip" }, + { 0x45D, "tag_ik_loc_le_launcher" }, + { 0x45E, "tag_ik_loc_le_shotgun" }, + { 0x45F, "tag_ik_target" }, + { 0x460, "tag_inhand" }, + { 0x461, "tag_jetblast_fx" }, + { 0x462, "tag_jetpack" }, + { 0x463, "tag_knife_attach" }, + { 0x464, "tag_knife_fx" }, + { 0x465, "tag_laser" }, + { 0x466, "tag_launcher" }, + { 0x467, "tag_magnifier_eotech_reticle" }, + { 0x468, "tag_mobile_cover_upright" }, + { 0x469, "tag_motion_tracker_bl" }, + { 0x46A, "tag_motion_tracker_br" }, + { 0x46B, "tag_motion_tracker_fx" }, + { 0x46C, "tag_motion_tracker_tl" }, + { 0x46D, "tag_origin" }, + { 0x46E, "tag_player" }, + { 0x46F, "tag_popout" }, + { 0x470, "tag_rail_master_off" }, + { 0x471, "tag_rail_master_on" }, + { 0x472, "tag_rail_side_off" }, + { 0x473, "tag_rail_side_on" }, + { 0x474, "tag_reticle_acog" }, + { 0x475, "tag_reticle_default" }, + { 0x476, "tag_reticle_default2" }, + { 0x477, "tag_reticle_hamr" }, + { 0x478, "tag_reticle_on" }, + { 0x479, "tag_reticle_red_dot" }, + { 0x47A, "tag_reticle_reflex" }, + { 0x47B, "tag_reticle_tavor_scope" }, + { 0x47C, "tag_reticle_thermal_scope" }, + { 0x47D, "tag_rider" }, + { 0x47E, "tag_riot_shield" }, + { 0x47F, "tag_rocket" }, + { 0x480, "tag_scope_ads_off" }, + { 0x481, "tag_scope_ads_on" }, + { 0x482, "tag_shield_back" }, + { 0x483, "tag_shotgun" }, + { 0x484, "tag_show_alt" }, + { 0x485, "tag_sight_off" }, + { 0x486, "tag_sight_on" }, + { 0x487, "tag_stow_back_mid_attach" }, + { 0x488, "tag_stowed_back" }, + { 0x489, "tag_stowed_hip_rear" }, + { 0x48A, "tag_sync" }, + { 0x48B, "tag_tip" }, + { 0x48C, "tag_turret" }, + { 0x48D, "tag_turret_base" }, + { 0x48E, "tag_turret_pitch" }, + { 0x48F, "tag_turret_yaw" }, + { 0x490, "tag_weapon" }, + { 0x491, "tag_weapon_chest" }, + { 0x492, "tag_weapon_left" }, + { 0x493, "tag_weapon_right" }, + { 0x494, "tag_wheel_back_left" }, + { 0x495, "tag_wheel_back_right" }, + { 0x496, "tag_wheel_front_left" }, + { 0x497, "tag_wheel_front_right" }, + { 0x498, "tag_wheel_middle_left" }, + { 0x499, "tag_wheel_middle_right" }, + { 0x49A, "tag_wheel_spin_left01" }, + { 0x49B, "tag_wheel_spin_left02" }, + { 0x49C, "tag_wheel_spin_left03" }, + { 0x49D, "tag_wheel_spin_right01" }, + { 0x49E, "tag_wheel_spin_right02" }, + { 0x49F, "tag_wheel_spin_right03" }, + { 0x4A0, "takedamage" }, + { 0x4A1, "target" }, + { 0x4A2, "target_script_trigger" }, + { 0x4A3, "targetname" }, + { 0x4A4, "team" }, + { 0x4A5, "team3" }, + { 0x4A6, "teambalanced" }, + { 0x4A7, "teammode_axisallies" }, + { 0x4A8, "teammode_ffa" }, + { 0x4A9, "teammovewaittime" }, + { 0x4AA, "their_score" }, + { 0x4AB, "thermal" }, + { 0x4AC, "thermalbodymaterial" }, + { 0x4AD, "third_person" }, + { 0x4AE, "threatbias" }, + { 0x4AF, "threatbiasgroup" }, + { 0x4B0, "threatsightdelayenabled" }, + { 0x4B1, "threatsightdelayfalloff" }, + { 0x4B2, "threshold" }, + { 0x4B3, "throwingknife" }, + { 0x4B4, "time" }, + { 0x4B5, "timeplayedtotal" }, + { 0x4B6, "titlenew" }, + { 0x4B7, "titleunlocked" }, + { 0x4B8, "top" }, + { 0x4B9, "toparc" }, + { 0x4BA, "totalxp" }, + { 0x4BB, "touch" }, + { 0x4BC, "touching_platform" }, + { 0x4BD, "traverse_complete" }, + { 0x4BE, "traverse_soon" }, + { 0x4BF, "traversecost" }, + { 0x4C0, "traversesoonnotifydist" }, + { 0x4C1, "trend" }, + { 0x4C2, "trigger" }, + { 0x4C3, "trigger_damage" }, + { 0x4C4, "trigger_use" }, + { 0x4C5, "trigger_use_touch" }, + { 0x4C6, "truck_cam" }, + { 0x4C7, "turnrate" }, + { 0x4C8, "turret_deactivate" }, + { 0x4C9, "turret_fire" }, + { 0x4CA, "turret_no_vis" }, + { 0x4CB, "turret_not_on_target" }, + { 0x4CC, "turret_on_target" }, + { 0x4CD, "turret_on_vistarget" }, + { 0x4CE, "turret_pitch_clamped" }, + { 0x4CF, "turret_rotate_stopped" }, + { 0x4D0, "turret_yaw_clamped" }, + { 0x4D1, "turretinvulnerability" }, + { 0x4D2, "turretownerchange" }, + { 0x4D3, "turretstatechange" }, + { 0x4D4, "type" }, + { 0x4D5, "ucdidhigh" }, + { 0x4D6, "ucdidlow" }, + { 0x4D7, "unlockedcamo" }, + { 0x4D8, "unlockedreticles" }, + { 0x4D9, "unlockpoints" }, + { 0x4DA, "unresolved_collision" }, + { 0x4DB, "up" }, + { 0x4DC, "upaimlimit" }, + { 0x4DD, "upgradechallengeprogress" }, + { 0x4DE, "upgradechallengestage" }, + { 0x4DF, "upgradepoints" }, + { 0x4E0, "upgradepurchased" }, + { 0x4E1, "useable" }, + { 0x4E2, "usechokepoints" }, + { 0x4E3, "usecombatscriptatcover" }, + { 0x4E4, "usedemblemslots" }, + { 0x4E5, "useorcaavoidance" }, + { 0x4E6, "usepathsmoothingvalues" }, + { 0x4E7, "veh_boatbounce" }, + { 0x4E8, "veh_boost_activated" }, + { 0x4E9, "veh_boost_deactivated" }, + { 0x4EA, "veh_brake" }, + { 0x4EB, "veh_collision" }, + { 0x4EC, "veh_contact" }, + { 0x4ED, "veh_jolt" }, + { 0x4EE, "veh_landed" }, + { 0x4EF, "veh_leftground" }, + { 0x4F0, "veh_pathdir" }, + { 0x4F1, "veh_pathspeed" }, + { 0x4F2, "veh_pathtype" }, + { 0x4F3, "veh_predictedcollision" }, + { 0x4F4, "veh_speed" }, + { 0x4F5, "veh_throttle" }, + { 0x4F6, "veh_topspeed" }, + { 0x4F7, "veh_transmission" }, + { 0x4F8, "vehicle_dismount" }, + { 0x4F9, "vehicle_mount" }, + { 0x4FA, "vehicletype" }, + { 0x4FB, "velocity" }, + { 0x4FC, "vertalign" }, + { 0x4FD, "visionsetmissilecam" }, + { 0x4FE, "visionsetmissilecamduration" }, + { 0x4FF, "visionsetnaked" }, + { 0x500, "visionsetnakedduration" }, + { 0x501, "visionsetnight" }, + { 0x502, "visionsetnightduration" }, + { 0x503, "visionsetpain" }, + { 0x504, "visionsetpainduration" }, + { 0x505, "visionsetthermal" }, + { 0x506, "visionsetthermalduration" }, + { 0x507, "vote" }, + { 0x508, "wait" }, + { 0x509, "walk" }, + { 0x50A, "walkdist" }, + { 0x50B, "walkdistfacingmotion" }, + { 0x50C, "wastacticalinsertion" }, + { 0x50D, "waypoint_reached" }, + { 0x50E, "weapon" }, + { 0x50F, "weapon_change" }, + { 0x510, "weapon_dropped" }, + { 0x511, "weapon_fired" }, + { 0x512, "weapon_model_change" }, + { 0x513, "weapon_switch_invalid" }, + { 0x514, "weapon_switch_started" }, + { 0x515, "weapon_taken" }, + { 0x516, "weaponchange" }, + { 0x517, "weaponclassrestricted" }, + { 0x518, "weaponinfo" }, + { 0x519, "weaponrank" }, + { 0x51A, "weaponrestricted" }, + { 0x51B, "weaponsetups" }, + { 0x51C, "weaponstats" }, + { 0x51D, "weeklychallengeid" }, + { 0x51E, "weight" }, + { 0x51F, "width" }, + { 0x520, "wildcard1" }, + { 0x521, "wildcard2" }, + { 0x522, "wildcard3" }, + { 0x523, "wildcardslots" }, + { 0x524, "win_streak" }, + { 0x525, "winlossratio" }, + { 0x526, "wins" }, + { 0x527, "won_match" }, + { 0x528, "world" }, + { 0x529, "worldmodel" }, + { 0x52A, "worldspawn" }, + { 0x52B, "x" }, + { 0x52C, "xb3" }, + { 0x52D, "xenon" }, + { 0x52E, "xp" }, + { 0x52F, "xp_multiplier" }, + { 0x530, "xpmaxmultipliertimeplayed" }, + { 0x531, "xpmultiplier" }, + { 0x532, "xuid" }, + { 0x533, "y" }, + { 0x534, "yawconvergencetime" }, + { 0x535, "your_score" }, + { 0x536, "z" }, + { 0x537, "zonly_physics" }, + +// + { 0x53D, "codescripts/delete" }, + { 0x53E, "codescripts/struct" }, + { 0x53F, "codescripts/message" }, + { 0x540, "maps/mp/gametypes/_callbacksetup" }, }}; struct __init__ @@ -2554,32 +3953,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; @@ -2587,3 +3986,6495 @@ struct __init__ __init__ _; } // namespace xsk::gsc::h1 + +// ps4 function_list + +/* +"createprintchannel" +"setprintchannel" +"print" +"println" +"print3d" +"line" +"box" +"orientedbox" +"sphere" +"cylinder" +"precacheturret" +"getweaponarray" +"spawnturret" +"canspawnturret" +"assert" +"assertex" +"assertmsg" +"isdefined" +"isvalidmissile" +"isstring" +"setomnvar" +"getomnvar" +"setdvar" +"setdynamicdvar" +"setdvarifuninitialized" +"setdevdvar" +"setdevdvarifuninitialized" +"getdvar" +"getdvarint" +"getdvarfloat" +"getdvarvector" +"gettime" +"gettimeutc" +"getradiometricunit" +"getentbynum" +"getweaponmodel" +"getweapondisplayname" +"getweaponbasename" +"getweaponattachments" +"getweaponattachmentdisplaynames" +"getweaponcamoname" +"getweaponreticlename" +"getanimlength" +"animhasnotetrack" +"getnotetracktimes" +"spawn" +"spawnloopsound" +"spawnloopingsound" +"bullettrace" +"bullettracepassed" +"sighttracepassed" +"physicstrace" +"playerphysicstrace" +"getgroundposition" +"getmovedelta" +"getangledelta" +"getnorthyaw" +"setnorthyaw" +"setslowmotion" +"randomint" +"randomfloat" +"randomintrange" +"randomfloatrange" +"sin" +"cos" +"tan" +"asin" +"acos" +"atan" +"int" +"float" +"abs" +"min" +"max" +"floor" +"ceil" +"exp" +"log" +"sqrt" +"squared" +"clamp" +"angleclamp" +"angleclamp180" +"vectorfromlinetopoint" +"pointonsegmentnearesttopoint" +"distance" +"distance2d" +"distancesquared" +"length" +"length2d" +"lengthsquared" +"length2dsquared" +"closer" +"vectordot" +"vectorcross" +"vectornormalize" +"vectortoangles" +"vectortoyaw" +"vectorlerp" +"axistoangles" +"anglestoup" +"anglestoright" +"anglestoforward" +"anglesdelta" +"combineangles" +"transformmove" +"rotatevector" +"rotatepointaroundvector" +"issubstr" +"isendstr" +"getsubstr" +"tolower" +"strtok" +"stricmp" +"ambientplay" +"ambientstop" +"precachemodel" +"precacheshellshock" +"precacheitem" +"precacheshader" +"precachestring" +"precachemenu" +"precacherumble" +"precachelocationselector" +"precacheleaderboards" +"loadfx" +"playfx" +"playfxontag" +"stopfxontag" +"killfxontag" +"playloopedfx" +"spawnfx" +"triggerfx" +"playfxontagforclients" +"setfxkillondelete" +"playimpactheadfatalfx" +"physicsexplosionsphere" +"physicsexplosioncylinder" +"physicsjolt" +"physicsjitter" +"setexpfog" +"setexpfogext" +"setexpfogdvarsonly" +"setexpfogextdvarsonly" +"setatmosfog" +"setatmosfogdvarsonly" +"isexplosivedamagemod" +"radiusdamage" +"setplayerignoreradiusdamage" +"glassradiusdamage" +"earthquake" +"getnumparts" +"getpartname" +"weaponfiretime" +"weaponclipsize" +"weaponisauto" +"weaponissemiauto" +"weaponisboltaction" +"weaponinheritsperks" +"weaponburstcount" +"weapontype" +"weaponclass" +"weaponinventorytype" +"weaponstartammo" +"weaponmaxammo" +"weaponaltweaponname" +"isweaponcliponly" +"isweapondetonationtimed" +"isweaponmanuallydetonatedbyemptythrow" +"weaponhasthermalscope" +"getvehiclenode" +"getvehiclenodearray" +"getallvehiclenodes" +"getnumvehicles" +"precachevehicle" +"spawnvehicle" +"vehicle_getarray" +"vehicle_getspawnerarray" +"playrumbleonposition" +"playrumblelooponposition" +"stopallrumbles" +"soundexists" +"openfile" +"closefile" +"fprintln" +"fprintfields" +"freadln" +"fgetarg" +"setminimap" +"setthermalbodymaterial" +"getarraykeys" +"getfirstarraykey" +"getnextarraykey" +"sortbydistance" +"tablelookup" +"tablelookupbyrow" +"tablelookupistring" +"tablelookupistringbyrow" +"tablelookuprownum" +"tableexists" +"getmissileowner" +"magicbullet" +"getweaponflashtagname" +"averagepoint" +"averagenormal" +"getglass" +"getglassarray" +"getglassorigin" +"isglassdestroyed" +"destroyglass" +"deleteglass" +"getdspbuscount" +"getdspbusname" +"objective_add" +"objective_delete" +"objective_state" +"objective_icon" +"objective_indentlevel" +"objective_position" +"objective_current" +"objective_onentity" +"objective_onentitywithrotation" +"objective_team" +"objective_player" +"objective_playerteam" +"objective_playerenemyteam" +"objective_playermask_hidefromall" +"objective_playermask_hidefrom" +"objective_playermask_showtoall" +"objective_playermask_showto" +"iprintln" +"iprintlnbold" +"logstring" +"getent" +"getentarray" +"getspawnarray" +"spawnplane" +"spawnstruct" +"spawnhelicopter" +"isalive" +"isspawner" +"missile_createattractorent" +"missile_createattractororigin" +"missile_createrepulsorent" +"missile_createrepulsororigin" +"missile_deleteattractor" +"playsoundatpos" +"newhudelem" +"newclienthudelem" +"newteamhudelem" +"resettimeout" +"isplayer" +"isplayernumber" +"setwinningteam" +"announcement" +"clientannouncement" +"setteammode" +"getteamscore" +"setteamscore" +"setclientnamemode" +"updateclientnames" +"getteamplayersalive" +"logprint" +"worldentnumber" +"obituary" +"positionwouldtelefrag" +"canspawn" +"getstarttime" +"precacheheadicon" +"precacheminimapicon" +"precachempanim" +"map_restart" +"exitlevel" +"addtestclient" +"addagent" +"setarchive" +"allclientsprint" +"clientprint" +"mapexists" +"isvalidgametype" +"matchend" +"setplayerteamrank" +"endparty" +"setteamradar" +"getteamradar" +"setteamradarstrength" +"getteamradarstrength" +"getuavstrengthmin" +"getuavstrengthmax" +"getuavstrengthlevelneutral" +"getuavstrengthlevelshowenemyfastsweep" +"getuavstrengthlevelshowenemydirectional" +"blockteamradar" +"unblockteamradar" +"isteamradarblocked" +"getassignedteam" +"setmatchdata" +"getmatchdata" +"sendmatchdata" +"clearmatchdata" +"setmatchdatadef" +"setmatchclientip" +"setmatchdataid" +"setclientmatchdata" +"getclientmatchdata" +"setclientmatchdatadef" +"sendclientmatchdata" +"getbuildversion" +"getbuildnumber" +"getsystemtime" +"getmatchrulesdata" +"isusingmatchrulesdata" +"kick" +"issplitscreen" +"setmapcenter" +"setgameendtime" +"visionsetnaked" +"visionsetnight" +"visionsetmissilecam" +"visionsetthermal" +"visionsetpain" +"endlobby" +"setac130ambience" +"getmapcustom" +"spawnsighttrace" +"incrementcounter" +"getcountertotal" +"getlevelticks" +"perlinnoise2d" +"calcrockingangles" +"reconevent" +"reconspatialevent" +"setsunflareposition" +"createthreatbiasgroup" +"threatbiasgroupexists" +"getthreatbias" +"setthreatbias" +"setthreatbiasagainstall" +"setignoremegroup" +"isenemyteam" +"objective_additionalentity" +"objective_state_nomessage" +"objective_string" +"objective_string_nomessage" +"objective_additionalposition" +"objective_current_nomessage" +"objective_additionalcurrent" +"objective_ring" +"objective_setpointertextoverride" +"getnode" +"getnodearray" +"getallnodes" +"getnodesinradius" +"getnodesinradiussorted" +"getclosestnodeinsight" +"getreflectionlocs" +"getreflectionreferencelocs" +"getvehicletracksegment" +"getvehicletracksegmentarray" +"getallvehicletracksegments" +"isarray" +"isai" +"getindexforluincstring" +"issentient" +"isgodmode" +"getdebugdvar" +"getdebugdvarint" +"getdebugdvarfloat" +"setsaveddvar" +"getfreeaicount" +"getaicount" +"getaiarray" +"getaispeciesarray" +"getspawnerarray" +"getcorpsearray" +"getspawnerteamarray" +"getweaponclipmodel" +"getbrushmodelcenter" +"getkeybinding" +"getcommandfromkey" +"getsticksconfig" +"weaponfightdist" +"weaponmaxdist" +"isturretactive" +"getturretfov" +"target_alloc" +"target_flush" +"target_set" +"target_remove" +"target_setshader" +"target_setoffscreenshader" +"target_isinrect" +"target_isincircle" +"target_startreticlelockon" +"target_clearreticlelockon" +"target_getarray" +"target_istarget" +"target_setattackmode" +"target_setjavelinonly" +"target_hidefromplayer" +"target_showtoplayer" +"target_setscaledrendermode" +"target_drawcornersonly" +"target_drawsquare" +"target_drawsingle" +"target_setminsize" +"target_setmaxsize" +"target_setcolor" +"target_setdelay" +"getstartorigin" +"getstartangles" +"getcycleoriginoffset" +"magicgrenade" +"magicgrenademanual" +"setblur" +"musicplay" +"musicstop" +"soundfade" +"addsoundsubmix" +"clearsoundsubmix" +"clearallsubmixes" +"blendsoundsubmix" +"makesoundsubmixsticky" +"makesoundsubmixunsticky" +"soundsettimescalefactor" +"soundresettimescale" +"levelsoundfade" +"precachenightvisioncodeassets" +"precachedigitaldistortcodeassets" +"precachesonarvisioncodeassets" +"precacheminimapsentrycodeassets" +"savegame" +"issavesuccessful" +"issaverecentlyloaded" +"savegamenocommit" +"commitsave" +"commitwouldbevalid" +"getfxvisibility" +"setculldist" +"getculldist" +"sethalfresparticles" +"getmapsunlight" +"setsunlight" +"resetsunlight" +"getmapsundirection" +"getmapsunangles" +"setsundirection" +"lerpsundirection" +"lerpsunangles" +"resetsundirection" +"enableforcedsunshadows" +"enableforcednosunshadows" +"disableforcedsunshadows" +"enableouterspacemodellighting" +"disableouterspacemodellighting" +"remapstage" +"changelevel" +"missionsuccess" +"missionfailed" +"cinematic" +"cinematicingame" +"cinematicingamesync" +"cinematicingameloop" +"cinematicingameloopresident" +"iscinematicplaying" +"stopcinematicingame" +"pausecinematicingame" +"drawcompassfriendlies" +"bulletspread" +"bullettracer" +"badplace_delete" +"badplace_cylinder" +"badplace_arc" +"badplace_brush" +"clearallcorpses" +"setturretnode" +"unsetturretnode" +"setnodepriority" +"isnodeoccupied" +"setdebugorigin" +"setdebugangles" +"updategamerprofile" +"updategamerprofileall" +"clearlocalizedstrings" +"setphysicsgravitydir" +"gettimescale" +"settimescale" +"setslowmotionview" +"teleportscene" +"forcesharedammo" +"refreshhudcompass" +"refreshhudammocounter" +"notifyoncommand" +"pow" +"atan2" +"botgetmemoryevents" +"botautoconnectenabled" +"botzonegetcount" +"botzonesetteam" +"botzonenearestcount" +"botmemoryflags" +"botflagmemoryevents" +"botzonegetindoorpercent" +"botsentientswap" +"isbot" +"isagent" +"getmaxagents" +"botdebugdrawtrigger" +"botgetclosestnavigablepoint" +"getnodesintrigger" +"nodesvisible" +"getnodesonpath" +"getzonecount" +"getzonenearest" +"getzonenodes" +"getzonepath" +"getzoneorigin" +"getnodezone" +"getzonenodesbydist" +"getzonenodeforindex" +"getweaponexplosionradius" +"markdangerousnodes" +"markdangerousnodesintrigger" +"nodeexposedtosky" +"findentrances" +"badplace_global" +"getpathdist" +"getlinkednodes" +"disconnectnodepair" +"connectnodepair" +"gettimesincelastpaused" +"precachefxontag" +"precachetag" +"precachesound" +"devsetminimapdvarsettings" +"loadtransient" +"unloadtransient" +"unloadalltransients" +"synctransients" +"aretransientsbusy" +"istransientqueued" +"istransientloaded" +"loadstartpointtransient" +"distance2dsquared" +"getangledelta3d" +"activateclientexploder" +"trajectorycalculateinitialvelocity" +"trajectorycalculateminimumvelocity" +"trajectorycalculateexitangle" +"trajectoryestimatedesiredinairtime" +"trajectorycomputedeltaheightattime" +"trajectorycanattemptaccuratejump" +"adddebugcommand" +"ispointinvolume" +"cinematicgettimeinmsec" +"cinematicgetframe" +"iscinematicloaded" +"bbprint" +"getenemysquaddata" +"lookupsoundlength" +"getscriptablearray" +"clearfog" +"setleveldopplerpreset" +"screenshake" +"isusinghdr" +"isusingssao" +"grantloot" +"playerphysicstraceinfo" +"getminchargetime" +"getchargetimepershot" +"getmaxchargeshots" +"weaponischargeable" +"weaponusesheat" +"lootserviceonendgame" +"luinotifyevent" +"lootserviceonstartgame" +"tournamentreportplayerspm" +"tournamentreportwinningteam" +"tournamentreportendofgame" +"wakeupphysicssphere" +"wakeupragdollsphere" +"dopplerpitch" +"piecewiselinearlookup" +"anglestoaxis" +"visionsetwater" +"sendscriptusageanalysisdata" +"resetscriptusageanalysisdata" +"instantlylogusageanalysisdata" +"invertangles" +"rotatevectorinverted" +"calculatestartorientation" +"droptoground" +"setdemigodmode" +"precachelaser" +"getcsplinecount" +"getcsplinepointcount" +"getcsplinelength" +"getcsplinepointid" +"getcsplinepointlabel" +"getcsplinepointtension" +"getcsplinepointposition" +"getcsplinepointcorridordims" +"getcsplinepointtangent" +"getcsplinepointdisttonextpoint" +"calccsplineposition" +"calccsplinetangent" +"calccsplinecorridor" +"setnojipscore" +"setnojiptime" +"getpredictedentityposition" +"gamedvrprohibitrecording" +"gamedvrstartrecording" +"gamedvrstoprecording" +"gamedvrsetvideometadata" +"gamedvrprohibitscreenshots" +"gamedvrsetscreenshotmetadata" +"queuedialog" +"speechenablegrammar" +"speechenable" +"livestreamingenable" +"livestreamingsetbitrate" +"livestreamingsetmetadata" +"livestreamingenablearchiving" +"triggerportableradarping" +"setglaregrimematerial" +"botgetteamlimit" +"spawnfxforclient" +"botgetteamdifficulty" +"debugstar" +"newdebughudelem" +"printlightsetsettings" +"lightsetdumpstate" +"getsquadassaultelo" +"loadluifile" +"isdedicatedserver" +"getplaylistversion" +"getplaylistid" +"getactiveclientcount" +"issquadsmode" +"getsquadassaultsquadindex" +"visionsetpostapply" +"addbot" +"ishairrunning" +"getnearbyarrayelements" +"vectorclamp" +"isalliedsentient" +"istestclient" +"getrandomnodedestination" +"debuglocalizestring" +"enablesoundcontextoverride" +"disablesoundcontextoverride" +"notifyoncommandremove" +"getsndaliasvalue" +"setsndaliasvalue" +"packedtablelookup" +"packedtablesectionlookup" +"packedtablelookupwithrange" +"grappletrace" +"stopclientexploder" +"closestpointstwosegs" +"isremovedentity" +"tablegetrowcount" +"tablegetcolumncount" +"batteryusepershot" +"batteryreqtouse" +"isweaponmanuallydetonatedbydoubletap" +"grapplegetmagnets" +"getweaponname" +"activatepersistentclientexploder" +"deployriotshield" +"validatecostume" +"randomcostume" +"shootblank" +"boidflockupdate" +"debuggetanimname" +"setspmatchdata" +"getspmatchdata" +"sendspmatchdata" +"clearspmatchdata" +"setspmatchdatadef" +"playcinematicforall" +"preloadcinematicforall" +"stopcinematicforall" +"capsuletracepassed" +"stopfxontagforclient" +"killfxontagforclient" +"isvector" +"notifychallengecomplete" +"lootservicestarttrackingplaytime" +"lootservicestoptrackingplaytime" +"lootservicevalidateplaytime" +"recordbreadcrumbdataforplayer" +"getweaponandattachmentmodels" +"changewhizbyautosimparams" +"sysprint" +"objective_mlgspectator" +"setspcheckpointdata" +"getspcheckpointdata" +"isnumber" +"isonlinegame" +"issystemlink" +"setsoundmasteringfadetime" +"getstanceandmotionstateforplayer" +"nodeisnotusable" +"nodesetnotusable" +"spawnlinkedfx" +"spawnlinkedfxforclient" +"getplaylistname" +"getlocaltimestring" +"isonwifi" +"getbuttonsconfig" +"getchallengeid" +"nodehasremotemissileset" +"nodegetremotemissilename" +"remotemissileenttracetooriginpassed" +"bombingruntracepassed" +"soundsettraceflags" +"handlepickupdeployedriotshield" +"getcodanywherecurrentplatform" +"getcostumefromtable" +"visionsetoverdrive" +"nodegetsplitgroup" +"recordbreadcrumbdataforplayersp" +"getchallengerewarditem" +"setentplayerxuidforemblem" +"resetentplayerxuidforemblems" +"nodesetremotemissilename" +"isshipbuild" +"strinsertnumericdelimiters" +"isscriptedagent" +"playfxonweapon" +"stopfxonweapon" +"killfxonweapon" +"getdefaultmaxfaceenemydistance" +"applyaccelerationonentity" +"applyimpulseonentity" +"setshaderconstant" +"getinventoryitemtype" +"getweaponmodelbounds" +"weaponitemplayidleanim" +"getstaticmodelcount" +"getstaticmodelname" +"getstaticmodelbounds" +"findstaticmodelindex" +"getdynentcount" +"getdynentmodelname" +"getdynentmodelbounds" +"finddynentwithmodelindex" +"getentitymodelname" +"getentitymodelbounds" +"findentitywithmodelindex" +*/ + +// ps4 method_list + +/* +"attach" +"detach" +"detachall" +"getattachsize" +"getattachmodelname" +"getattachtagname" +"getattachignorecollision" +"hidepart" +"hidepart_allinstances" +"hideallparts" +"showpart" +"showallparts" +"linkto" +"linktoblendtotag" +"unlink" +"islinked" +"enablelinkto" +"playerlinkto" +"playerlinktodelta" +"playerlinkweaponviewtodelta" +"playerlinktoabsolute" +"playerlinktoblend" +"playerlinkedoffsetenable" +"playerlinkedoffsetdisable" +"playerlinkedsetviewznear" +"playerlinkedsetusebaseangleforviewclamp" +"lerpviewangleclamp" +"setviewangleresistance" +"springcamenabled" +"springcamdisabled" +"linktoplayerview" +"unlinkfromplayerview" +"geteye" +"istouching" +"getistouchingentities" +"stoploopsound" +"stopsounds" +"playrumbleonentity" +"playrumblelooponentity" +"stoprumble" +"delete" +"setmodel" +"laseron" +"laseroff" +"laseraltviewon" +"laseraltviewoff" +"thermalvisionon" +"thermalvisionoff" +"thermalvisionfofoverlayon" +"thermalvisionfofoverlayoff" +"autospotoverlayon" +"autospotoverlayoff" +"seteyesonuplinkenabled" +"setdamagefeedback" +"setcontents" +"makeusable" +"makeunusable" +"makeglobalusable" +"makeglobalunusable" +"setcursorhint" +"sethintstring" +"setsecondaryhintstring" +"forceusehinton" +"forceusehintoff" +"makesoft" +"makehard" +"willneverchange" +"startfiring" +"stopfiring" +"isfiringturret" +"startbarrelspin" +"stopbarrelspin" +"getbarrelspinrate" +"remotecontrolturret" +"remotecontrolturretoff" +"shootturret" +"getturretowner" +"setsentryowner" +"setsentrycarrier" +"setturretminimapvisible" +"settargetentity" +"snaptotargetentity" +"cleartargetentity" +"getturrettarget" +"setplayerspread" +"setaispread" +"setsuppressiontime" +"setconvergencetime" +"setconvergenceheightpercent" +"setturretteam" +"maketurretsolid" +"maketurretoperable" +"maketurretinoperable" +"setturretaccuracy" +"setrightarc" +"setleftarc" +"settoparc" +"setbottomarc" +"setautorotationdelay" +"setdefaultdroppitch" +"restoredefaultdroppitch" +"turretfiredisable" +"turretfireenable" +"setturretmodechangewait" +"usetriggerrequirelookat" +"getstance" +"setstance" +"itemweaponsetammo" +"getammocount" +"gettagorigin" +"gettagangles" +"shellshock" +"stunplayer" +"stopshellshock" +"fadeoutshellshock" +"setdepthoffield" +"setviewmodeldepthoffield" +"setmotionblurmovescale" +"setmotionblurturnscale" +"setmotionblurzoomscale" +"viewkick" +"localtoworldcoords" +"getentitynumber" +"getentityvelocity" +"enablegrenadetouchdamage" +"disablegrenadetouchdamage" +"enableaimassist" +"disableaimassist" +"radiusdamage" +"detonate" +"damageconetrace" +"sightconetrace" +"missile_settargetent" +"missile_settargetpos" +"missile_cleartarget" +"missile_setflightmodedirect" +"missile_setflightmodetop" +"getlightintensity" +"setlightintensity" +"isragdoll" +"setmovespeedscale" +"cameralinkto" +"cameraunlink" +"controlslinkto" +"controlsunlink" +"makevehiclesolidcapsule" +"teleportentityrelative" +"makevehiclesolidsphere" +"makevehiclesolid" +"remotecontrolvehicle" +"remotecontrolvehicleoff" +"isfiringvehicleturret" +"remotecontrolvehicletarget" +"remotecontrolvehicletargetoff" +"drivevehicleandcontrolturret" +"drivevehicleandcontrolturretoff" +"getplayersetting" +"getlocalplayerprofiledata" +"setlocalplayerprofiledata" +"remotecamerasoundscapeon" +"remotecamerasoundscapeoff" +"setmotiontrackervisible" +"getmotiontrackervisible" +"worldpointinreticle_circle" +"worldpointinreticle_rect" +"getpointinbounds" +"transfermarkstonewscriptmodel" +"setwatersheeting" +"addontoviewmodel" +"clearviewmodeladdons" +"setweaponhudiconoverride" +"getweaponhudiconoverride" +"setempjammed" +"playersetexpfog" +"playersetexpfogext" +"playersetatmosfog" +"isitemunlocked" +"getplayerdata" +"setplayerdata" +"getcacplayerdata" +"setcacplayerdata" +"trackerupdate" +"pingplayer" +"buttonpressed" +"sayall" +"sayteam" +"setspawnweapon" +"dropitem" +"dropscavengerbag" +"finishplayerdamage" +"suicide" +"closeingamemenu" +"iprintln" +"iprintlnbold" +"spawn" +"setentertime" +"cloneplayer" +"istalking" +"allowspectateteam" +"forcespectatepov" +"getguid" +"getxuid" +"getucdidhigh" +"getucdidlow" +"getclanidhigh" +"getclanidlow" +"ishost" +"getspectatingplayer" +"predictstreampos" +"updatescores" +"updatedmscores" +"setrank" +"setcardtitle" +"setcardicon" +"setcardnameplate" +"setcarddisplayslot" +"kc_regweaponforfxremoval" +"laststandrevive" +"startlaststand" +"setspectatedefaults" +"getthirdpersoncrosshairoffset" +"disableweaponpickup" +"enableweaponpickup" +"issplitscreenplayer" +"issplitscreenplayerprimary" +"markforeyeson" +"issighted" +"getsightedplayers" +"getplayerssightingme" +"getviewmodel" +"fragbuttonpressed" +"secondaryoffhandbuttonpressed" +"getcurrentweaponclipammo" +"setvelocity" +"getplayerviewheight" +"getnormalizedmovement" +"getnormalizedcameramovement" +"giveweapon" +"takeweapon" +"takeallweapons" +"getcurrentweapon" +"getcurrentprimaryweapon" +"getcurrentoffhand" +"hasweapon" +"switchtoweapon" +"switchtoweaponimmediate" +"gethybridsightenabled" +"switchtooffhand" +"givestartammo" +"givemaxammo" +"getfractionstartammo" +"getfractionmaxammo" +"isdualwielding" +"isreloading" +"isswitchingweapon" +"setorigin" +"getvelocity" +"setplayerangles" +"getplayerangles" +"usebuttonpressed" +"attackbuttonpressed" +"adsbuttonpressed" +"meleebuttonpressed" +"playerads" +"isonground" +"isusingturret" +"setviewmodel" +"setlethalweapon" +"getlethalweapon" +"settacticalweapon" +"gettacticalweapon" +"beginlocationselection" +"endlocationselection" +"disableweapons" +"enableweapons" +"disableoffhandweapons" +"enableoffhandweapons" +"disableweaponswitch" +"enableweaponswitch" +"openpopupmenu" +"openpopupmenunomouse" +"closepopupmenu" +"openmenu" +"closemenu" +"savematchrulestohistory" +"freezecontrols" +"disableusability" +"enableusability" +"setwhizbyspreads" +"setwhizbyradii" +"setreverb" +"deactivatereverb" +"setvolmod" +"playlocalsound" +"stoplocalsound" +"setweaponammoclip" +"setweaponammostock" +"getweaponammoclip" +"getweaponammostock" +"anyammoforweaponmodes" +"setclientomnvar" +"setclientdvar" +"setclientdvars" +"setclientspawnsighttraces" +"clientspawnsighttracepassed" +"allowads" +"allowjump" +"allowladder" +"allowmantle" +"allowsprint" +"setspreadoverride" +"resetspreadoverride" +"setaimspreadmovementscale" +"setactionslot" +"setviewkickscale" +"getviewkickscale" +"getweaponslistall" +"getweaponslistprimaries" +"getweaponslistoffhands" +"getweaponslistitems" +"getweaponslistexclusives" +"getweaponslist" +"canplayerplacesentry" +"canplayerplacetank" +"visionsetnakedforplayer" +"visionsetnightforplayer" +"visionsetmissilecamforplayer" +"visionsetthermalforplayer" +"visionsetpainforplayer" +"setblurforplayer" +"getplayerweaponmodel" +"getplayerknifemodel" +"updateentitywithweapons" +"notifyonplayercommand" +"canmantle" +"forcemantle" +"ismantling" +"playfx" +"player_recoilscaleon" +"player_recoilscaleoff" +"weaponlockstart" +"weaponlockfinalize" +"weaponlockfree" +"weaponlocktargettooclose" +"weaponlocknoclearance" +"visionsyncwithplayer" +"showhudsplash" +"setperk" +"hasperk" +"clearperks" +"unsetperk" +"registerparty" +"getfireteammembers" +"noclip" +"ufo" +"moveto" +"movex" +"movey" +"movez" +"movegravity" +"moveslide" +"stopmoveslide" +"rotateto" +"rotatepitch" +"rotateyaw" +"rotateroll" +"addpitch" +"addyaw" +"addroll" +"vibrate" +"rotatevelocity" +"solid" +"notsolid" +"setcandamage" +"setcanradiusdamage" +"physicslaunchclient" +"physicslaunchserver" +"physicslaunchserveritem" +"clonebrushmodeltoscriptmodel" +"scriptmodelplayanim" +"scriptmodelclearanim" +"scriptmodelplayanimdeltamotion" +"vehicle_teleport" +"attachpath" +"getattachpos" +"startpath" +"setswitchnode" +"setwaitspeed" +"vehicle_finishdamage" +"vehicle_setspeed" +"vehicle_setspeedimmediate" +"vehicle_rotateyaw" +"vehicle_getspeed" +"vehicle_getvelocity" +"vehicle_getbodyvelocity" +"vehicle_getsteering" +"vehicle_getthrottle" +"vehicle_turnengineoff" +"vehicle_turnengineon" +"vehicle_orientto" +"getgoalspeedmph" +"setacceleration" +"setdeceleration" +"resumespeed" +"setyawspeed" +"setyawspeedbyname" +"setmaxpitchroll" +"setairresistance" +"setturningability" +"setjitterparams" +"sethoverparams" +"joltbody" +"freevehicle" +"getwheelsurface" +"getvehicleowner" +"setvehiclelookattext" +"setvehicleteam" +"setneargoalnotifydist" +"setvehgoalpos" +"setgoalyaw" +"cleargoalyaw" +"settargetyaw" +"cleartargetyaw" +"vehicle_helisetai" +"setturrettargetvec" +"setturrettargetent" +"clearturrettarget" +"vehicle_canturrettargetpoint" +"setlookatent" +"clearlookatent" +"setvehweapon" +"fireweapon" +"vehicleturretcontrolon" +"vehicleturretcontroloff" +"isturretready" +"vehicledriveto" +"vehicle_dospawn" +"vehicle_isphysveh" +"vehphys_crash" +"vehphys_launch" +"vehphys_disablecrashing" +"vehphys_enablecrashing" +"vehphys_setspeed" +"vehphys_setconveyorbelt" +"freehelicopter" +"playerlinkedturretanglesenable" +"playerlinkedturretanglesdisable" +"playerlinkedvehicleanglesenable" +"playerlinkedvehicleanglesdisable" +"playersetstreamorigin" +"playerclearstreamorigin" +"nightvisionviewon" +"nightvisionviewoff" +"painvisionon" +"painvisionoff" +"getplayerintelisfound" +"setplayerintelfound" +"newpip" +"sethuddynlight" +"startscriptedanim" +"startcoverbehavior" +"startcoverarrival" +"starttraversearrival" +"checkcoverexitposwithpath" +"shoot" +"shootblank" +"melee" +"updateplayersightaccuracy" +"findshufflecovernode" +"findnearbycovernode" +"findcovernode" +"findbestcovernode" +"getcovernode" +"usecovernode" +"iscovervalidagainstenemy" +"reacquirestep" +"findreacquiredirectpath" +"trimpathtoattack" +"reacquiremove" +"findreacquireproximatepath" +"flagenemyunattackable" +"enterprone" +"exitprone" +"setproneanimnodes" +"updateprone" +"clearpitchorient" +"setlookatanimnodes" +"setlookat" +"setlookatentity" +"setlookatyawlimits" +"stoplookat" +"getmuzzlepos" +"getmuzzleangle" +"getmuzzlesideoffsetpos" +"getaimangle" +"canshoot" +"canshootenemy" +"cansee" +"seerecently" +"lastknowntime" +"lastknownpos" +"dropweapon" +"maymovetopoint" +"maymovefrompointtopoint" +"teleport" +"forceteleport" +"safeteleport" +"withinapproxpathdist" +"ispathdirect" +"allowedstances" +"isstanceallowed" +"issuppressionwaiting" +"issuppressed" +"ismovesuppressed" +"checkgrenadethrow" +"checkgrenadelaunch" +"checkgrenadelaunchpos" +"throwgrenade" +"pickupgrenade" +"useturret" +"stopuseturret" +"canuseturret" +"traversemode" +"animmode" +"orientmode" +"getmotionangle" +"shouldfacemotion" +"getanglestolikelyenemypath" +"setturretanim" +"getturret" +"getgroundenttype" +"forcestartnegotiation" +"setalienjumpcostscale" +"setalienruncostscale" +"setalientraversecostscale" +"animcustom" +"isinscriptedstate" +"canattackenemynode" +"getnegotiationstartnode" +"getnegotiationendnode" +"getnegotiationnextnode" +"getdoorpathnode" +"comparenodedirtopathdir" +"checkprone" +"pushplayer" +"checkgrenadethrowpos" +"setgoalnode" +"setgoalpos" +"setgoalentity" +"setgoalvolume" +"setgoalvolumeauto" +"getgoalvolume" +"cleargoalvolume" +"setfixednodesafevolume" +"getfixednodesafevolume" +"clearfixednodesafevolume" +"isingoal" +"setruntopos" +"nearnode" +"nearclaimnode" +"nearclaimnodeandangle" +"atdangerousnode" +"getisforcedincombat" +"setisforcedincombat" +"getenemyinfo" +"clearenemy" +"setentitytarget" +"clearentitytarget" +"setpotentialthreat" +"clearpotentialthreat" +"setflashbanged" +"setengagementmindist" +"setengagementmaxdist" +"isknownenemyinradius" +"isknownenemyinvolume" +"settalktospecies" +"invisiblenotsolid" +"visiblesolid" +"setdefaultaimlimits" +"initriotshieldhealth" +"getenemysqdist" +"getclosestenemysqdist" +"setthreatbiasgroup" +"getthreatbiasgroup" +"makeentitysentient" +"freeentitysentient" +"isindoor" +"getdroptofloorposition" +"isbadguy" +"animscripted" +"animscriptedthirdperson" +"animrelative" +"stopanimscripted" +"clearanim" +"setanimknob" +"setanimknoblimited" +"setanimknobrestart" +"setanimknoblimitedrestart" +"setanimknoball" +"setanimknoballlimited" +"setanimknoballrestart" +"setanimknoballlimitedrestart" +"setanim" +"setanimlimited" +"setanimrestart" +"setanimlimitedrestart" +"getanimtime" +"getanimweight" +"getanimassettype" +"setflaggedanimknob" +"setflaggedanimknoblimited" +"setflaggedanimknobrestart" +"setflaggedanimknoblimitedrestart" +"setflaggedanimknoball" +"setflaggedanimknoballrestart" +"setflaggedanim" +"setflaggedanimlimited" +"setflaggedanimrestart" +"setflaggedanimlimitedrestart" +"useanimtree" +"stopuseanimtree" +"setanimtime" +"allowstand" +"allowcrouch" +"allowprone" +"allowlean" +"allowswim" +"setocclusion" +"deactivateocclusion" +"deactivateallocclusion" +"isocclusionenabled" +"iseqenabled" +"seteq" +"seteqbands" +"deactivateeq" +"seteqlerp" +"islookingat" +"isthrowinggrenade" +"isfiring" +"ismeleeing" +"setautopickup" +"allowmelee" +"allowfire" +"enablehealthshield" +"enabledeathshield" +"nightvisiongogglesforceon" +"nightvisiongogglesforceoff" +"enableinvulnerability" +"disableinvulnerability" +"enablebreaching" +"disablebreaching" +"forceviewmodelanimation" +"disableturretdismount" +"enableturretdismount" +"uploadscore" +"uploadtime" +"uploadleaderboards" +"giveachievement" +"hidehud" +"showhud" +"mountvehicle" +"dismountvehicle" +"enableslowaim" +"disableslowaim" +"usehintsinvehicle" +"vehicleattackbuttonpressed" +"setwhizbyoffset" +"setwhizbyprobabilities" +"visionsetnakedforplayer_lerp" +"setwaitnode" +"returnplayercontrol" +"vehphys_starttrack" +"vehphys_clearautodisable" +"vehicleusealtblendedaudio" +"settext" +"clearalltextafterhudelem" +"setshader" +"settargetent" +"cleartargetent" +"settimer" +"settimerup" +"settimerstatic" +"settenthstimer" +"settenthstimerup" +"settenthstimerstatic" +"setclock" +"setclockup" +"setvalue" +"setwaypoint" +"setwaypointedgestyle_rotatingicon" +"setwaypointedgestyle_secondaryarrow" +"setwaypointiconoffscreenonly" +"fadeovertime" +"scaleovertime" +"moveovertime" +"reset" +"destroy" +"setpulsefx" +"setplayernamestring" +"changefontscaleovertime" +"startignoringspotlight" +"stopignoringspotlight" +"dontcastshadows" +"castshadows" +"setstablemissile" +"playersetgroundreferenceent" +"dontinterpolate" +"dospawn" +"stalingradspawn" +"getorigin" +"getcentroid" +"getshootatpos" +"getdebugeye" +"useby" +"playsound" +"playsoundevent" +"getsoundeventplayingonentity" +"setsoundeventparameter" +"stopsoundevent" +"playsoundatviewheight" +"prefetchsound" +"setpitch" +"scalepitch" +"setvolume" +"scalevolume" +"enableportalgroup" +"setspeakermapmonotostereo" +"setspeakermapmonoto51" +"setdistributed2dsound" +"playsoundasmaster" +"playloopsound" +"eqon" +"eqoff" +"haseq" +"iswaitingonsound" +"playfoley" +"getnormalhealth" +"setnormalhealth" +"dodamage" +"kill" +"show" +"hide" +"showonclient" +"hideonclient" +"disconnectpaths" +"connectpaths" +"disconnectnode" +"connectnode" +"startusingheroonlylighting" +"stopusingheroonlylighting" +"startusinglessfrequentlighting" +"stopusinglessfrequentlighting" +"setmovingplatformplayerturnrate" +"setthermalfog" +"setnightvisionfog" +"clearthermalfog" +"clearnightvisionfog" +"digitaldistortsetparams" +"setmode" +"getmode" +"setturretignoregoals" +"setturretcanaidetach" +"setturretfov" +"setplayerturretfov" +"lerpfov" +"lerpfovscale" +"getvalidcoverpeekouts" +"gethighestnodestance" +"doesnodeallowstance" +"doesnodeforcecombat" +"getgunangles" +"magicgrenade" +"magicgrenademanual" +"getentnum" +"launch" +"setsoundblend" +"makefakeai" +"spawndrone" +"setcorpseremovetimer" +"setlookattext" +"setspawnerteam" +"addaieventlistener" +"removeaieventlistener" +"getlightcolor" +"setlightcolor" +"getlightradius" +"setlightradius" +"getlightfovinner" +"getlightfovouter" +"setlightfovrange" +"getlightexponent" +"setlightexponent" +"startragdoll" +"startragdollfromimpact" +"queryshouldearlyragdoll" +"shouldearlyragdoll" +"logstring" +"laserhidefromclient" +"stopsounddspbus" +"thermaldrawenable" +"thermaldrawdisable" +"setturretdismountorg" +"setdamagestage" +"playsoundtoteam" +"playsoundtoplayer" +"playerhide" +"playershow" +"showtoplayer" +"threatdetectedtoplayer" +"clearthreatdetected" +"enableplayeruse" +"disableplayeruse" +"enableammogeneration" +"disableammogeneration" +"makescrambler" +"makeportableradar" +"clearscrambler" +"clearportableradar" +"placespawnpoint" +"setteamfortrigger" +"clientclaimtrigger" +"clientreleasetrigger" +"releaseclaimedtrigger" +"isusingonlinedataoffline" +"getrestedtime" +"sendleaderboards" +"isonladder" +"getcorpseanim" +"playerforcedeathanim" +"enablefocus" +"disablefocus" +"enableaudiozoom" +"disableaudiozoom" +"startac130" +"stopac130" +"enablemousesteer" +"setscriptmoverkillcam" +"usinggamepad" +"forcethirdpersonwhenfollowing" +"disableforcethirdpersonwhenfollowing" +"botsetflag" +"botsetstance" +"botsetscriptmove" +"botsetscriptgoal" +"botsetscriptgoalnode" +"botclearscriptgoal" +"botsetscriptenemy" +"botclearscriptenemy" +"botsetattacker" +"botgetscriptgoal" +"botgetscriptgoalradius" +"botgetscriptgoalyaw" +"botgetscriptgoaltype" +"botgetentrancepoint" +"botgetworldsize" +"botnodeavailable" +"botfindnoderandom" +"botmemoryevent" +"botmemoryselectpos" +"botnodepick" +"bothasscriptgoal" +"botgetpersonality" +"botthrowgrenade" +"botgetmemoryevents" +"botsetpersonality" +"botsetdifficulty" +"botgetdifficulty" +"botgetworldclosestedge" +"botlookatpoint" +"botpredictseepoint" +"botcanseeentity" +"botgetnodesonpath" +"botnodepickmultiple" +"botgetnearestnode" +"botgetfovdot" +"botsetawareness" +"botpursuingscriptgoal" +"botgetscriptgoalnode" +"botgetimperfectenemyinfo" +"botflagmemoryevents" +"botsetpathingstyle" +"botsetdifficultysetting" +"botgetdifficultysetting" +"botgetpathdist" +"botisrandomized" +"botpressbutton" +"botclearbutton" +"botnodescoremultiple" +"getnodenumber" +"setclientowner" +"setotherent" +"setaisightlinevisible" +"setentityowner" +"nodeisdisconnected" +"getnearestnode" +"makeentitynomeleetarget" +"isagent" +"spawnagent" +"finishagentdamage" +"setagentattacker" +"cloneagent" +"agentcanseesentient" +"scragentsetwaypoint" +"scragentsetgoalpos" +"scragentgetgoalpos" +"scragentsetgoalnode" +"scragentsetgoalentity" +"scragentsetgoalradius" +"scragentsetanimscale" +"scragentsetorientmode" +"scragentsetanimmode" +"scragentsetphysicsmode" +"scragentsetclipmode" +"scragentsetmaxturnspeed" +"scragentgetmaxturnspeed" +"scragentbeginmelee" +"scragentsetscripted" +"scragentdotrajectory" +"scragentdoanimlerp" +"scragentsetviewheight" +"scragentclaimnode" +"scragentrelinquishclaimednode" +"setradarping" +"setradarhighlight" +"setsonarvision" +"setharmonicbreach" +"setmaterialscriptparam" +"getaimassistdeltas" +"getaimassisttargetangles" +"getchargetime" +"overridereflectionprobe" +"defaultreflectionprobe" +"isholdinggrenade" +"isswitchinggrenade" +"ispreparinggrenade" +"setstencilstateoverride" +"clearstencilstateoverride" +"allowhighjump" +"isjumping" +"ishighjumping" +"vehicle_setvelocity" +"vehicle_addvelocity" +"getbraggingright" +"getmodelfromentity" +"getweaponheatlevel" +"isweaponoverheated" +"sprintbuttonpressed" +"vehicle_planethrottleoverride" +"vehicle_planethrottlereturncontrol" +"vehicle_planecrash" +"copyanimtreestate" +"lightsetforplayer" +"lightsetoverrideenableforplayer" +"lightsetoverridedisableforplayer" +"physicslaunchclientwithimpulse" +"setorcaavoidance" +"iswheelslipping" +"killnotification" +"setanimrate" +"setdoghandler" +"setdogcommand" +"setdogattackradius" +"isdogfollowinghandler" +"setdogmaxdrivespeed" +"isdogbeingdriven" +"setdogautoattackwhendriven" +"getdogattackbeginnode" +"setanimclass" +"enableanimstate" +"setanimstate" +"getanimentry" +"getanimentryname" +"getanimentryalias" +"getanimentrycount" +"pushplayervector" +"issprinting" +"playerlinkeduselinkedvelocity" +"shootstopsound" +"setclothtype" +"getclothmovesound" +"getequipmovesound" +"jumpbuttonpressed" +"rotateby" +"getlookaheaddir" +"getpathgoalpos" +"setrocketcorpse" +"setcorpsefalling" +"setsurfacetype" +"aiphysicstrace" +"aiphysicstracepassed" +"setdevtext" +"forcemovingplatformentity" +"setmovingplatformtrigger" +"visionsetstage" +"linkwaypointtotargetwithoffset" +"getlinkedparent" +"getmovingplatformparent" +"setnameplatematerial" +"retargetscriptmodellighting" +"setmantlesoundflavor" +"clearclienttriggeraudiozone" +"setclienttriggeraudiozone" +"makevehiclenotcollidewithplayers" +"getbobrate" +"setbobrate" +"setscriptablepartstate" +"stopsliding" +"cancelrocketcorpse" +"setdronegoalpos" +"hudoutlineenable" +"hudoutlinedisable" +"motionblurhqenable" +"motionblurhqdisable" +"screenshakeonentity" +"setpitchorient" +"worldpointtoscreenpos" +"linktoplayerviewignoreparentrot" +"shouldplaymeleedeathanim" +"botfirstavailablegrenade" +"visionsetwaterforplayer" +"setwatersurfacetransitionfx" +"linktoplayerviewfollowwatersurface" +"linktoplayerviewattachwatersurfacetransitioneffects" +"playersetwaterfog" +"emissiveblend" +"enableforceviewmodeldof" +"disableforceviewmodeldof" +"getcustomizationbody" +"getcustomizationhead" +"getcustomizationviewmodel" +"setviewmodeldepth" +"isenemyaware" +"hasenemybeenseen" +"physicssetmaxlinvel" +"physicssetmaxangvel" +"physicsgetlinvel" +"physicsgetlinspeed" +"physicsgetangvel" +"physicsgetangspeed" +"disablemissileboosting" +"enablemissileboosting" +"canspawntestclient" +"spawntestclient" +"loadcustomizationplayerview" +"setgrenadethrowscale" +"setgrenadecookscale" +"setplanesplineid" +"hudoutlineenableforclient" +"hudoutlinedisableforclient" +"hudoutlineenableforclients" +"hudoutlinedisableforclients" +"turretsetbarrelspinenabled" +"hasloadedcustomizationplayerview" +"setclienttriggeraudiozonelerp" +"setclienttriggeraudiozonepartial" +"scragentdoanimrelative" +"rotatetolinked" +"rotatebylinked" +"setlinkedangles" +"getcorpseentity" +"removefrommovingplatformsystem" +"logmatchdatalife" +"logmatchdatadeath" +"queuedialogforplayer" +"setmlgcameradefaults" +"ismlgspectator" +"disableautoreload" +"enableautoreload" +"issprintsliding" +"getlinkedchildren" +"botpredictenemycampspots" +"playsoundonmovingent" +"cancelmantle" +"hasfemalecustomizationmodel" +"loadviewweapons" +"setscriptabledamageowner" +"getscriptabletypeforentity" +"setfxkilldefondelete" +"getdogavoident" +"enabledogavoidance" +"enablehybridsight" +"lastknownreason" +"gettagindex" +"challengenotification" +"cancelaimove" +"vehicle_jetbikesethoverforcescale" +"linktosynchronizedparent" +"getclientomnvar" +"drawpostresolve" +"drawpostresolveoff" +"getcacplayerdataforgroup" +"cloakingenable" +"cloakingdisable" +"getunnormalizedcameramovement" +"getturretheat" +"isturretoverheated" +"vehicle_jetbikegetthrustfraction" +"vehicle_jetbikegetdragfraction" +"vehicle_jetbikegetantislipfraction" +"vehicle_jetbikegettotalrepulsorfraction" +"vehicle_assignbrushmodelcollision" +"vehicle_removebrushmodelcollision" +"vehicle_hovertanksethoverforcescale" +"forcesprint" +"forceads" +"forcedeathfall" +"gethybridscopestate" +"sethybridscopestate" +"getvieworigin" +"setweaponmodelvariant" +"ridevehicle" +"stopridingvehicle" +"getmantlesound" +"autoboltmissileeffects" +"disablemissilestick" +"enablemissilestick" +"setmissileminimapvisible" +"isoffhandweaponreadytothrow" +"isleaning" +"makecollidewithitemclip" +"ismovementfromgamepad" +"visionsetpostapplyforplayer" +"setlookattarget" +"clearlookattarget" +"overridematerial" +"overridematerialreset" +"overridetexture" +"overrideviewmodelmaterial" +"overrideviewmodelmaterialreset" +"enemyincrosshairs" +"setviewmodelmaterialscriptparam" +"vehicle_hovertankgetthrottleforce" +"vehicle_hovertankgetrepulsorforces" +"vehicle_hovertankgetantislipforce" +"vehicle_hovertankgetuprightingforce" +"vehicle_hovertankgetautoyawforce" +"getturretyawrate" +"getturretpitchrate" +"setclienttriggervisionset" +"overridelightingorigin" +"defaultlightingorigin" +"playdynamicambience" +"stopdynamicambience" +"isusinghandbrake" +"isusingboost" +"showviewmodel" +"hideviewmodel" +"setpickupweapon" +"playerlinkedmantleenable" +"allowpowerslide" +"allowhighjumpdrop" +"despawnagent" +"vehicle_setfakespeed" +"vehicle_jetbikesetthrustscale" +"agentclearscriptvars" +"scriptmodelplayanimdeltamotionfrompos" +"drawfacingentity" +"allowdodge" +"setcanspawnvehicleson" +"vehicle_setminimapvisible" +"setclutforplayer" +"setclutoverrideenableforplayer" +"setclutoverridedisableforplayer" +"setpainvisioneq" +"setplayermech" +"setdamagecallbackon" +"finishentitydamage" +"getlightshadowstate" +"setlightshadowstate" +"forceviewmodelanimationclear" +"designatefoftarget" +"sethintstringvisibleonlytoowner" +"notifyonplayercommandremove" +"canmantleex" +"allowboostjump" +"batterydischargebegin" +"batterydischargeend" +"batterydischargeonce" +"batterygetcharge" +"batterysetcharge" +"batteryfullrecharge" +"batterygetsize" +"batterysetdischargescale" +"batterygetdischargerate" +"batteryisinuse" +"enablephysicaldepthoffieldscripting" +"disablephysicaldepthoffieldscripting" +"setphysicaldepthoffield" +"setadsphysicaldepthoffield" +"vehicle_gettopspeed" +"gettoparc" +"getbottomarc" +"forcejump" +"vehicle_helicoptersetmaxangularvelocity" +"vehicle_helicoptersetmaxangularacceleration" +"setdemigod" +"attachnobuilddobj" +"setviewmodelanim" +"setviewmodelanimtime" +"pauseviewmodelanim" +"setadditiveviewmodelanim" +"activityfeedwriteingamepost" +"setcostumemodels" +"vehicle_getcurrentnode" +"setphysicalviewmodeldepthoffield" +"scriptmodelpauseanim" +"digitaldistortsetmaterial" +"disableoffhandsecondaryweapons" +"enableoffhandsecondaryweapons" +"canplaceriotshield" +"setriotshieldfailhint" +"enabledetonate" +"getdetonateenabled" +"playergetuseent" +"refreshshieldmodels" +"vehicle_diveboatissubmerged" +"scragentusemodelcollisionbounds" +"scragentsetwallruncost" +"getgravity" +"setgravityoverride" +"resetgravityoverride" +"vehphys_getvelocity" +"vehphys_isoffground" +"getjointype" +"vehicle_diveboatdive" +"addsoundmutedevice" +"removesoundmutedevice" +"clientaddsoundsubmix" +"clientclearsoundsubmix" +"clientclearallsubmixes" +"clientblendsoundsubmix" +"clientmakesoundsubmixsticky" +"clientmakesoundsubmixunsticky" +"clientenablesoundcontextoverride" +"clientdisablesoundcontextoverride" +"getthreatsightdelay" +"isusingoffhand" +"physicsstop" +"setremotehelicopterthrottlescale" +"actorusemodelcollisionbounds" +"setaxialmove" +"pathabilityadd" +"pathabilityremove" +"evaluatetrajectorydelta" +"rotateovertime" +"vehicle_diveboatenabledive" +"initwaterclienttrigger" +"getplayerweaponviewmodel" +"setturretheatwhenoverheating" +"setthreatdetection" +"setignorefoliagesightingme" +"loadcostumemodels" +"crouchbuttonpressed" +"disablealternatemelee" +"enablealternatemelee" +"hasblendshapes" +"getactiveanimations" +"hidepartviewmodel" +"luiopenmenu" +"screenpostoworldpoint" +"iscloaked" +"vehicleget3pcameraoffset" +"vehicleget3ppitchclamp" +"setstompbreakthrough" +"getstompbreakthrough" +"selfieaccessselfievalidflaginplayerdef" +"selfieaccessselfiecustomassetsarestreamed" +"selfieupdateselfieviewparameters" +"selfieinitializeselfieupdate" +"selfiescreenshottaken" +"selfieuploadcompleted" +"selfierestorebufferswaps" +"getsystemtimesp" +"setmissilecoasting" +"setmlgspectator" +"gettotalmpxp" +"turretsetgroundaimentity" +"hideweapontags" +"getweapondamagelocationmultiplier" +"setorbiterents" +"enablereload" +"isgroundentoverwater" +"setballpassallowed" +"consumereinforcement" +"ghost" +"loadweapons" +"playscheduledcinematicsound" +"setopaqueunlitforplayer" +"setwaypointiconfadeatcenter" +"setreinforcementhintstrings" +"enablecustomweaponcontext" +"disablecustomweaponcontext" +"setshadowrendering" +"playlocalannouncersound" +"setmissilespecialclipmask" +"vehicle_diveboatgetthrottleforce" +"vehicle_diveboatgetdragforce" +"isdodging" +"ispowersliding" +"getusableentity" +"getcurrentping" +"sethidetrigger" +"detonatebydoubletap" +"getnormalizedflick" +"getdwid" +"setplayerinfospmatchdata" +"physicsisactive" +"hasanimtree" +"isgod" +"setagentcostumeindex" +"visionsetoverdriveforplayer" +"issplitscreenotherplayerenemy" +"setowneroriginal" +"getlinkedtagname" +"forcefirstpersonwhenfollowed" +"disableforcefirstpersonwhenfollowed" +"setwaypointaerialtargeting" +"worldweaponsloaded" +"enablegrenadethrowback" +"usetriggertouchcheckstance" +"onlystreamactiveweapon" +"precachekillcamiconforweapon" +"selfierequestupdate" +"getclanwarsbonus" +"scragentsetspecies" +"scragentallowboost" +"scragentsetnopenetrate" +"finishplayerdamage_impactfx" +"finishagentdamage_impactfx" +"scragentsetorienttoground" +"scragentsetallowragdoll" +"scragentsetobstacleavoid" +"scragentsetlateralcodemove" +"scragentsetpathteamspread" +"isnotarget" +"setmovingplatformjitter" +"agentusescragentclipmask" +"setmeleechargevalid" +"ishighjumpallowed" +"setprestigemastery" +"agentsetfavoriteenemy" +"getpointinmodelbounds" +"setexomeleechargevalid" +"setdivision" +"setgrapplinghooktarget" +"scragentgetnodesonpath" +"addzmexploderbloodfx" +"sethighjumpresetallowed" +"scragentsetzombietype" +"getgroundentity" +"isnoclip" +"deleteonhostmigration" +"scragentgetphysicsmode" +"deathdropgrenade" +"stopsound" +"scragentsettraversenoderadius" +"scragentgettraversenoderadius" +"allowriotshieldplant" +"setstatic" +"scragentsynchronizeanims" +"settertiaryhintstring" +"scragentclearpath" +"scragenttrimpath" +"getsnapshotindexforclient" +"getsnapshotacknowledgedindexforclient" +"hasanimstate" +"movecomparison_enable" +"movecomparison_setbuttonpressed" +"movecomparison_setstickvalue" +"cloneclientasscriptmodel" +"disablerootmotion" +"playerlinktodeltablendviewangle" +"startweaponinspection" +"isinspectingweapon" +"luinotifyevent" +"luinotifyeventtospectators" +"enablequatinterpolationrotation" +"doesnodeforceidle" +"setisignoringgrenades" +*/ + + +/* +{ 0x0000, "character/character_atlas_ar" }, +{ 0x0000, "character/character_atlas_arctic_ar" }, +{ 0x0000, "character/character_atlas_arctic_smg" }, +{ 0x0000, "character/character_atlas_bodyguard_smg" }, +{ 0x0000, "character/character_atlas_elete" }, +{ 0x0000, "character/character_atlas_mech_pilot" }, +{ 0x0000, "character/character_atlas_noexo" }, +{ 0x0000, "character/character_atlas_pmc_estate_smg" }, +{ 0x0000, "character/character_atlas_security_ar" }, +{ 0x0000, "character/character_atlas_smg" }, +{ 0x0000, "character/character_atlas_smg_lowlod" }, +{ 0x0000, "character/character_casual_irons" }, +{ 0x0000, "character/character_casual_irons_bet_holo" }, +{ 0x0000, "character/character_civ_afr_dark_female_casual" }, +{ 0x0000, "character/character_civ_afr_dark_female_dress" }, +{ 0x0000, "character/character_civ_afr_dark_male_casual" }, +{ 0x0000, "character/character_civ_afr_dark_male_dress" }, +{ 0x0000, "character/character_civ_afr_drk_female_cas" }, +{ 0x0000, "character/character_civ_afr_lgt_female_cas" }, +{ 0x0000, "character/character_civ_afr_light_fem_drs_sml" }, +{ 0x0000, "character/character_civ_afr_light_female_casual" }, +{ 0x0000, "character/character_civ_afr_light_female_dress" }, +{ 0x0000, "character/character_civ_afr_light_male_casual" }, +{ 0x0000, "character/character_civ_afr_light_male_dress" }, +{ 0x0000, "character/character_civ_afr_male_cas_grk" }, +{ 0x0000, "character/character_civ_afr_male_drs_grk" }, +{ 0x0000, "character/character_civ_african_male_b" }, +{ 0x0000, "character/character_civ_african_male_c" }, +{ 0x0000, "character/character_civ_african_male_d" }, +{ 0x0000, "character/character_civ_asi_male_casual" }, +{ 0x0000, "character/character_civ_asi_male_dress" }, +{ 0x0000, "character/character_civ_cau_fem_drs_sml" }, +{ 0x0000, "character/character_civ_cau_female_casual" }, +{ 0x0000, "character/character_civ_cau_female_dress" }, +{ 0x0000, "character/character_civ_cau_male_casual" }, +{ 0x0000, "character/character_civ_cau_male_casual_ball1" }, +{ 0x0000, "character/character_civ_cau_male_casual_ball2" }, +{ 0x0000, "character/character_civ_cau_male_casual_grk" }, +{ 0x0000, "character/character_civ_cau_male_dress" }, +{ 0x0000, "character/character_civ_cau_male_dress_grk" }, +{ 0x0000, "character/character_civ_mde_female_casual" }, +{ 0x0000, "character/character_civ_mde_female_dress" }, +{ 0x0000, "character/character_civ_mde_male_casual" }, +{ 0x0000, "character/character_civ_mde_male_dress" }, +{ 0x0000, "character/character_civ_pris_afr_dark_male_lite" }, +{ 0x0000, "character/character_civ_pris_cau_male_lite" }, +{ 0x0000, "character/character_civ_pris_mde_male_lite" }, +{ 0x0000, "character/character_civ_rec_funeral_female_a" }, +{ 0x0000, "character/character_civ_rec_funeral_female_b" }, +{ 0x0000, "character/character_civ_rec_funeral_female_c" }, +{ 0x0000, "character/character_civ_rec_funeral_female_d" }, +{ 0x0000, "character/character_civ_rec_funeral_female_wife" }, +{ 0x0000, "character/character_civ_rec_funeral_male" }, +{ 0x0000, "character/character_civ_rec_funeral_male_afr" }, +{ 0x0000, "character/character_civ_rec_funeral_male_afr_a" }, +{ 0x0000, "character/character_civ_rec_funeral_male_afr_b" }, +{ 0x0000, "character/character_civ_rec_funeral_male_afr_c" }, +{ 0x0000, "character/character_civ_rec_funeral_male_afr_d" }, +{ 0x0000, "character/character_civ_rec_funeral_male_asi_a" }, +{ 0x0000, "character/character_civ_rec_funeral_male_cau_a" }, +{ 0x0000, "character/character_civ_rec_funeral_male_cau_b" }, +{ 0x0000, "character/character_civ_rec_funeral_male_cau_c" }, +{ 0x0000, "character/character_civ_rec_funeral_male_cau_d" }, +{ 0x0000, "character/character_civ_rec_funeral_male_cau_e" }, +{ 0x0000, "character/character_civ_rec_funeral_male_cau_f" }, +{ 0x0000, "character/character_civ_s1_female_a" }, +{ 0x0000, "character/character_civ_s1_female_b" }, +{ 0x0000, "character/character_civ_s1_female_c" }, +{ 0x0000, "character/character_civ_s1_female_d" }, +{ 0x0000, "character/character_civ_s1_female_dead_a" }, +{ 0x0000, "character/character_civ_s1_female_dead_b" }, +{ 0x0000, "character/character_civ_s1_female_e" }, +{ 0x0000, "character/character_civ_s1_female_f" }, +{ 0x0000, "character/character_civ_s1_female_g" }, +{ 0x0000, "character/character_civ_s1_male_a" }, +{ 0x0000, "character/character_civ_s1_male_b" }, +{ 0x0000, "character/character_civ_s1_male_c" }, +{ 0x0000, "character/character_civ_s1_male_d" }, +{ 0x0000, "character/character_civ_s1_male_dead_a" }, +{ 0x0000, "character/character_civ_s1_male_dead_b" }, +{ 0x0000, "character/character_civ_s1_male_dead_c" }, +{ 0x0000, "character/character_civ_s1_male_e" }, +{ 0x0000, "character/character_civ_s1_male_hostage_lag" }, +{ 0x0000, "character/character_civ_s1_worker_a" }, +{ 0x0000, "character/character_civ_s1_worker_b" }, +{ 0x0000, "character/character_civ_s1_worker_hardhat" }, +{ 0x0000, "character/character_civ_scientist_s1_a" }, +{ 0x0000, "character/character_civ_scientist_s1_b" }, +{ 0x0000, "character/character_civ_scientist_s1_c" }, +{ 0x0000, "character/character_civ_scientist_s1_d" }, +{ 0x0000, "character/character_civ_scientist_s1_e" }, +{ 0x0000, "character/character_civ_scientist_s1_f" }, +{ 0x0000, "character/character_civ_seoul_female" }, +{ 0x0000, "character/character_civ_seoul_male_a" }, +{ 0x0000, "character/character_civ_seoul_male_b" }, +{ 0x0000, "character/character_civ_seoul_male_d" }, +{ 0x0000, "character/character_civ_seoul_male_e" }, +{ 0x0000, "character/character_civ_seoul_male_f" }, +{ 0x0000, "character/character_civ_seoul_male_principle" }, +{ 0x0000, "character/character_civilian_africa_male_a" }, +{ 0x0000, "character/character_civilian_africa_male_b" }, +{ 0x0000, "character/character_civilian_africa_male_c" }, +{ 0x0000, "character/character_civilian_india_female_a" }, +{ 0x0000, "character/character_civilian_india_female_b" }, +{ 0x0000, "character/character_civilian_india_male_a" }, +{ 0x0000, "character/character_civilian_india_male_b" }, +{ 0x0000, "character/character_civilian_india_male_c" }, +{ 0x0000, "character/character_civilian_india_male_d" }, +{ 0x0000, "character/character_civilian_prisoner_female_a" }, +{ 0x0000, "character/character_civilian_prisoner_female_b" }, +{ 0x0000, "character/character_civilian_slum_male_aa" }, +{ 0x0000, "character/character_civilian_slum_male_aa_wht" }, +{ 0x0000, "character/character_civilian_slum_male_ab" }, +{ 0x0000, "character/character_civilian_slum_male_ab_wht" }, +{ 0x0000, "character/character_civilian_slum_male_ba" }, +{ 0x0000, "character/character_civilian_slum_male_ba_wht" }, +{ 0x0000, "character/character_civilian_slum_male_bb" }, +{ 0x0000, "character/character_civilian_slum_male_bb_wht" }, +{ 0x0000, "character/character_civilian_worker_a" }, +{ 0x0000, "character/character_civilian_worker_b" }, +{ 0x0000, "character/character_civilian_worker_c" }, +{ 0x0000, "character/character_coop_cloaked_static" }, +{ 0x0000, "character/character_doctor" }, +{ 0x0000, "character/character_doctor_cpt" }, +{ 0x0000, "character/character_doctor_mwi" }, +{ 0x0000, "character/character_doctor_mwi_holo" }, +{ 0x0000, "character/character_doctor_pas" }, +{ 0x0000, "character/character_dprk_ar" }, +{ 0x0000, "character/character_dprk_shotgun" }, +{ 0x0000, "character/character_dprk_smg" }, +{ 0x0000, "character/character_hero_burke_b_atlas" }, +{ 0x0000, "character/character_hero_burke_b_pmc" }, +{ 0x0000, "character/character_hero_burke_sentinel" }, +{ 0x0000, "character/character_hero_burke_sentinel_cloak" }, +{ 0x0000, "character/character_hero_carter_pmc" }, +{ 0x0000, "character/character_hero_cormack_captured" }, +{ 0x0000, "character/character_hero_cormack_cloak" }, +{ 0x0000, "character/character_hero_cormack_marine" }, +{ 0x0000, "character/character_hero_cormack_marine_damaged" }, +{ 0x0000, "character/character_hero_cormack_marine_dress" }, +{ 0x0000, "character/character_hero_cormack_marine_seointro" }, +{ 0x0000, "character/character_hero_cormack_sentinel" }, +{ 0x0000, "character/character_hero_cormack_sentinel_arctic" }, +{ 0x0000, "character/character_hero_cormack_sentinel_udt_b" }, +{ 0x0000, "character/character_hero_cormack_sentinel_udtgr" }, +{ 0x0000, "character/character_hero_gideon_atlas" }, +{ 0x0000, "character/character_hero_gideon_atlas_arctic" }, +{ 0x0000, "character/character_hero_gideon_atlas_pmc" }, +{ 0x0000, "character/character_hero_gideon_atlas_pmc_mask" }, +{ 0x0000, "character/character_hero_gideon_captured" }, +{ 0x0000, "character/character_hero_gideon_pmc" }, +{ 0x0000, "character/character_hero_gideon_sentinel_cloak" }, +{ 0x0000, "character/character_hero_gideon_sentinel_finale" }, +{ 0x0000, "character/character_hero_gideon_sentinel_jetpack" }, +{ 0x0000, "character/character_hero_gideon_sentinel_pilot" }, +{ 0x0000, "character/character_hero_ilana_atlas_pmc" }, +{ 0x0000, "character/character_hero_ilana_captured" }, +{ 0x0000, "character/character_hero_ilana_sentinel_arctic" }, +{ 0x0000, "character/character_hero_ilana_sentinel_pilot" }, +{ 0x0000, "character/character_hero_ilana_sentinel_udt_b" }, +{ 0x0000, "character/character_hero_ilana_sentinel_udtgr" }, +{ 0x0000, "character/character_hero_ilana_tourist" }, +{ 0x0000, "character/character_hero_irons" }, +{ 0x0000, "character/character_hero_joker_atlas" }, +{ 0x0000, "character/character_hero_joker_atlas_pmc" }, +{ 0x0000, "character/character_hero_knox_sentinel" }, +{ 0x0000, "character/character_hero_knox_sentinel_cloak" }, +{ 0x0000, "character/character_hero_knox_sentinel_det_cloak" }, +{ 0x0000, "character/character_hero_knox_sentinel_jetpack" }, +{ 0x0000, "character/character_hero_knox_sentinel_pilot" }, +{ 0x0000, "character/character_hero_knox_sentinel_udt" }, +{ 0x0000, "character/character_hero_knox_sentinel_udtgr" }, +{ 0x0000, "character/character_hero_parker_atlas" }, +{ 0x0000, "character/character_hero_will_marine" }, +{ 0x0000, "character/character_hero_will_marine_seointro" }, +{ 0x0000, "character/character_ie_doctor" }, +{ 0x0000, "character/character_kva_ar" }, +{ 0x0000, "character/character_kva_civ_a" }, +{ 0x0000, "character/character_kva_civ_b" }, +{ 0x0000, "character/character_kva_civ_c" }, +{ 0x0000, "character/character_kva_hazmat" }, +{ 0x0000, "character/character_kva_hazmat_nohat" }, +{ 0x0000, "character/character_kva_leader_hades" }, +{ 0x0000, "character/character_kva_lmg" }, +{ 0x0000, "character/character_kva_shotgun" }, +{ 0x0000, "character/character_kva_smg" }, +{ 0x0000, "character/character_mech" }, +{ 0x0000, "character/character_mech_long_lod" }, +{ 0x0000, "character/character_mech_long_lod_baghdad" }, +{ 0x0000, "character/character_mech_scaled" }, +{ 0x0000, "character/character_navy_sf_assault_a" }, +{ 0x0000, "character/character_navy_sf_assault_b" }, +{ 0x0000, "character/character_navy_sf_assault_c" }, +{ 0x0000, "character/character_nigerian_army" }, +{ 0x0000, "character/character_nigerian_general" }, +{ 0x0000, "character/character_nigerian_prime_minister" }, +{ 0x0000, "character/character_pmc_ar" }, +{ 0x0000, "character/character_pmc_ar_lowlod" }, +{ 0x0000, "character/character_pmc_cap_ar" }, +{ 0x0000, "character/character_pmc_noexo" }, +{ 0x0000, "character/character_pmc_noexo_rec_driver" }, +{ 0x0000, "character/character_pmc_smg" }, +{ 0x0000, "character/character_pmc_smg_asi" }, +{ 0x0000, "character/character_potus" }, +{ 0x0000, "character/character_sentinel" }, +{ 0x0000, "character/character_sentinel_arctic_ar" }, +{ 0x0000, "character/character_sentinel_cloak" }, +{ 0x0000, "character/character_sentinel_ie" }, +{ 0x0000, "character/character_sentinel_ie_land" }, +{ 0x0000, "character/character_sentinel_soldier_cloaked" }, +{ 0x0000, "character/character_sf_police_a" }, +{ 0x0000, "character/character_sf_police_b" }, +{ 0x0000, "character/character_sf_police_c" }, +{ 0x0000, "character/character_sp_doberman_dog" }, +{ 0x0000, "character/character_sp_usmc_at4" }, +{ 0x0000, "character/character_sp_usmc_james" }, +{ 0x0000, "character/character_sp_usmc_ryan" }, +{ 0x0000, "character/character_sp_usmc_sami" }, +{ 0x0000, "character/character_sp_usmc_sami_goggles" }, +{ 0x0000, "character/character_sp_usmc_zach" }, +{ 0x0000, "character/character_sp_usmc_zach_goggles" }, +{ 0x0000, "character/character_us_marine_ar" }, +{ 0x0000, "character/character_us_marine_ar_lowlod" }, +{ 0x0000, "character/character_us_marine_dress" }, +{ 0x0000, "character/character_us_marine_dress_a" }, +{ 0x0000, "character/character_us_marine_dress_b" }, +{ 0x0000, "character/character_us_marine_dress_c" }, +{ 0x0000, "character/character_us_marine_dress_d" }, +{ 0x0000, "character/character_us_marine_dress_e" }, +{ 0x0000, "character/character_us_marine_dress_f" }, +{ 0x0000, "character/character_us_marine_dress_lowlod" }, +{ 0x0000, "character/character_us_marine_seofob_ar" }, +{ 0x0000, "character/character_us_marine_shotgun_lowlod" }, +{ 0x0000, "character/character_us_marine_smg" }, +{ 0x0000, "character/character_us_marine_smg_lowlod" }, +{ 0x0000, "character/character_us_marine_smg_seo" }, +{ 0x0000, "character/character_us_marine_smg_seointro" }, +{ 0x0000, "character/mp_character_cloak_test" }, +{ 0x0000, "character/mp_character_sentinel" }, + +{ 0xA4EF, "codescripts/character" }, +{ 0xA4F0, "common_scripts/_artcommon" }, +{ 0xA4F1, "common_scripts/_bcs_location_trigs" }, +{ 0xA4F2, "common_scripts/_createfx" }, +{ 0xA4F3, "common_scripts/_createfxmenu" }, +{ 0xA4F4, "common_scripts/_destructible" }, +{ 0xA4F5, "common_scripts/_dynamic_world" }, +{ 0xA4F6, "common_scripts/_elevator" }, +{ 0xA4F7, "common_scripts/_exploder" }, +{ 0xA4F8, "common_scripts/_fx" }, +{ 0xA4F9, "common_scripts/_pipes" }, +{ 0xA4FA, "common_scripts/utility" }, + +{ 0x0000, "destructible_scripts/computer_01_destp" }, +{ 0x0000, "destructible_scripts/container_plastic_72x56x48_01_destp" }, +{ 0x0000, "destructible_scripts/container_plastic_beige_med_01_destp" }, +{ 0x0000, "destructible_scripts/greece_spinning_displays" }, +{ 0x0000, "destructible_scripts/powerbox_112x64_01_green_destp" }, +{ 0x0000, "destructible_scripts/security_camera_scanner_destp" }, +{ 0x0000, "destructible_scripts/toy_chicken" }, +{ 0x0000, "destructible_scripts/toy_chicken_common" }, +{ 0x0000, "destructible_scripts/toy_electricbox4" }, +{ 0x0000, "destructible_scripts/toy_generator" }, +{ 0x0000, "destructible_scripts/toy_generator_on" }, +{ 0x0000, "destructible_scripts/toy_locker_double" }, +{ 0x0000, "destructible_scripts/vehicle_civ_domestic_sedan_01_glass" }, +{ 0x0000, "destructible_scripts/vehicle_civ_domestic_sedan_police_destpv" }, +{ 0x0000, "destructible_scripts/vehicle_civ_domestic_sedan_taxi_glass" }, +{ 0x0000, "destructible_scripts/vehicle_civ_smartcar_destpv" }, +{ 0x0000, "destructible_scripts/vehicle_luxurysedan" }, +{ 0x0000, "destructible_scripts/vehicle_luxurysedan_2008" }, +{ 0x0000, "destructible_scripts/vehicle_pickup" }, +{ 0x0000, "destructible_scripts/vehicle_suv_atlas_destpv" }, +{ 0x0000, "destructible_scripts/wall_firebox_destp" }, +{ 0x0000, "maps/_anim" }, +{ 0x0000, "maps/_animatedmodels" }, +{ 0x0000, "maps/_ar_view" }, +{ 0x0000, "maps/_art" }, +{ 0x0000, "maps/_autosave" }, +{ 0x0000, "maps/_bobbing_boats" }, +{ 0x0000, "maps/_breach" }, +{ 0x0000, "maps/_car_door_shield" }, +{ 0x0000, "maps/_cg_encounter_perf_monitor" }, +{ 0x0000, "maps/_chargeable_weapon" }, +{ 0x0000, "maps/_cloak" }, +{ 0x0000, "maps/_cloak_enemy_behavior" }, +{ 0x0000, "maps/_colors" }, +{ 0x0000, "maps/_compass" }, +{ 0x0000, "maps/_controlled_orbiting_drone" }, +{ 0x0000, "maps/_controlled_sniperdrone" }, +{ 0x0000, "maps/_coop" }, +{ 0x0000, "maps/_createfx" }, +{ 0x0000, "maps/_credits" }, +{ 0x0000, "maps/_credits_autogen" }, +{ 0x0000, "maps/_damagefeedback" }, +{ 0x0000, "maps/_dds" }, +{ 0x0000, "maps/_debug" }, +{ 0x0000, "maps/_deployablecoverai" }, +{ 0x0000, "maps/_detonategrenades" }, +{ 0x0000, "maps/_dog_control" }, +{ 0x0000, "maps/_dog_kinect" }, +{ 0x0000, "maps/_drone" }, +{ 0x0000, "maps/_drone_ai" }, +{ 0x0000, "maps/_drone_base" }, +{ 0x0000, "maps/_drone_civilian" }, +{ 0x0000, "maps/_dshk_player" }, +{ 0x0000, "maps/_endmission" }, +{ 0x0000, "maps/_exo_climb" }, +{ 0x0000, "maps/_exo_punch_door" }, +{ 0x0000, "maps/_exo_shield_sp" }, +{ 0x0000, "maps/_flashlight_cheap" }, +{ 0x0000, "maps/_foam_bomb" }, +{ 0x0000, "maps/_friendlyfire" }, +{ 0x0000, "maps/_gameskill" }, +{ 0x0000, "maps/_global_fx" }, +{ 0x0000, "maps/_global_fx_code" }, +{ 0x0000, "maps/_grapple" }, +{ 0x0000, "maps/_grapple_anim" }, +{ 0x0000, "maps/_grapple_traverse" }, +{ 0x0000, "maps/_hand_signals" }, +{ 0x0000, "maps/_helicopter_ai" }, +{ 0x0000, "maps/_helicopter_globals" }, +{ 0x0000, "maps/_high_speed_clouds" }, +{ 0x0000, "maps/_hms_ai_utility" }, +{ 0x0000, "maps/_hms_door_interact" }, +{ 0x0000, "maps/_hms_greece_civilian" }, +{ 0x0000, "maps/_hms_utility" }, +{ 0x0000, "maps/_hud" }, +{ 0x0000, "maps/_hud_util" }, +{ 0x0000, "maps/_idle" }, +{ 0x0000, "maps/_idle_phone" }, +{ 0x0000, "maps/_idle_smoke" }, +{ 0x0000, "maps/_intelligence" }, +{ 0x0000, "maps/_introscreen" }, +{ 0x0000, "maps/_inventory" }, +{ 0x0000, "maps/_juggernaut" }, +{ 0x0000, "maps/_lighting" }, +{ 0x0000, "maps/_lights" }, +{ 0x0000, "maps/_load" }, +{ 0x0000, "maps/_loadout" }, +{ 0x0000, "maps/_loadout_code" }, +{ 0x0000, "maps/_mark_and_execute" }, +{ 0x0000, "maps/_mech" }, +{ 0x0000, "maps/_mech_aud" }, +{ 0x0000, "maps/_mech_grapple" }, +{ 0x0000, "maps/_mg_penetration" }, +{ 0x0000, "maps/_mgturret" }, +{ 0x0000, "maps/_mgturret_auto_nonai" }, +{ 0x0000, "maps/_microdronelauncher" }, +{ 0x0000, "maps/_microwave_grenade" }, +{ 0x0000, "maps/_mocap_ar" }, +{ 0x0000, "maps/_names" }, +{ 0x0000, "maps/_nightvision" }, +{ 0x0000, "maps/_patrol" }, +{ 0x0000, "maps/_patrol_anims" }, +{ 0x0000, "maps/_patrol_anims_active" }, +{ 0x0000, "maps/_patrol_anims_casualkiller" }, +{ 0x0000, "maps/_patrol_anims_creepwalk" }, +{ 0x0000, "maps/_patrol_anims_patroljog" }, +{ 0x0000, "maps/_patrol_cold_anims" }, +{ 0x0000, "maps/_patrol_extended" }, +{ 0x0000, "maps/_player_boost_dash" }, +{ 0x0000, "maps/_player_boost_jump_anims" }, +{ 0x0000, "maps/_player_boost_jump_aud" }, +{ 0x0000, "maps/_player_death" }, +{ 0x0000, "maps/_player_exo" }, +{ 0x0000, "maps/_player_fastzip" }, +{ 0x0000, "maps/_player_high_jump" }, +{ 0x0000, "maps/_player_land_assist" }, +{ 0x0000, "maps/_player_stats" }, +{ 0x0000, "maps/_playermech_code" }, +{ 0x0000, "maps/_pmove" }, +{ 0x0000, "maps/_president" }, +{ 0x0000, "maps/_props" }, +{ 0x0000, "maps/_rambo" }, +{ 0x0000, "maps/_riotshield" }, +{ 0x0000, "maps/_sarray" }, +{ 0x0000, "maps/_shg_anim" }, +{ 0x0000, "maps/_shg_debug" }, +{ 0x0000, "maps/_shg_design_tools" }, +{ 0x0000, "maps/_shg_fx" }, +{ 0x0000, "maps/_shg_utility" }, +{ 0x0000, "maps/_slowmo_breach" }, +{ 0x0000, "maps/_sniper_glint" }, +{ 0x0000, "maps/_sniper_setup_ai" }, +{ 0x0000, "maps/_sonicaoe" }, +{ 0x0000, "maps/_sp_matchdata" }, +{ 0x0000, "maps/_spawner" }, +{ 0x0000, "maps/_stealth" }, +{ 0x0000, "maps/_stealth_accuracy_friendly" }, +{ 0x0000, "maps/_stealth_animation_funcs" }, +{ 0x0000, "maps/_stealth_anims" }, +{ 0x0000, "maps/_stealth_behavior_enemy" }, +{ 0x0000, "maps/_stealth_behavior_friendly" }, +{ 0x0000, "maps/_stealth_behavior_system" }, +{ 0x0000, "maps/_stealth_color_friendly" }, +{ 0x0000, "maps/_stealth_corpse_enemy" }, +{ 0x0000, "maps/_stealth_corpse_system" }, +{ 0x0000, "maps/_stealth_debug" }, +{ 0x0000, "maps/_stealth_display" }, +{ 0x0000, "maps/_stealth_event_enemy" }, +{ 0x0000, "maps/_stealth_shared_utilities" }, +{ 0x0000, "maps/_stealth_smartstance_friendly" }, +{ 0x0000, "maps/_stealth_threat_enemy" }, +{ 0x0000, "maps/_stealth_utility" }, +{ 0x0000, "maps/_stealth_visibility_enemy" }, +{ 0x0000, "maps/_stealth_visibility_friendly" }, +{ 0x0000, "maps/_stealth_visibility_system" }, +{ 0x0000, "maps/_stingerm7" }, +{ 0x0000, "maps/_stingerm7_greece" }, +{ 0x0000, "maps/_swim_ai" }, +{ 0x0000, "maps/_swim_ai_common" }, +{ 0x0000, "maps/_swim_player" }, +{ 0x0000, "maps/_tagging" }, +{ 0x0000, "maps/_target_lock" }, +{ 0x0000, "maps/_treadfx" }, +{ 0x0000, "maps/_trigger" }, +{ 0x0000, "maps/_underwater" }, +{ 0x0000, "maps/_upgrade_challenge" }, +{ 0x0000, "maps/_upgrade_perks" }, +{ 0x0000, "maps/_upgrade_system" }, +{ 0x0000, "maps/_urgent_walk" }, +{ 0x0000, "maps/_utility" }, +{ 0x0000, "maps/_utility_code" }, +{ 0x0000, "maps/_utility_dogs" }, +{ 0x0000, "maps/_variable_grenade" }, +{ 0x0000, "maps/_vehicle" }, +{ 0x0000, "maps/_vehicle_aianim" }, +{ 0x0000, "maps/_vehicle_code" }, +{ 0x0000, "maps/_vehicle_free_drive" }, +{ 0x0000, "maps/_vehicle_missile" }, +{ 0x0000, "maps/_vehicle_shg" }, +{ 0x0000, "maps/_vehicle_traffic" }, +{ 0x0000, "maps/_vignette_util" }, +{ 0x0000, "maps/_warzone_tactics" }, +{ 0x0000, "maps/_water" }, +{ 0x0000, "maps/_weapon_pdrone" }, +{ 0x0000, "maps/_weather" }, +{ 0x0000, "maps/betrayal_fx" }, +{ 0x0000, "maps/betrayal_precache" }, +{ 0x0000, "maps/captured_fx" }, +{ 0x0000, "maps/captured_precache" }, +{ 0x0000, "maps/crash_fx" }, +{ 0x0000, "maps/crash_precache" }, +{ 0x0000, "maps/credits_s1_fx" }, +{ 0x0000, "maps/credits_s1_precache" }, +{ 0x0000, "maps/detroit_fx" }, +{ 0x0000, "maps/detroit_precache" }, +{ 0x0000, "maps/df_baghdad_fx" }, +{ 0x0000, "maps/df_baghdad_precache" }, +{ 0x0000, "maps/df_fly_fx" }, +{ 0x0000, "maps/df_fly_precache" }, +{ 0x0000, "maps/finale_fx" }, +{ 0x0000, "maps/finale_precache" }, +{ 0x0000, "maps/fusion_fx" }, +{ 0x0000, "maps/fusion_precache" }, +{ 0x0000, "maps/greece_conf_center_fx" }, +{ 0x0000, "maps/greece_ending_fx" }, +{ 0x0000, "maps/greece_fx" }, +{ 0x0000, "maps/greece_precache" }, +{ 0x0000, "maps/greece_safehouse_fx" }, +{ 0x0000, "maps/greece_sniper_scramble_fx" }, +{ 0x0000, "maps/irons_estate_fx" }, +{ 0x0000, "maps/irons_estate_precache" }, +{ 0x0000, "maps/lab_fx" }, +{ 0x0000, "maps/lab_precache" }, +{ 0x0000, "maps/lagos_fx" }, +{ 0x0000, "maps/lagos_precache" }, +{ 0x0000, "maps/recovery_fx" }, +{ 0x0000, "maps/recovery_precache" }, +{ 0x0000, "maps/sanfran_b_fx" }, +{ 0x0000, "maps/sanfran_b_precache" }, +{ 0x0000, "maps/sanfran_fx" }, +{ 0x0000, "maps/sanfran_precache" }, +{ 0x0000, "maps/seoul_fx" }, +{ 0x0000, "maps/seoul_precache" }, +{ 0x0000, "mptype/mptype_cloak_test" }, +{ 0x0000, "soundscripts/_ambient" }, +{ 0x0000, "soundscripts/_audio" }, +{ 0x0000, "soundscripts/_audio_dynamic_ambi" }, +{ 0x0000, "soundscripts/_audio_mix_manager" }, +{ 0x0000, "soundscripts/_audio_music" }, +{ 0x0000, "soundscripts/_audio_presets_music" }, +{ 0x0000, "soundscripts/_audio_presets_vehicles" }, +{ 0x0000, "soundscripts/_audio_reverb" }, +{ 0x0000, "soundscripts/_audio_stream_manager" }, +{ 0x0000, "soundscripts/_audio_vehicle_manager" }, +{ 0x0000, "soundscripts/_audio_vehicles" }, +{ 0x0000, "soundscripts/_audio_whizby" }, +{ 0x0000, "soundscripts/_audio_zone_manager" }, +{ 0x0000, "soundscripts/_snd" }, +{ 0x0000, "soundscripts/_snd_common" }, +{ 0x0000, "soundscripts/_snd_debug_bayless" }, +{ 0x0000, "soundscripts/_snd_debug_bina" }, +{ 0x0000, "soundscripts/_snd_debug_blondin" }, +{ 0x0000, "soundscripts/_snd_debug_caisley" }, +{ 0x0000, "soundscripts/_snd_debug_gavazza" }, +{ 0x0000, "soundscripts/_snd_debug_kilborn" }, +{ 0x0000, "soundscripts/_snd_debug_loperfido" }, +{ 0x0000, "soundscripts/_snd_debug_mcsweeney" }, +{ 0x0000, "soundscripts/_snd_debug_mika" }, +{ 0x0000, "soundscripts/_snd_debug_naas" }, +{ 0x0000, "soundscripts/_snd_debug_nuniyants" }, +{ 0x0000, "soundscripts/_snd_debug_swenson" }, +{ 0x0000, "soundscripts/_snd_debug_veca" }, +{ 0x0000, "soundscripts/_snd_filters" }, +{ 0x0000, "soundscripts/_snd_foley" }, +{ 0x0000, "soundscripts/_snd_hud" }, +{ 0x0000, "soundscripts/_snd_pcap" }, +{ 0x0000, "soundscripts/_snd_playsound" }, +{ 0x0000, "soundscripts/_snd_timescale" }, +{ 0x0000, "soundscripts/so_aud" }, +{ 0x0000, "vehicle_scripts/_atlas_jet" }, +{ 0x0000, "vehicle_scripts/_atlas_piranha" }, +{ 0x0000, "vehicle_scripts/_atlas_suv" }, +{ 0x0000, "vehicle_scripts/_atlas_van" }, +{ 0x0000, "vehicle_scripts/_attack_drone" }, +{ 0x0000, "vehicle_scripts/_attack_drone_aud" }, +{ 0x0000, "vehicle_scripts/_attack_drone_common" }, +{ 0x0000, "vehicle_scripts/_attack_drone_controllable" }, +{ 0x0000, "vehicle_scripts/_attack_drone_individual" }, +{ 0x0000, "vehicle_scripts/_attack_drone_kamikaze" }, +{ 0x0000, "vehicle_scripts/_attack_drone_queen" }, +{ 0x0000, "vehicle_scripts/_attack_heli" }, +{ 0x0000, "vehicle_scripts/_chinese_brave_warrior" }, +{ 0x0000, "vehicle_scripts/_civ_boat" }, +{ 0x0000, "vehicle_scripts/_civ_boxtruck_ai" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_bus" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_economy_ai" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_minivan" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_sedan_01" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_sedan_police" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_sedan_taxi_01" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_sportscar_01" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_suv" }, +{ 0x0000, "vehicle_scripts/_civ_domestic_truck" }, +{ 0x0000, "vehicle_scripts/_civ_full_size_pickup_01_ai" }, +{ 0x0000, "vehicle_scripts/_civ_full_size_technical" }, +{ 0x0000, "vehicle_scripts/_civ_pickup_truck_01" }, +{ 0x0000, "vehicle_scripts/_civ_smartcar" }, +{ 0x0000, "vehicle_scripts/_civ_workvan" }, +{ 0x0000, "vehicle_scripts/_cover_drone" }, +{ 0x0000, "vehicle_scripts/_cover_drone_aud" }, +{ 0x0000, "vehicle_scripts/_diveboat" }, +{ 0x0000, "vehicle_scripts/_diveboat_aud" }, +{ 0x0000, "vehicle_scripts/_empty" }, +{ 0x0000, "vehicle_scripts/_ft101_tank" }, +{ 0x0000, "vehicle_scripts/_gaz" }, +{ 0x0000, "vehicle_scripts/_gaz_dshk" }, +{ 0x0000, "vehicle_scripts/_gaz_dshk_aud" }, +{ 0x0000, "vehicle_scripts/_generic_script_model_lagos" }, +{ 0x0000, "vehicle_scripts/_havoc_missile_scripted" }, +{ 0x0000, "vehicle_scripts/_hovertank" }, +{ 0x0000, "vehicle_scripts/_hovertank_aud" }, +{ 0x0000, "vehicle_scripts/_ind_semi_truck_fuel_tanker" }, +{ 0x0000, "vehicle_scripts/_jetbike" }, +{ 0x0000, "vehicle_scripts/_jetbike_aud" }, +{ 0x0000, "vehicle_scripts/_littlebird" }, +{ 0x0000, "vehicle_scripts/_littlebird_aud" }, +{ 0x0000, "vehicle_scripts/_littlebird_landing" }, +{ 0x0000, "vehicle_scripts/_littlebird_player" }, +{ 0x0000, "vehicle_scripts/_mi17" }, +{ 0x0000, "vehicle_scripts/_mi17_aud" }, +{ 0x0000, "vehicle_scripts/_mi17_noai" }, +{ 0x0000, "vehicle_scripts/_mig29" }, +{ 0x0000, "vehicle_scripts/_mig29_controllable" }, +{ 0x0000, "vehicle_scripts/_mil_cargo_truck" }, +{ 0x0000, "vehicle_scripts/_pdrone" }, +{ 0x0000, "vehicle_scripts/_pdrone_aud" }, +{ 0x0000, "vehicle_scripts/_pdrone_player" }, +{ 0x0000, "vehicle_scripts/_pdrone_player_aud" }, +{ 0x0000, "vehicle_scripts/_pdrone_security" }, +{ 0x0000, "vehicle_scripts/_pdrone_security_aud" }, +{ 0x0000, "vehicle_scripts/_pdrone_tactical_picker" }, +{ 0x0000, "vehicle_scripts/_pdrone_threat_sensor" }, +{ 0x0000, "vehicle_scripts/_pitbull" }, +{ 0x0000, "vehicle_scripts/_pitbull_aud" }, +{ 0x0000, "vehicle_scripts/_razorback" }, +{ 0x0000, "vehicle_scripts/_razorback_fx" }, +{ 0x0000, "vehicle_scripts/_s19" }, +{ 0x0000, "vehicle_scripts/_sentinel_survey_drone_hud" }, +{ 0x0000, "vehicle_scripts/_shrike" }, +{ 0x0000, "vehicle_scripts/_sidewinder_scripted" }, +{ 0x0000, "vehicle_scripts/_slamraam" }, +{ 0x0000, "vehicle_scripts/_sniper_drone" }, +{ 0x0000, "vehicle_scripts/_sniper_drone_aud" }, +{ 0x0000, "vehicle_scripts/_uk_delivery_truck" }, +{ 0x0000, "vehicle_scripts/_vehicle_missile_launcher_ai" }, +{ 0x0000, "vehicle_scripts/_vehicle_multiweapon_util" }, +{ 0x0000, "vehicle_scripts/_vehicle_turret_ai" }, +{ 0x0000, "vehicle_scripts/_vrap" }, +{ 0x0000, "vehicle_scripts/_walker_tank" }, +{ 0x0000, "vehicle_scripts/_x4walker_wheels" }, +{ 0x0000, "vehicle_scripts/_x4walker_wheels_aud" }, +{ 0x0000, "vehicle_scripts/_x4walker_wheels_turret" }, +{ 0x0000, "vehicle_scripts/_x4walker_wheels_turret_aud" }, +{ 0x0000, "vehicle_scripts/_x4walker_wheels_turret_closed" }, +{ 0x0000, "vehicle_scripts/_x4walker_wheels_turret_closed_aud" }, +{ 0x0000, "vehicle_scripts/_xh9_warbird" }, +{ 0x0000, "xmodelalias/alias_africa_civilian_male_heads" }, +{ 0x0000, "xmodelalias/alias_atlas_bodyguard_heads" }, +{ 0x0000, "xmodelalias/alias_civ_afr_dark_male_bodies_casual" }, +{ 0x0000, "xmodelalias/alias_civ_afr_dark_male_bodies_dress" }, +{ 0x0000, "xmodelalias/alias_civ_afr_dark_male_heads" }, +{ 0x0000, "xmodelalias/alias_civ_afr_drk_female_bodies_cas" }, +{ 0x0000, "xmodelalias/alias_civ_afr_drk_female_bodies_drs" }, +{ 0x0000, "xmodelalias/alias_civ_afr_drk_female_heads" }, +{ 0x0000, "xmodelalias/alias_civ_afr_lgt_fem_bod_drs_sml" }, +{ 0x0000, "xmodelalias/alias_civ_afr_lgt_female_bodies_cas" }, +{ 0x0000, "xmodelalias/alias_civ_afr_lgt_female_bodies_drs" }, +{ 0x0000, "xmodelalias/alias_civ_afr_lgt_female_heads" }, +{ 0x0000, "xmodelalias/alias_civ_afr_light_male_bodies_casual" }, +{ 0x0000, "xmodelalias/alias_civ_afr_light_male_bodies_dress" }, +{ 0x0000, "xmodelalias/alias_civ_afr_light_male_heads" }, +{ 0x0000, "xmodelalias/alias_civ_asi_male_bodies_casual" }, +{ 0x0000, "xmodelalias/alias_civ_asi_male_bodies_dress" }, +{ 0x0000, "xmodelalias/alias_civ_asi_male_heads" }, +{ 0x0000, "xmodelalias/alias_civ_asi_male_heads_cpt" }, +{ 0x0000, "xmodelalias/alias_civ_cau_fem_bod_drs_sml" }, +{ 0x0000, "xmodelalias/alias_civ_cau_fem_heads_sml" }, +{ 0x0000, "xmodelalias/alias_civ_cau_female_bodies_cas" }, +{ 0x0000, "xmodelalias/alias_civ_cau_female_bodies_drs" }, +{ 0x0000, "xmodelalias/alias_civ_cau_female_heads" }, +{ 0x0000, "xmodelalias/alias_civ_cau_male_bodies_casual" }, +{ 0x0000, "xmodelalias/alias_civ_cau_male_bodies_dress" }, +{ 0x0000, "xmodelalias/alias_civ_cau_male_heads" }, +{ 0x0000, "xmodelalias/alias_civ_cau_male_heads_hazmat_nohat" }, +{ 0x0000, "xmodelalias/alias_civ_mde_female_bodies_cas" }, +{ 0x0000, "xmodelalias/alias_civ_mde_female_bodies_drs" }, +{ 0x0000, "xmodelalias/alias_civ_mde_female_heads" }, +{ 0x0000, "xmodelalias/alias_civ_mde_male_bodies_casual" }, +{ 0x0000, "xmodelalias/alias_civ_mde_male_bodies_dress" }, +{ 0x0000, "xmodelalias/alias_civ_mde_male_heads" }, +{ 0x0000, "xmodelalias/alias_civ_pris_afr_dark_male_bodies" }, +{ 0x0000, "xmodelalias/alias_civ_pris_cau_male_bodies" }, +{ 0x0000, "xmodelalias/alias_civ_pris_mde_male_bodies" }, +{ 0x0000, "xmodelalias/alias_civ_rec_funeral_male_body" }, +{ 0x0000, "xmodelalias/alias_civ_rec_funeral_male_body_afr" }, +{ 0x0000, "xmodelalias/alias_civ_rec_funeral_male_heads" }, +{ 0x0000, "xmodelalias/alias_civ_rec_funeral_male_heads_afr" }, +{ 0x0000, "xmodelalias/alias_civ_urban_dead_body_a" }, +{ 0x0000, "xmodelalias/alias_civ_urban_dead_body_b" }, +{ 0x0000, "xmodelalias/alias_civ_urban_dead_body_c" }, +{ 0x0000, "xmodelalias/alias_civ_urban_male_heads_afr_light" }, +{ 0x0000, "xmodelalias/alias_civ_worker_hardhat_s1_heads" }, +{ 0x0000, "xmodelalias/alias_civilian_heads_prisoner_female" }, +{ 0x0000, "xmodelalias/alias_civilian_slum_heads" }, +{ 0x0000, "xmodelalias/alias_civilian_slum_heads_wht" }, +{ 0x0000, "xmodelalias/alias_civilian_worker_heads" }, +{ 0x0000, "xmodelalias/alias_cloak_test" }, +{ 0x0000, "xmodelalias/alias_coop_cloaked_static_heads" }, +{ 0x0000, "xmodelalias/alias_enemy_atlas_arctic_heads" }, +{ 0x0000, "xmodelalias/alias_enemy_atlas_elite_heads" }, +{ 0x0000, "xmodelalias/alias_enemy_atlas_heads" }, +{ 0x0000, "xmodelalias/alias_greece_civilian_heads_males_a" }, +{ 0x0000, "xmodelalias/alias_greece_civilian_heads_males_b" }, +{ 0x0000, "xmodelalias/alias_kva_heads" }, +{ 0x0000, "xmodelalias/alias_mp_sentinel_heads" }, +{ 0x0000, "xmodelalias/alias_nigerian_army_bodies" }, +{ 0x0000, "xmodelalias/alias_nigerian_army_heads" }, +{ 0x0000, "xmodelalias/alias_pmc_casual_heads" }, +{ 0x0000, "xmodelalias/alias_pmc_casual_heads_asi" }, +{ 0x0000, "xmodelalias/alias_pmc_helmet_heads" }, +{ 0x0000, "xmodelalias/alias_sentinel_arctic_bodies" }, +{ 0x0000, "xmodelalias/alias_sentinel_arctic_heads" }, +{ 0x0000, "xmodelalias/alias_sentinel_bodies" }, +{ 0x0000, "xmodelalias/alias_sentinel_heads" }, +{ 0x0000, "xmodelalias/alias_sentinel_udt_heads" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_body_females" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_body_males_a" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_body_males_b" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_body_males_d" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_body_males_f" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_head_females" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_head_males_a" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_head_males_b" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_head_males_c" }, +{ 0x0000, "xmodelalias/alias_seoul_civilian_head_males_d" }, +{ 0x0000, "xmodelalias/alias_us_marine_dress_bodies" }, +{ 0x0000, "xmodelalias/alias_us_marine_dress_heads" }, +{ 0x0000, "xmodelalias/alias_us_marine_heads" }, +{ 0x0000, "maps/animated_models/foliage_tree_grey_oak_lg_a" }, +{ 0x0000, "maps/createart/betrayal_art" }, +{ 0x0000, "maps/createart/betrayal_fog" }, +{ 0x0000, "maps/createart/betrayal_fog_hdr" }, +{ 0x0000, "maps/createart/captured_art" }, +{ 0x0000, "maps/createart/captured_fog" }, +{ 0x0000, "maps/createart/captured_fog_hdr" }, +{ 0x0000, "maps/createart/crash_art" }, +{ 0x0000, "maps/createart/crash_fog" }, +{ 0x0000, "maps/createart/crash_fog_hdr" }, +{ 0x0000, "maps/createart/credits_s1_art" }, +{ 0x0000, "maps/createart/credits_s1_fog" }, +{ 0x0000, "maps/createart/credits_s1_fog_hdr" }, +{ 0x0000, "maps/createart/detroit_art" }, +{ 0x0000, "maps/createart/detroit_fog" }, +{ 0x0000, "maps/createart/detroit_fog_hdr" }, +{ 0x0000, "maps/createart/df_baghdad_art" }, +{ 0x0000, "maps/createart/df_baghdad_fog" }, +{ 0x0000, "maps/createart/df_baghdad_fog_hdr" }, +{ 0x0000, "maps/createart/df_fly_art" }, +{ 0x0000, "maps/createart/df_fly_fog" }, +{ 0x0000, "maps/createart/df_fly_fog_hdr" }, +{ 0x0000, "maps/createart/finale_art" }, +{ 0x0000, "maps/createart/finale_fog" }, +{ 0x0000, "maps/createart/finale_fog_hdr" }, +{ 0x0000, "maps/createart/fusion_art" }, +{ 0x0000, "maps/createart/fusion_fog" }, +{ 0x0000, "maps/createart/fusion_fog_hdr" }, +{ 0x0000, "maps/createart/greece_art" }, +{ 0x0000, "maps/createart/greece_fog" }, +{ 0x0000, "maps/createart/greece_fog_hdr" }, +{ 0x0000, "maps/createart/irons_estate_art" }, +{ 0x0000, "maps/createart/irons_estate_fog" }, +{ 0x0000, "maps/createart/irons_estate_fog_hdr" }, +{ 0x0000, "maps/createart/lab_art" }, +{ 0x0000, "maps/createart/lab_fog" }, +{ 0x0000, "maps/createart/lab_fog_hdr" }, +{ 0x0000, "maps/createart/lagos_art" }, +{ 0x0000, "maps/createart/lagos_fog" }, +{ 0x0000, "maps/createart/lagos_fog_hdr" }, +{ 0x0000, "maps/createart/mp_comeback_art" }, +{ 0x0000, "maps/createart/mp_comeback_fog" }, +{ 0x0000, "maps/createart/mp_comeback_fog_hdr" }, +{ 0x0000, "maps/createart/mp_detroit_art" }, +{ 0x0000, "maps/createart/mp_detroit_fog" }, +{ 0x0000, "maps/createart/mp_detroit_fog_hdr" }, +{ 0x0000, "maps/createart/mp_greenband_art" }, +{ 0x0000, "maps/createart/mp_greenband_fog" }, +{ 0x0000, "maps/createart/mp_greenband_fog_hdr" }, +{ 0x0000, "maps/createart/mp_instinct_art" }, +{ 0x0000, "maps/createart/mp_instinct_fog" }, +{ 0x0000, "maps/createart/mp_instinct_fog_hdr" }, +{ 0x0000, "maps/createart/mp_lab2_art" }, +{ 0x0000, "maps/createart/mp_lab2_fog" }, +{ 0x0000, "maps/createart/mp_lab2_fog_hdr" }, +{ 0x0000, "maps/createart/mp_laser2_art" }, +{ 0x0000, "maps/createart/mp_laser2_fog" }, +{ 0x0000, "maps/createart/mp_laser2_fog_hdr" }, +{ 0x0000, "maps/createart/mp_levity_art" }, +{ 0x0000, "maps/createart/mp_levity_fog" }, +{ 0x0000, "maps/createart/mp_levity_fog_hdr" }, +{ 0x0000, "maps/createart/mp_prison_art" }, +{ 0x0000, "maps/createart/mp_prison_fog" }, +{ 0x0000, "maps/createart/mp_prison_fog_hdr" }, +{ 0x0000, "maps/createart/mp_prison_z_art" }, +{ 0x0000, "maps/createart/mp_prison_z_fog" }, +{ 0x0000, "maps/createart/mp_prison_z_fog_hdr" }, +{ 0x0000, "maps/createart/mp_recovery_art" }, +{ 0x0000, "maps/createart/mp_recovery_fog" }, +{ 0x0000, "maps/createart/mp_recovery_fog_hdr" }, +{ 0x0000, "maps/createart/mp_refraction_art" }, +{ 0x0000, "maps/createart/mp_refraction_fog" }, +{ 0x0000, "maps/createart/mp_refraction_fog_hdr" }, +{ 0x0000, "maps/createart/mp_solar_art" }, +{ 0x0000, "maps/createart/mp_solar_fog" }, +{ 0x0000, "maps/createart/mp_solar_fog_hdr" }, +{ 0x0000, "maps/createart/mp_terrace_art" }, +{ 0x0000, "maps/createart/mp_terrace_fog" }, +{ 0x0000, "maps/createart/mp_terrace_fog_hdr" }, +{ 0x0000, "maps/createart/mp_venus_art" }, +{ 0x0000, "maps/createart/mp_venus_fog" }, +{ 0x0000, "maps/createart/mp_venus_fog_hdr" }, +{ 0x0000, "maps/createart/mp_vlobby_room_art" }, +{ 0x0000, "maps/createart/mp_vlobby_room_fog" }, +{ 0x0000, "maps/createart/mp_vlobby_room_fog_hdr" }, +{ 0x0000, "maps/createart/recovery_art" }, +{ 0x0000, "maps/createart/recovery_fog" }, +{ 0x0000, "maps/createart/recovery_fog_hdr" }, +{ 0x0000, "maps/createart/sanfran_art" }, +{ 0x0000, "maps/createart/sanfran_b_art" }, +{ 0x0000, "maps/createart/sanfran_b_fog" }, +{ 0x0000, "maps/createart/sanfran_b_fog_hdr" }, +{ 0x0000, "maps/createart/sanfran_fog" }, +{ 0x0000, "maps/createart/sanfran_fog_hdr" }, +{ 0x0000, "maps/createart/seoul_art" }, +{ 0x0000, "maps/createart/seoul_fog" }, +{ 0x0000, "maps/createart/seoul_fog_hdr" }, +{ 0x0000, "maps/createfx/betrayal_fx" }, +{ 0x0000, "maps/createfx/captured_fx" }, +{ 0x0000, "maps/createfx/captured_sound" }, +{ 0x0000, "maps/createfx/crash_fx" }, +{ 0x0000, "maps/createfx/credits_s1_fx" }, +{ 0x0000, "maps/createfx/detroit_fx" }, +{ 0x0000, "maps/createfx/df_baghdad_fx" }, +{ 0x0000, "maps/createfx/df_fly_fx" }, +{ 0x0000, "maps/createfx/finale_fx" }, +{ 0x0000, "maps/createfx/fusion_fx" }, +{ 0x0000, "maps/createfx/greece_fx" }, +{ 0x0000, "maps/createfx/irons_estate_fx" }, +{ 0x0000, "maps/createfx/lab_fx" }, +{ 0x0000, "maps/createfx/lagos_fx" }, +{ 0x0000, "maps/createfx/mp_comeback_fx" }, +{ 0x0000, "maps/createfx/mp_detroit_fx" }, +{ 0x0000, "maps/createfx/mp_greenband_fx" }, +{ 0x0000, "maps/createfx/mp_instinct_fx" }, +{ 0x0000, "maps/createfx/mp_lab2_fx" }, +{ 0x0000, "maps/createfx/mp_laser2_fx" }, +{ 0x0000, "maps/createfx/mp_levity_fx" }, +{ 0x0000, "maps/createfx/mp_prison_fx" }, +{ 0x0000, "maps/createfx/mp_prison_z_fx" }, +{ 0x0000, "maps/createfx/mp_recovery_fx" }, +{ 0x0000, "maps/createfx/mp_refraction_fx" }, +{ 0x0000, "maps/createfx/mp_solar_fx" }, +{ 0x0000, "maps/createfx/mp_terrace_fx" }, +{ 0x0000, "maps/createfx/mp_venus_fx" }, +{ 0x0000, "maps/createfx/mp_vlobby_room_fx" }, +{ 0x0000, "maps/createfx/recovery_fx" }, +{ 0x0000, "maps/createfx/sanfran_b_fx" }, +{ 0x0000, "maps/createfx/sanfran_fx" }, +{ 0x0000, "maps/createfx/seoul_fx" }, +{ 0x0000, "maps/mp/_adrenaline" }, +{ 0x0000, "maps/mp/_aerial_pathnodes" }, +{ 0x0000, "maps/mp/_animatedmodels" }, +{ 0x0000, "maps/mp/_areas" }, +{ 0x0000, "maps/mp/_art" }, +{ 0x0000, "maps/mp/_audio" }, +{ 0x0000, "maps/mp/_awards" }, +{ 0x0000, "maps/mp/_braggingrights" }, +{ 0x0000, "maps/mp/_compass" }, +{ 0x0000, "maps/mp/_createfx" }, +{ 0x0000, "maps/mp/_crib" }, +{ 0x0000, "maps/mp/_destructables" }, +{ 0x0000, "maps/mp/_dynamic_events" }, +{ 0x0000, "maps/mp/_empgrenade" }, +{ 0x0000, "maps/mp/_entityheadicons" }, +{ 0x0000, "maps/mp/_events" }, +{ 0x0000, "maps/mp/_exo_battery" }, +{ 0x0000, "maps/mp/_exo_cloak" }, +{ 0x0000, "maps/mp/_exo_hover" }, +{ 0x0000, "maps/mp/_exo_mute" }, +{ 0x0000, "maps/mp/_exo_ping" }, +{ 0x0000, "maps/mp/_exo_repulsor" }, +{ 0x0000, "maps/mp/_exo_shield" }, +{ 0x0000, "maps/mp/_exo_suit" }, +{ 0x0000, "maps/mp/_exocrossbow" }, +{ 0x0000, "maps/mp/_exoknife" }, +{ 0x0000, "maps/mp/_explosive_drone" }, +{ 0x0000, "maps/mp/_explosive_gel" }, +{ 0x0000, "maps/mp/_extrahealth" }, +{ 0x0000, "maps/mp/_fastheal" }, +{ 0x0000, "maps/mp/_flashgrenades" }, +{ 0x0000, "maps/mp/_fx" }, +{ 0x0000, "maps/mp/_global_fx" }, +{ 0x0000, "maps/mp/_global_fx_code" }, +{ 0x0000, "maps/mp/_lasersight" }, +{ 0x0000, "maps/mp/_load" }, +{ 0x0000, "maps/mp/_lsrmissileguidance" }, +{ 0x0000, "maps/mp/_matchdata" }, +{ 0x0000, "maps/mp/_menus" }, +{ 0x0000, "maps/mp/_microdronelauncher" }, +{ 0x0000, "maps/mp/_movers" }, +{ 0x0000, "maps/mp/_mp_lights" }, +{ 0x0000, "maps/mp/_mutebomb" }, +{ 0x0000, "maps/mp/_na45" }, +{ 0x0000, "maps/mp/_opticsthermal" }, +{ 0x0000, "maps/mp/_reinforcements" }, +{ 0x0000, "maps/mp/_riotshield" }, +{ 0x0000, "maps/mp/_scoreboard" }, +{ 0x0000, "maps/mp/_shutter" }, +{ 0x0000, "maps/mp/_snd_common_mp" }, +{ 0x0000, "maps/mp/_stinger" }, +{ 0x0000, "maps/mp/_stingerm7" }, +{ 0x0000, "maps/mp/_stock" }, +{ 0x0000, "maps/mp/_target_enhancer" }, +{ 0x0000, "maps/mp/_teleport" }, +{ 0x0000, "maps/mp/_threatdetection" }, +{ 0x0000, "maps/mp/_tracking_drone" }, +{ 0x0000, "maps/mp/_trackrounds" }, +{ 0x0000, "maps/mp/_tridrone" }, +{ 0x0000, "maps/mp/_utility" }, +{ 0x0000, "maps/mp/_vl_base" }, +{ 0x0000, "maps/mp/_vl_camera" }, +{ 0x0000, "maps/mp/_vl_firingrange" }, +{ 0x0000, "maps/mp/_vl_selfiebooth" }, +{ 0x0000, "maps/mp/_water" }, +{ 0x0000, "maps/mp/_zipline" }, +{ 0x0000, "maps/mp/mp_comeback_fx" }, +{ 0x0000, "maps/mp/mp_comeback_precache" }, +{ 0x0000, "maps/mp/mp_detroit_fx" }, +{ 0x0000, "maps/mp/mp_detroit_precache" }, +{ 0x0000, "maps/mp/mp_greenband_fx" }, +{ 0x0000, "maps/mp/mp_greenband_precache" }, +{ 0x0000, "maps/mp/mp_instinct_fx" }, +{ 0x0000, "maps/mp/mp_instinct_precache" }, +{ 0x0000, "maps/mp/mp_lab2_fx" }, +{ 0x0000, "maps/mp/mp_lab2_precache" }, +{ 0x0000, "maps/mp/mp_laser2_fx" }, +{ 0x0000, "maps/mp/mp_laser2_precache" }, +{ 0x0000, "maps/mp/mp_levity_fx" }, +{ 0x0000, "maps/mp/mp_levity_precache" }, +{ 0x0000, "maps/mp/mp_prison_fx" }, +{ 0x0000, "maps/mp/mp_prison_precache" }, +{ 0x0000, "maps/mp/mp_prison_z_fx" }, +{ 0x0000, "maps/mp/mp_prison_z_precache" }, +{ 0x0000, "maps/mp/mp_recovery_fx" }, +{ 0x0000, "maps/mp/mp_recovery_precache" }, +{ 0x0000, "maps/mp/mp_refraction_fx" }, +{ 0x0000, "maps/mp/mp_refraction_precache" }, +{ 0x0000, "maps/mp/mp_solar_fx" }, +{ 0x0000, "maps/mp/mp_solar_precache" }, +{ 0x0000, "maps/mp/mp_terrace_fx" }, +{ 0x0000, "maps/mp/mp_terrace_precache" }, +{ 0x0000, "maps/mp/mp_venus_fx" }, +{ 0x0000, "maps/mp/mp_venus_precache" }, +{ 0x0000, "maps/mp/mp_vlobby_room_fx" }, +{ 0x0000, "maps/mp/mp_vlobby_room_precache" }, +{ 0x0000, "maps/mp/gametypes/_battlebuddy" }, +{ 0x0000, "maps/mp/gametypes/_battlechatter_mp" }, +{ 0x0000, "maps/mp/gametypes/_class" }, +{ 0x0000, "maps/mp/gametypes/_clientids" }, +{ 0x0000, "maps/mp/gametypes/_damage" }, +{ 0x0000, "maps/mp/gametypes/_damagefeedback" }, +{ 0x0000, "maps/mp/gametypes/_deathicons" }, +{ 0x0000, "maps/mp/gametypes/_dev" }, +{ 0x0000, "maps/mp/gametypes/_equipment" }, +{ 0x0000, "maps/mp/gametypes/_friendicons" }, +{ 0x0000, "maps/mp/gametypes/_gamelogic" }, +{ 0x0000, "maps/mp/gametypes/_gameobjects" }, +{ 0x0000, "maps/mp/gametypes/_gamescore" }, +{ 0x0000, "maps/mp/gametypes/_globalentities" }, +{ 0x0000, "maps/mp/gametypes/_globallogic" }, +{ 0x0000, "maps/mp/gametypes/_hardpoints" }, +{ 0x0000, "maps/mp/gametypes/_healthoverlay" }, +{ 0x0000, "maps/mp/gametypes/_high_jump_mp" }, +{ 0x0000, "maps/mp/gametypes/_horde_armory" }, +{ 0x0000, "maps/mp/gametypes/_horde_crates" }, +{ 0x0000, "maps/mp/gametypes/_horde_dialog" }, +{ 0x0000, "maps/mp/gametypes/_horde_drones" }, +{ 0x0000, "maps/mp/gametypes/_horde_laststand" }, +{ 0x0000, "maps/mp/gametypes/_horde_sentry" }, +{ 0x0000, "maps/mp/gametypes/_horde_smart_grenade" }, +{ 0x0000, "maps/mp/gametypes/_horde_util" }, +{ 0x0000, "maps/mp/gametypes/_horde_zombies" }, +{ 0x0000, "maps/mp/gametypes/_hostmigration" }, +{ 0x0000, "maps/mp/gametypes/_hud" }, +{ 0x0000, "maps/mp/gametypes/_hud_message" }, +{ 0x0000, "maps/mp/gametypes/_hud_util" }, +{ 0x0000, "maps/mp/gametypes/_killcam" }, +{ 0x0000, "maps/mp/gametypes/_menus" }, +{ 0x0000, "maps/mp/gametypes/_missions" }, +{ 0x0000, "maps/mp/gametypes/_music_and_dialog" }, +{ 0x0000, "maps/mp/gametypes/_objpoints" }, +{ 0x0000, "maps/mp/gametypes/_orbital" }, +{ 0x0000, "maps/mp/gametypes/_persistence" }, +{ 0x0000, "maps/mp/gametypes/_player_boost_jump_mp" }, +{ 0x0000, "maps/mp/gametypes/_playercards" }, +{ 0x0000, "maps/mp/gametypes/_playerlogic" }, +{ 0x0000, "maps/mp/gametypes/_portable_radar" }, +{ 0x0000, "maps/mp/gametypes/_quickmessages" }, +{ 0x0000, "maps/mp/gametypes/_rank" }, +{ 0x0000, "maps/mp/gametypes/_scrambler" }, +{ 0x0000, "maps/mp/gametypes/_serversettings" }, +{ 0x0000, "maps/mp/gametypes/_shellshock" }, +{ 0x0000, "maps/mp/gametypes/_spawnfactor" }, +{ 0x0000, "maps/mp/gametypes/_spawnlogic" }, +{ 0x0000, "maps/mp/gametypes/_spawnscoring" }, +{ 0x0000, "maps/mp/gametypes/_spectating" }, +{ 0x0000, "maps/mp/gametypes/_teams" }, +{ 0x0000, "maps/mp/gametypes/_tweakables" }, +{ 0x0000, "maps/mp/gametypes/_weapons" }, +{ 0x0000, "maps/mp/killstreaks/_aerial_utility" }, +{ 0x0000, "maps/mp/killstreaks/_agent_killstreak" }, +{ 0x0000, "maps/mp/killstreaks/_airdrop" }, +{ 0x0000, "maps/mp/killstreaks/_airstrike" }, +{ 0x0000, "maps/mp/killstreaks/_assaultdrone_ai" }, +{ 0x0000, "maps/mp/killstreaks/_autosentry" }, +{ 0x0000, "maps/mp/killstreaks/_coop_util" }, +{ 0x0000, "maps/mp/killstreaks/_dog_killstreak" }, +{ 0x0000, "maps/mp/killstreaks/_drone_assault" }, +{ 0x0000, "maps/mp/killstreaks/_drone_carepackage" }, +{ 0x0000, "maps/mp/killstreaks/_drone_common" }, +{ 0x0000, "maps/mp/killstreaks/_drone_recon" }, +{ 0x0000, "maps/mp/killstreaks/_emp" }, +{ 0x0000, "maps/mp/killstreaks/_juggernaut" }, +{ 0x0000, "maps/mp/killstreaks/_killstreaks" }, +{ 0x0000, "maps/mp/killstreaks/_killstreaks_init" }, +{ 0x0000, "maps/mp/killstreaks/_marking_util" }, +{ 0x0000, "maps/mp/killstreaks/_missile_strike" }, +{ 0x0000, "maps/mp/killstreaks/_nuke" }, +{ 0x0000, "maps/mp/killstreaks/_orbital_carepackage" }, +{ 0x0000, "maps/mp/killstreaks/_orbital_strike" }, +{ 0x0000, "maps/mp/killstreaks/_orbital_util" }, +{ 0x0000, "maps/mp/killstreaks/_orbitalsupport" }, +{ 0x0000, "maps/mp/killstreaks/_placeable" }, +{ 0x0000, "maps/mp/killstreaks/_remoteturret" }, +{ 0x0000, "maps/mp/killstreaks/_rippedturret" }, +{ 0x0000, "maps/mp/killstreaks/_teamammorefill" }, +{ 0x0000, "maps/mp/killstreaks/_uav" }, +{ 0x0000, "maps/mp/killstreaks/_warbird" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_comeback" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_detroit" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_instinct" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_laser2" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_prison" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_recovery" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_refraction" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_solar" }, +{ 0x0000, "maps/mp/killstreaks/streak_mp_terrace" }, +{ 0x0000, "maps/mp/perks/_perkfunctions" }, +{ 0x0000, "maps/mp/perks/_perks" }, +*/ + +/* +// after first files codescript + +{ 0x0000, "__smangles" }, +{ 0x0000, "__smid" }, +{ 0x0000, "__smname" }, +{ 0x0000, "__smorigin" }, +{ 0x0000, "_abortdefendlocation" }, +{ 0x0000, "_adddropmarkerinternal" }, +{ 0x0000, "_adjustcamerayawpitchrate" }, +{ 0x0000, "_advancetogoal" }, +{ 0x0000, "_ai_delete" }, +{ 0x0000, "_ai_group" }, +{ 0x0000, "_ai_health" }, +{ 0x0000, "_aliveplayers" }, +{ 0x0000, "_allowalternatemelee" }, +{ 0x0000, "_allowweaponpickup" }, +{ 0x0000, "_ams" }, +{ 0x0000, "_animactive" }, +{ 0x0000, "_anime" }, +{ 0x0000, "_animmode" }, +{ 0x0000, "_animname" }, +{ 0x0000, "_anims" }, +{ 0x0000, "_anims_drone" }, +{ 0x0000, "_anims_player" }, +{ 0x0000, "_anims_proxy" }, +{ 0x0000, "_array_wait" }, +{ 0x0000, "_assignnewvehicleturretuser" }, +{ 0x0000, "_attachfanclip" }, +{ 0x0000, "_audio" }, +{ 0x0000, "_autosave_game_now" }, +{ 0x0000, "_autosave_game_now_nochecks" }, +{ 0x0000, "_autosave_game_now_notrestart" }, +{ 0x0000, "_autosave_stealthcheck" }, +{ 0x0000, "_beginlocationselection" }, +{ 0x0000, "_bootup_static" }, +{ 0x0000, "_cangiveability" }, +{ 0x0000, "_caralarmfx" }, +{ 0x0000, "_caralarmstop" }, +{ 0x0000, "_cleanupshootinglocationondeath" }, +{ 0x0000, "_clearabilities" }, +{ 0x0000, "_clearalltextafterhudelem" }, +{ 0x0000, "_clearcharacterdialogondeath" }, +{ 0x0000, "_clearcharacterdialogonnotify" }, +{ 0x0000, "_clearentitytarget" }, +{ 0x0000, "_clearperks" }, +{ 0x0000, "_clearradiodialogondeath" }, +{ 0x0000, "_clearworlddialogonnotify" }, +{ 0x0000, "_cloak_enemy_array" }, +{ 0x0000, "_cloak_enemy_state" }, +{ 0x0000, "_cloak_toggle_internal" }, +{ 0x0000, "_cloaked_stealth_settings" }, +{ 0x0000, "_closingdistancecheck" }, +{ 0x0000, "_color" }, +{ 0x0000, "_colors_go_line" }, +{ 0x0000, "_createfx" }, +{ 0x0000, "_createhudline" }, +{ 0x0000, "_custom_anim" }, +{ 0x0000, "_custom_anim_loop" }, +{ 0x0000, "_custom_anim_thread" }, +{ 0x0000, "_debug_vector_to_string" }, +{ 0x0000, "_defendlocation" }, +{ 0x0000, "_delaygrenadethrow" }, +{ 0x0000, "_delete" }, +{ 0x0000, "_destroyprojectileafterdelay" }, +{ 0x0000, "_destructible_preanims" }, +{ 0x0000, "_destructible_preanimtree" }, +{ 0x0000, "_detachall" }, +{ 0x0000, "_determineallynodescore" }, +{ 0x0000, "_determineshotgunnodescore" }, +{ 0x0000, "_dialogtablelookup" }, +{ 0x0000, "_disableoffhandweapons" }, +{ 0x0000, "_disableusability" }, +{ 0x0000, "_disableweapon" }, +{ 0x0000, "_disableweaponswitch" }, +{ 0x0000, "_displayhelpertext" }, +{ 0x0000, "_displayrechargehelpertext" }, +{ 0x0000, "_dmg" }, +{ 0x0000, "_do_a_lil_damage_and_heal" }, +{ 0x0000, "_drawdebug" }, +{ 0x0000, "_earthquake" }, +{ 0x0000, "_effect" }, +{ 0x0000, "_effect_keys" }, +{ 0x0000, "_enabledetonate" }, +{ 0x0000, "_enableexplosivedeath" }, +{ 0x0000, "_enableoffhandweapons" }, +{ 0x0000, "_enableusability" }, +{ 0x0000, "_enableweapon" }, +{ 0x0000, "_enableweaponswitch" }, +{ 0x0000, "_ensure_player_is_decloaked" }, +{ 0x0000, "_evaluatebuddycovernodes" }, +{ 0x0000, "_evaluatenodeattackradius" }, +{ 0x0000, "_evaluatenodeinplayerfov" }, +{ 0x0000, "_evaluatenodeiscover" }, +{ 0x0000, "_evaluatenodeisexposed" }, +{ 0x0000, "_evaluatenodeknownenemyinradius" }, +{ 0x0000, "_evaluatenodelostoplayer" }, +{ 0x0000, "_evaluatenodeothershotgunnersbest" }, +{ 0x0000, "_evaluatenodeplayerinradius" }, +{ 0x0000, "_evaluatenodeplayervisibility" }, +{ 0x0000, "_evaluatenoderangetoplayer" }, +{ 0x0000, "_evaluateshotgunnercovernodes" }, +{ 0x0000, "_exit" }, +{ 0x0000, "_exit_menu" }, +{ 0x0000, "_extended_patrol_idle_animation_list_fu"... }, +{ 0x0000, "_extra_autosave_checks" }, +{ 0x0000, "_facility" }, +{ 0x0000, "_fastopen" }, +{ 0x0000, "_findfleelocation" }, +{ 0x0000, "_findnewvehicleturretuser" }, +{ 0x0000, "_fire" }, +{ 0x0000, "_first_frame_anim" }, +{ 0x0000, "_flag_wait_trigger" }, +{ 0x0000, "_force_kill" }, +{ 0x0000, "_freevehicle" }, +{ 0x0000, "_frozen_controls" }, +{ 0x0000, "_fx" }, +{ 0x0000, "_get_dummy" }, +{ 0x0000, "_get_if_defined_or_default" }, +{ 0x0000, "_getindex" }, +{ 0x0000, "_getmodulekillstreakweapon" }, +{ 0x0000, "_getpaintoutline" }, +{ 0x0000, "_getplayerscore" }, +{ 0x0000, "_getradarstrength" }, +{ 0x0000, "_getrandomorginfrontofplayer" }, +{ 0x0000, "_getscrambletypeidforstring" }, +{ 0x0000, "_getteampaintoutline" }, +{ 0x0000, "_getteamscore" }, +{ 0x0000, "_getvehiclespawnerarray" }, +{ 0x0000, "_getvehiclespawnerarray_by_spawngroup" }, +{ 0x0000, "_giveweapon" }, +{ 0x0000, "_glass_physics_wakeup" }, +{ 0x0000, "_glass_physics_wakeup_update" }, +{ 0x0000, "_global_fx_ents" }, +{ 0x0000, "_goalblockedbyai" }, +{ 0x0000, "_goalblockedbyplayer" }, +{ 0x0000, "_gopath" }, +{ 0x0000, "_group" }, +{ 0x0000, "_handle_triggers_on" }, +{ 0x0000, "_handlebreachgrenade" }, +{ 0x0000, "_hasability" }, +{ 0x0000, "_hasperk" }, +{ 0x0000, "_hint_stick_get_config_suffix" }, +{ 0x0000, "_hint_stick_update_breakfunc" }, +{ 0x0000, "_hint_stick_update_string" }, +{ 0x0000, "_ignore_settings_old" }, +{ 0x0000, "_initalliedaialleycombatbehavior" }, +{ 0x0000, "_initsafehouseexitkvabehavior" }, +{ 0x0000, "_insertintoglobalusablelist" }, +{ 0x0000, "_interactive" }, +{ 0x0000, "_investigate_last_known_position_with_e"... }, +{ 0x0000, "_investigate_last_known_position_wrappe"... }, +{ 0x0000, "_is_godmode" }, +{ 0x0000, "_isairplane" }, +{ 0x0000, "_ishelicopter" }, +{ 0x0000, "_kill" }, +{ 0x0000, "_kill_fx" }, +{ 0x0000, "_lastanimtime" }, +{ 0x0000, "_lastwave" }, +{ 0x0000, "_lc" }, +{ 0x0000, "_lc_persists" }, +{ 0x0000, "_leaderdialogwait" }, +{ 0x0000, "_light" }, +{ 0x0000, "_linkto" }, +{ 0x0000, "_listen_drone_input" }, +{ 0x0000, "_listen_for_hold_to_exit" }, +{ 0x0000, "_listen_for_hold_to_exit_set_flags" }, +{ 0x0000, "_loadstarted" }, +{ 0x0000, "_make_overlay" }, +{ 0x0000, "_manage_timer" }, +{ 0x0000, "_mark_newlyspawned" }, +{ 0x0000, "_max_script_health" }, +{ 0x0000, "_mb" }, +{ 0x0000, "_mech_globals" }, +{ 0x0000, "_mech_hunt_baghdad" }, +{ 0x0000, "_mech_node" }, +{ 0x0000, "_mech_occupied" }, +{ 0x0000, "_mgoff" }, +{ 0x0000, "_mgon" }, +{ 0x0000, "_missile_strike_setting" }, +{ 0x0000, "_missilemissedtargetcheck" }, +{ 0x0000, "_missing_fx" }, +{ 0x0000, "_monitor_controls" }, +{ 0x0000, "_monitor_damage" }, +{ 0x0000, "_monitor_health" }, +{ 0x0000, "_monitor_regen" }, +{ 0x0000, "_monitor_static" }, +{ 0x0000, "_monitor_threat_count" }, +{ 0x0000, "_monitor_touch" }, +{ 0x0000, "_monitor_volume_array" }, +{ 0x0000, "_mount_snowmobile" }, +{ 0x0000, "_newhudelem" }, +{ 0x0000, "_nextcoverprint" }, +{ 0x0000, "_nextmission" }, +{ 0x0000, "_normalbehavior" }, +{ 0x0000, "_notetrackfx" }, +{ 0x0000, "_obituary" }, +{ 0x0000, "_objective_delete" }, +{ 0x0000, "_offset_position_from_tag" }, +{ 0x0000, "_old_visionset" }, +{ 0x0000, "_orbital_care_pod" }, +{ 0x0000, "_orbital_strike_setting" }, +{ 0x0000, "_patrol_endon_spotted_flag" }, +{ 0x0000, "_pdrone_player_exit_return_control" }, +{ 0x0000, "_pdrone_player_proxy" }, +{ 0x0000, "_pdrone_player_proxy_clear" }, +{ 0x0000, "_pdrone_player_proxy_delicate_flower" }, +{ 0x0000, "_pdrone_stop_use_anim" }, +{ 0x0000, "_pipe_fx_time" }, +{ 0x0000, "_pipe_methods" }, +{ 0x0000, "_pipes" }, +{ 0x0000, "_play_view_model_cloak_toggle_anim" }, +{ 0x0000, "_playerallow" }, +{ 0x0000, "_playercleanupscrambleevents" }, +{ 0x0000, "_playergetnextevent" }, +{ 0x0000, "_playergetscrambleevent" }, +{ 0x0000, "_playergetuniquescrambleid" }, +{ 0x0000, "_playermonitorscrambleevents" }, +{ 0x0000, "_playlocalsound" }, +{ 0x0000, "_popopen" }, +{ 0x0000, "_precache" }, +{ 0x0000, "_pursueenemy" }, +{ 0x0000, "_radio_queue" }, +{ 0x0000, "_radiusdamage" }, +{ 0x0000, "_randommissilemovement" }, +{ 0x0000, "_reactionanimation" }, +{ 0x0000, "_reduce_hud_target_count_on_death" }, +{ 0x0000, "_remove_drone_control" }, +{ 0x0000, "_remove_hud" }, +{ 0x0000, "_remove_hud_on_death" }, +{ 0x0000, "_remove_hudoutline_on_enemies" }, +{ 0x0000, "_remove_overlay_static" }, +{ 0x0000, "_remove_shield" }, +{ 0x0000, "_reset_dvars" }, +{ 0x0000, "_restorepreviousnameplatematerial" }, +{ 0x0000, "_returnanimorigin" }, +{ 0x0000, "_rotateprop" }, +{ 0x0000, "_rotateyaw" }, +{ 0x0000, "_s2walk" }, +{ 0x0000, "_save_dvars" }, +{ 0x0000, "_script_exploders" }, +{ 0x0000, "_scripted_spawn" }, +{ 0x0000, "_set_dvars" }, +{ 0x0000, "_set_hudoutline_on_enemies" }, +{ 0x0000, "_set_overlay_static_alpha" }, +{ 0x0000, "_setability" }, +{ 0x0000, "_setactionslot" }, +{ 0x0000, "_setentitytarget" }, +{ 0x0000, "_sethighestmissionifnotcheating" }, +{ 0x0000, "_sethudoutline" }, +{ 0x0000, "_sethudoutline_on_spawn" }, +{ 0x0000, "_setlightintensity" }, +{ 0x0000, "_setmissiondiffstringifnotcheating" }, +{ 0x0000, "_setnameplatematerial" }, +{ 0x0000, "_setperk" }, +{ 0x0000, "_setplayerscore" }, +{ 0x0000, "_setsaveddvar" }, +{ 0x0000, "_setswitchnode" }, +{ 0x0000, "_setteamscore" }, +{ 0x0000, "_settext" }, +{ 0x0000, "_setup_hud" }, +{ 0x0000, "_setup_overlay_static" }, +{ 0x0000, "_setupdooranimstyle" }, +{ 0x0000, "_setvehgoalpos" }, +{ 0x0000, "_setvehgoalpos_wrap" }, +{ 0x0000, "_shotgunneradvance" }, +{ 0x0000, "_shotgunnerambience" }, +{ 0x0000, "_shotgunnerdamagefunction" }, +{ 0x0000, "_shotgunnerdeath" }, +{ 0x0000, "_show_contols" }, +{ 0x0000, "_slomo_breach_blowback_guy" }, +{ 0x0000, "_slomo_breach_c4_hostage" }, +{ 0x0000, "_slomo_breach_chair_guy_animated" }, +{ 0x0000, "_slomo_breach_chair_guy_normal" }, +{ 0x0000, "_slomo_breach_desk_guy" }, +{ 0x0000, "_slomo_breach_executed_guy" }, +{ 0x0000, "_slomo_breach_executed_guy_pushed_to_fl"... }, +{ 0x0000, "_slomo_breach_executioner_knife" }, +{ 0x0000, "_slomo_breach_executioner_pistol" }, +{ 0x0000, "_slomo_breach_fightback_guy" }, +{ 0x0000, "_slomo_breach_hostage_react" }, +{ 0x0000, "_slomo_breach_knife_charger" }, +{ 0x0000, "_slomo_breach_knife_hostage_death" }, +{ 0x0000, "_slomo_breach_pistol_guy" }, +{ 0x0000, "_slowmo_breach_funcs" }, +{ 0x0000, "_slowmo_functions" }, +{ 0x0000, "_slowopen" }, +{ 0x0000, "_snd" }, +{ 0x0000, "_snd_update_soundcontextoverride" }, +{ 0x0000, "_sonicaoeanim" }, +{ 0x0000, "_sonicaoenotready" }, +{ 0x0000, "_sortbyscore" }, +{ 0x0000, "_sound" }, +{ 0x0000, "_spawner_mg42_think" }, +{ 0x0000, "_spawner_stealth_default" }, +{ 0x0000, "_spawntargetnamegotogoal" }, +{ 0x0000, "_squaddoorbreach" }, +{ 0x0000, "_startdooropen" }, +{ 0x0000, "_state_init" }, +{ 0x0000, "_stealth" }, +{ 0x0000, "_stealth_move_detection_cap" }, +{ 0x0000, "_stop_mech_hunt_baghdad" }, +{ 0x0000, "_stunassaultdrones" }, +{ 0x0000, "_stuncivilians" }, +{ 0x0000, "_stunenemies" }, +{ 0x0000, "_suicide" }, +{ 0x0000, "_tag_entity" }, +{ 0x0000, "_takeweaponsexcept" }, +{ 0x0000, "_teleportleashbehavior" }, +{ 0x0000, "_tff_sync_trigger_think" }, +{ 0x0000, "_tff_sync_triggers" }, +{ 0x0000, "_threatdetection" }, +{ 0x0000, "_timeout" }, +{ 0x0000, "_timeout_pause_on_death_and_prematch" }, +{ 0x0000, "_trigger_handle_triggering" }, +{ 0x0000, "_unlink" }, +{ 0x0000, "_unsetability" }, +{ 0x0000, "_unsetperk" }, +{ 0x0000, "_updatebuddycovernodes" }, +{ 0x0000, "_updateenemygroupdirection" }, +{ 0x0000, "_updateenemyusable" }, +{ 0x0000, "_updatepainamount" }, +{ 0x0000, "_updateshotgunnercovernodes" }, +{ 0x0000, "_updateteamusable" }, +{ 0x0000, "_useperkenabled" }, +{ 0x0000, "_validateattacker" }, +{ 0x0000, "_vehicle_badplace" }, +{ 0x0000, "_vehicle_effect" }, +{ 0x0000, "_vehicle_effect_custom_param" }, +{ 0x0000, "_vehicle_is_crashing" }, +{ 0x0000, "_vehicle_landvehicle" }, +{ 0x0000, "_vehicle_paths" }, +{ 0x0000, "_vehicle_resume_named" }, +{ 0x0000, "_vehicle_spawn" }, +{ 0x0000, "_vehicle_stop_named" }, +{ 0x0000, "_vehicle_unload" }, +{ 0x0000, "_vehicleturretreenable" }, +{ 0x0000, "_vmodel_anims" }, +{ 0x0000, "_vmodel_enter" }, +{ 0x0000, "_vmodel_exit" }, +{ 0x0000, "_vmodel_sway" }, +{ 0x0000, "_vol" }, +{ 0x0000, "_wait" }, +{ 0x0000, "_waittillgoalornewgoal" }, +{ 0x0000, "_waittillmatch" }, +{ 0x0000, "_waittillmatch_notify" }, +{ 0x0000, "_walk" }, +{ 0x0000, "_wavedelay" }, +{ 0x0000, "_waveplayerspawnindex" }, +{ 0x0000, "a10_30mm_fire" }, +{ 0x0000, "a10_fire_missiles" }, +{ 0x0000, "a10_gun_dives" }, +{ 0x0000, "a10_missile_dives" }, +{ 0x0000, "a10_missile_set_target" }, +{ 0x0000, "a10_precache" }, +{ 0x0000, "a10_spawn_funcs" }, +{ 0x0000, "a10_wait_fire_missile" }, +{ 0x0000, "a10_wait_start_firing" }, +{ 0x0000, "a10_wait_stop_firing" }, +{ 0x0000, "aa_add_event" }, +{ 0x0000, "aa_add_event_float" }, +{ 0x0000, "aa_ai_functions" }, +{ 0x0000, "aa_door_functions" }, +{ 0x0000, "aa_explosion" }, +{ 0x0000, "aa_init_stats" }, +{ 0x0000, "aa_player_ads_tracking" }, +{ 0x0000, "aa_player_attacks_enemy_with_ads" }, +{ 0x0000, "aa_player_health_tracking" }, +{ 0x0000, "aa_print_vals" }, +{ 0x0000, "aa_should_start_fresh" }, +{ 0x0000, "aa_spawning_functions" }, +{ 0x0000, "aa_time_tracking" }, +{ 0x0000, "aa_update_flags" }, +{ 0x0000, "abandon_mission_warning_hint" }, +{ 0x0000, "abanglecutoff" }, +{ 0x0000, "abilities" }, +{ 0x0000, "abilitycansetfuncs" }, +{ 0x0000, "abilitychosen" }, +{ 0x0000, "abilitysetfuncs" }, +{ 0x0000, "abilityunsetfuncs" }, +{ 0x0000, "abort" }, +{ 0x0000, "abort_count" }, +{ 0x0000, "abort_drones" }, +{ 0x0000, "abort_wait_any_func_array" }, +{ 0x0000, "abortapproachifthreatened" }, +{ 0x0000, "abortlevel" }, +{ 0x0000, "abortreloadwhencanshoot" }, +{ 0x0000, "about_to_stop" }, +{ 0x0000, "about_to_unload" }, +{ 0x0000, "abouttobebreached" }, +{ 0x0000, "absangleclamp180" }, +{ 0x0000, "absyawtoangles" }, +{ 0x0000, "absyawtoenemy" }, +{ 0x0000, "absyawtoenemy2d" }, +{ 0x0000, "absyawtoorigin" }, +{ 0x0000, "absz" }, +{ 0x0000, "abyss_player_kill" }, +{ 0x0000, "ac_duct" }, +{ 0x0000, "ac_duct_01" }, +{ 0x0000, "ac_duct_02" }, +{ 0x0000, "ac130" }, +{ 0x0000, "ac130_flood_respawn" }, +{ 0x0000, "ac130gunner" }, +{ 0x0000, "ac130player" }, +{ 0x0000, "accaracy_mod" }, +{ 0x0000, "accel" }, +{ 0x0000, "accel_watcher" }, +{ 0x0000, "accelerating" }, +{ 0x0000, "acceltime" }, +{ 0x0000, "accessallmarkers" }, +{ 0x0000, "accumulated_restore" }, +{ 0x0000, "accumulateplayerpingdata" }, +{ 0x0000, "accuracy_fake_function" }, +{ 0x0000, "accuracygrowthmultiplier" }, +{ 0x0000, "accuracystationarymod" }, +{ 0x0000, "achieve_downed_kills" }, +{ 0x0000, "achieve_slowmo_breach_kills" }, +{ 0x0000, "achievement" }, +{ 0x0000, "achievement_attacker" }, +{ 0x0000, "achievementsniperdronetriplekill" }, +{ 0x0000, "acquire_target" }, +{ 0x0000, "acquired_animation" }, +{ 0x0000, "acquiring_dogfight_target" }, +{ 0x0000, "acquiring_lock_target" }, +{ 0x0000, "action_back" }, +{ 0x0000, "action_func" }, +{ 0x0000, "action_gears" }, +{ 0x0000, "action_killstreak" }, +{ 0x0000, "action_leaderboards" }, +{ 0x0000, "action_slot_num" }, +{ 0x0000, "action_slot_whistle" }, +{ 0x0000, "action_thread" }, +{ 0x0000, "action_weapons_primary" }, +{ 0x0000, "action_weapons_secondary" }, +{ 0x0000, "actionnotify" }, +{ 0x0000, "actionnotifymessage" }, +{ 0x0000, "actionslotenabled" }, +{ 0x0000, "actionslots" }, +{ 0x0000, "activate_betrayal_exo_abilities" }, +{ 0x0000, "activate_clientside_exploder" }, +{ 0x0000, "activate_color_code_internal" }, +{ 0x0000, "activate_destructibles_in_volume" }, +{ 0x0000, "activate_exo_ping" }, +{ 0x0000, "activate_exploder" }, +{ 0x0000, "activate_exploders_in_volume" }, +{ 0x0000, "activate_guy" }, +{ 0x0000, "activate_heater" }, +{ 0x0000, "activate_individual_exploder" }, +{ 0x0000, "activate_individual_exploder_proc" }, +{ 0x0000, "activate_interactives_in_volume" }, +{ 0x0000, "activate_mute_volume" }, +{ 0x0000, "activate_security_drone" }, +{ 0x0000, "activate_splashes" }, +{ 0x0000, "activate_takedown_world_prompt_on_enemy" }, +{ 0x0000, "activate_takedown_world_prompt_on_truck"... }, +{ 0x0000, "activate_targets" }, +{ 0x0000, "activate_trigger" }, +{ 0x0000, "activate_trigger_process" }, +{ 0x0000, "activate_trigger_when_player_jumps" }, +{ 0x0000, "activate_trigger_with_noteworthy" }, +{ 0x0000, "activate_trigger_with_targetname" }, +{ 0x0000, "activateagent" }, +{ 0x0000, "activategroupedtridrones" }, +{ 0x0000, "activateplayerhud" }, +{ 0x0000, "activateratio" }, +{ 0x0000, "activatethermal" }, +{ 0x0000, "activation_cost" }, +{ 0x0000, "active_boats" }, +{ 0x0000, "active_button" }, +{ 0x0000, "active_civilians" }, +{ 0x0000, "active_cloaking_disable" }, +{ 0x0000, "active_cloaking_enable" }, +{ 0x0000, "active_drones" }, +{ 0x0000, "active_events" }, +{ 0x0000, "active_events_axis" }, +{ 0x0000, "active_ffa_players" }, +{ 0x0000, "active_objective" }, +{ 0x0000, "active_vo_lockouts" }, +{ 0x0000, "active_wait_spread" }, +{ 0x0000, "activecounteruavs" }, +{ 0x0000, "activefriendlyspawn" }, +{ 0x0000, "activegrenadetimer" }, +{ 0x0000, "activehordedefendlocs" }, +{ 0x0000, "activenodes" }, +{ 0x0000, "activeplayers" }, +{ 0x0000, "activestyle" }, +{ 0x0000, "activetarget" }, +{ 0x0000, "activeuavs" }, +{ 0x0000, "activeweapon" }, +{ 0x0000, "actor_alarm_guard" }, +{ 0x0000, "actor_anims" }, +{ 0x0000, "actor_playscene_walker_stepover_cormack" }, +{ 0x0000, "actor_playscene_walker_stepover_jackson" }, +{ 0x0000, "actor_playscene_walker_stepover_will" }, +{ 0x0000, "actual_spawn" }, +{ 0x0000, "ad_offset_position_from_tag" }, +{ 0x0000, "add_abort" }, +{ 0x0000, "add_agents_to_game" }, +{ 0x0000, "add_ai_to_colors" }, +{ 0x0000, "add_and_select_entity" }, +{ 0x0000, "add_animation" }, +{ 0x0000, "add_animsound" }, +{ 0x0000, "add_array_to_destructible" }, +{ 0x0000, "add_avatar" }, +{ 0x0000, "add_basement_enemy_flashlight" }, +{ 0x0000, "add_bcs_location_mapping" }, +{ 0x0000, "add_breach_func" }, +{ 0x0000, "add_burke_flashlight" }, +{ 0x0000, "add_button" }, +{ 0x0000, "add_c4_glow" }, +{ 0x0000, "add_call" }, +{ 0x0000, "add_capture_enemy_momentum" }, +{ 0x0000, "add_capture_friendly_momentum" }, +{ 0x0000, "add_cellphone_notetracks" }, +{ 0x0000, "add_cheap_flashlight" }, +{ 0x0000, "add_cleanup_ent" }, +{ 0x0000, "add_collision_offsets_to_path_ent" }, +{ 0x0000, "add_collision_to_path" }, +{ 0x0000, "add_collision_to_path_node" }, +{ 0x0000, "add_contrail" }, +{ 0x0000, "add_control_based_hint_strings" }, +{ 0x0000, "add_coop_scene_models" }, +{ 0x0000, "add_cover_node" }, +{ 0x0000, "add_damage_function" }, +{ 0x0000, "add_damage_fx" }, +{ 0x0000, "add_damage_owner_recorder" }, +{ 0x0000, "add_damagefeedback" }, +{ 0x0000, "add_dds_category" }, +{ 0x0000, "add_dds_category_axis" }, +{ 0x0000, "add_dds_category_group" }, +{ 0x0000, "add_dds_category_group_axis" }, +{ 0x0000, "add_dds_countryid" }, +{ 0x0000, "add_debug_element" }, +{ 0x0000, "add_destructible_fx" }, +{ 0x0000, "add_destructible_to_frame_queue" }, +{ 0x0000, "add_destructible_type_function" }, +{ 0x0000, "add_destructible_type_transient" }, +{ 0x0000, "add_dialogue_line" }, +{ 0x0000, "add_doc_civ_walla" }, +{ 0x0000, "add_drone_to_squad" }, +{ 0x0000, "add_earthquake" }, +{ 0x0000, "add_endon" }, +{ 0x0000, "add_enemy_flashlight" }, +{ 0x0000, "add_extra_autosave_check" }, +{ 0x0000, "add_fractional_data_point" }, +{ 0x0000, "add_func" }, +{ 0x0000, "add_fx" }, +{ 0x0000, "add_global_spawn_function" }, +{ 0x0000, "add_greece_starts" }, +{ 0x0000, "add_hint_background" }, +{ 0x0000, "add_hint_string" }, +{ 0x0000, "add_hovertank_turret" }, +{ 0x0000, "add_hud_line" }, +{ 0x0000, "add_hudelm_position_internal" }, +{ 0x0000, "add_humanoid_agent" }, +{ 0x0000, "add_idle_control" }, +{ 0x0000, "add_jav_glow" }, +{ 0x0000, "add_kb_button" }, +{ 0x0000, "add_key" }, +{ 0x0000, "add_key_to_destructible" }, +{ 0x0000, "add_keypairs_to_destructible" }, +{ 0x0000, "add_kill_enemy_minion_momentum" }, +{ 0x0000, "add_kill_enemy_momentum" }, +{ 0x0000, "add_kill_friendly_minion_momentum" }, +{ 0x0000, "add_kill_friendly_momentum" }, +{ 0x0000, "add_lock_target" }, +{ 0x0000, "add_mag_move_notetracks" }, +{ 0x0000, "add_momentum" }, +{ 0x0000, "add_moving_obstacle" }, +{ 0x0000, "add_moving_vol_to_node" }, +{ 0x0000, "add_name" }, +{ 0x0000, "add_no_game_starts" }, +{ 0x0000, "add_node_to_global_arrays" }, +{ 0x0000, "add_noself_call" }, +{ 0x0000, "add_note_track_data" }, +{ 0x0000, "add_notetrack_and_get_index" }, +{ 0x0000, "add_notetrack_array" }, +{ 0x0000, "add_object_to_tactics_system" }, +{ 0x0000, "add_objective" }, +{ 0x0000, "add_option_to_selected_entities" }, +{ 0x0000, "add_party_member_class_change" }, +{ 0x0000, "add_passenger_to_player_pitbull" }, +{ 0x0000, "add_path_node" }, +{ 0x0000, "add_path_weights" }, +{ 0x0000, "add_phrase_to_history" }, +{ 0x0000, "add_player_flashlight" }, +{ 0x0000, "add_proccess_trigger" }, +{ 0x0000, "add_random_killspawner_to_spawngroup" }, +{ 0x0000, "add_reactive_fx" }, +{ 0x0000, "add_replace_after_load_done" }, +{ 0x0000, "add_reverb" }, +{ 0x0000, "add_rpg_to_tactics_system" }, +{ 0x0000, "add_scene_model" }, +{ 0x0000, "add_script_car" }, +{ 0x0000, "add_shake_and_rumble_notetracks" }, +{ 0x0000, "add_shake_and_rumble_notetracks_for_gra"... }, +{ 0x0000, "add_shake_and_rumble_notetracks_for_jum"... }, +{ 0x0000, "add_sit_load_ak_notetracks" }, +{ 0x0000, "add_slowmo_breach_custom_function" }, +{ 0x0000, "add_slowmo_breacher" }, +{ 0x0000, "add_smoking_notetracks" }, +{ 0x0000, "add_spawn_behavior" }, +{ 0x0000, "add_spawn_function" }, +{ 0x0000, "add_spawn_function_to_noteworthy" }, +{ 0x0000, "add_spawn_function_to_targetname" }, +{ 0x0000, "add_spawner_to_global_arrays" }, +{ 0x0000, "add_start" }, +{ 0x0000, "add_start_assert" }, +{ 0x0000, "add_start_construct" }, +{ 0x0000, "add_struct_to_global_array" }, +{ 0x0000, "add_swarm_repulsor_for_ally" }, +{ 0x0000, "add_target_on_dot" }, +{ 0x0000, "add_target_on_los" }, +{ 0x0000, "add_target_pivot" }, +{ 0x0000, "add_to_animsound" }, +{ 0x0000, "add_to_array" }, +{ 0x0000, "add_to_bot_damage_targets" }, +{ 0x0000, "add_to_bot_use_targets" }, +{ 0x0000, "add_to_destroyed_count" }, +{ 0x0000, "add_to_dialogue" }, +{ 0x0000, "add_to_dialogue_generic" }, +{ 0x0000, "add_to_flock" }, +{ 0x0000, "add_to_group_civilian" }, +{ 0x0000, "add_to_group_enemy" }, +{ 0x0000, "add_to_javelin_targeting" }, +{ 0x0000, "add_to_radio" }, +{ 0x0000, "add_to_spawngroup" }, +{ 0x0000, "add_to_threat_bias" }, +{ 0x0000, "add_tokens_to_trigger_flags" }, +{ 0x0000, "add_trace_fx" }, +{ 0x0000, "add_trace_fx_proc" }, +{ 0x0000, "add_trigger_func_thread" }, +{ 0x0000, "add_trigger_function" }, +{ 0x0000, "add_turret_on_dismount" }, +{ 0x0000, "add_vehicle_anim" }, +{ 0x0000, "add_vehicle_player_anim" }, +{ 0x0000, "add_vision_set" }, +{ 0x0000, "add_vision_sets_from_triggers" }, +{ 0x0000, "add_vol_to_node" }, +{ 0x0000, "add_volume_to_global_arrays" }, +{ 0x0000, "add_wait" }, +{ 0x0000, "add_wait_asserter" }, +{ 0x0000, "add_warbird_cargo" }, +{ 0x0000, "add_weapon" }, +{ 0x0000, "add_z" }, +{ 0x0000, "addactioncovermealiasex" }, +{ 0x0000, "addactivecounteruav" }, +{ 0x0000, "addactiveuav" }, +{ 0x0000, "addaieventlistener_func" }, +{ 0x0000, "addairexplosion" }, +{ 0x0000, "addallowedthreatcallout" }, +{ 0x0000, "addalternatespawnpoint" }, +{ 0x0000, "addarmorypoints" }, +{ 0x0000, "addattachments" }, +{ 0x0000, "addattacker" }, +{ 0x0000, "addautomaticattachments" }, +{ 0x0000, "addcalloutresponseevent" }, +{ 0x0000, "addcastname" }, +{ 0x0000, "addcenterdual" }, +{ 0x0000, "addcenterheading" }, +{ 0x0000, "addcenterimage" }, +{ 0x0000, "addcentername" }, +{ 0x0000, "addcenternamedouble" }, +{ 0x0000, "addcentersubtitle" }, +{ 0x0000, "addcentertriple" }, +{ 0x0000, "addcheckfirealias" }, +{ 0x0000, "addchild" }, +{ 0x0000, "addcollisiontopool" }, +{ 0x0000, "addconcatdirectionalias" }, +{ 0x0000, "addconcattargetalias" }, +{ 0x0000, "addcratetype" }, +{ 0x0000, "addcratetypes_standard" }, +{ 0x0000, "adddeathicon" }, +{ 0x0000, "adddropmarker" }, +{ 0x0000, "added_aerial_links" }, +{ 0x0000, "addedtowave" }, +{ 0x0000, "addgap" }, +{ 0x0000, "addgrenadethrowanimoffset" }, +{ 0x0000, "addhinttrigger" }, +{ 0x0000, "addhostileburstalias" }, +{ 0x0000, "addinformalias" }, +{ 0x0000, "addinformevent" }, +{ 0x0000, "addinformreloadingaliasex" }, +{ 0x0000, "additional_delete_cars" }, +{ 0x0000, "additional_geo" }, +{ 0x0000, "additional_tactical_logic_func" }, +{ 0x0000, "additional_unlink_nodes" }, +{ 0x0000, "additionalassets" }, +{ 0x0000, "additionalsighttraceentities" }, +{ 0x0000, "additionalvo" }, +{ 0x0000, "additive_pain" }, +{ 0x0000, "additive_pull_weight" }, +{ 0x0000, "additiverotateroot" }, +{ 0x0000, "additiveturretdriveidle" }, +{ 0x0000, "additiveturretfire" }, +{ 0x0000, "additiveturretidle" }, +{ 0x0000, "additiveturretrotateleft" }, +{ 0x0000, "additiveturretrotateright" }, +{ 0x0000, "additiveusegunroot" }, +{ 0x0000, "addlastperks" }, +{ 0x0000, "addlaunchers" }, +{ 0x0000, "addleftname" }, +{ 0x0000, "addlefttitle" }, +{ 0x0000, "addlevel" }, +{ 0x0000, "addlightningexploder" }, +{ 0x0000, "addlowermessage" }, +{ 0x0000, "addmovecombataliasex" }, +{ 0x0000, "addmovenoncombataliasex" }, +{ 0x0000, "addnamealias" }, +{ 0x0000, "addnamealiasex" }, +{ 0x0000, "addnodestobechecked" }, +{ 0x0000, "addnotetrack_animsound" }, +{ 0x0000, "addnotetrack_attach" }, +{ 0x0000, "addnotetrack_customfunction" }, +{ 0x0000, "addnotetrack_detach" }, +{ 0x0000, "addnotetrack_detach_gun" }, +{ 0x0000, "addnotetrack_df" }, +{ 0x0000, "addnotetrack_dialogue" }, +{ 0x0000, "addnotetrack_flag" }, +{ 0x0000, "addnotetrack_flag_clear" }, +{ 0x0000, "addnotetrack_lui_notify" }, +{ 0x0000, "addnotetrack_notify" }, +{ 0x0000, "addnotetrack_playersound" }, +{ 0x0000, "addnotetrack_set_omnvar" }, +{ 0x0000, "addnotetrack_sound" }, +{ 0x0000, "addnotetrack_startfxontag" }, +{ 0x0000, "addnotetrack_stopfxontag" }, +{ 0x0000, "addnotetrack_swapparttoefx" }, +{ 0x0000, "addnotetrack_tracepartforefx" }, +{ 0x0000, "addofficertosquad" }, +{ 0x0000, "addonstart_animsound" }, +{ 0x0000, "addoption" }, +{ 0x0000, "addorderalias" }, +{ 0x0000, "addorderevent" }, +{ 0x0000, "addplanetolist" }, +{ 0x0000, "addplayernamealias" }, +{ 0x0000, "addplayertosquad" }, +{ 0x0000, "addpossiblethreatcallout" }, +{ 0x0000, "addposteventgeotocratebadplacearray" }, +{ 0x0000, "addprereq" }, +{ 0x0000, "addrankalias" }, +{ 0x0000, "addreactionalias" }, +{ 0x0000, "addreactionevent" }, +{ 0x0000, "addresponsealias" }, +{ 0x0000, "addresponseevent" }, +{ 0x0000, "addresponseevent_internal" }, +{ 0x0000, "addrightname" }, +{ 0x0000, "addrighttitle" }, +{ 0x0000, "addsafetyhealth" }, +{ 0x0000, "addsituationalcombatorder" }, +{ 0x0000, "addsituationalorder" }, +{ 0x0000, "addspace" }, +{ 0x0000, "addspacesmall" }, +{ 0x0000, "addspawnpoints" }, +{ 0x0000, "addspeaker" }, +{ 0x0000, "addstartspawnpoints" }, +{ 0x0000, "addstreaksupportprompt" }, +{ 0x0000, "addsubleftname" }, +{ 0x0000, "addsublefttitle" }, +{ 0x0000, "addtakingfirealias" }, +{ 0x0000, "addtauntalias" }, +{ 0x0000, "addthreatalias" }, +{ 0x0000, "addthreatcalloutalias" }, +{ 0x0000, "addthreatcalloutecho" }, +{ 0x0000, "addthreatcalloutlandmarkalias" }, +{ 0x0000, "addthreatcalloutlocationalias" }, +{ 0x0000, "addthreatcalloutqa_nextline" }, +{ 0x0000, "addthreatcalloutresponsealias" }, +{ 0x0000, "addthreatdistancealias" }, +{ 0x0000, "addthreatelevationalias" }, +{ 0x0000, "addthreatevent" }, +{ 0x0000, "addthreatexposedalias" }, +{ 0x0000, "addthreatobviousalias" }, +{ 0x0000, "addtime" }, +{ 0x0000, "addtoalivecount" }, +{ 0x0000, "addtobaseangle" }, +{ 0x0000, "addtobattlebuddywaitlist" }, +{ 0x0000, "addtocarepackagedronelist" }, +{ 0x0000, "addtocharactersarray" }, +{ 0x0000, "addtodeletespike" }, +{ 0x0000, "addtoexplosivedronelist" }, +{ 0x0000, "addtohelilist" }, +{ 0x0000, "addtolittlebirdlist" }, +{ 0x0000, "addtolivescount" }, +{ 0x0000, "addtoparticipantsarray" }, +{ 0x0000, "addtosquad" }, +{ 0x0000, "addtosystem" }, +{ 0x0000, "addtoteam" }, +{ 0x0000, "addtoteamcount" }, +{ 0x0000, "addtototalspawned" }, +{ 0x0000, "addtotrackingdronelist" }, +{ 0x0000, "addtoturretlist" }, +{ 0x0000, "addtowavespawner" }, +{ 0x0000, "addturret" }, +{ 0x0000, "adduavmodel" }, +{ 0x0000, "aden_key_fr" }, +{ 0x0000, "adjust_angles_to_player" }, +{ 0x0000, "adjust_bounce_lookahead" }, +{ 0x0000, "adjust_gravity" }, +{ 0x0000, "adjust_model_speed_to_node" }, +{ 0x0000, "adjust_pitbull_add_idle" }, +{ 0x0000, "adjustallyaccuracyovertime" }, +{ 0x0000, "adjustfov" }, +{ 0x0000, "adjustlink" }, +{ 0x0000, "adjustmissileoverlay" }, +{ 0x0000, "adjustshadowcenter" }, +{ 0x0000, "adjuststaticoverlay" }, +{ 0x0000, "adrenaline" }, +{ 0x0000, "adrenaline_col" }, +{ 0x0000, "adrenaline_speed_scalar" }, +{ 0x0000, "adrenalineinit" }, +{ 0x0000, "adrenalinesettings" }, +{ 0x0000, "adrenalinesupport" }, +{ 0x0000, "adrone_condition_callback_to_state_deat"... }, +{ 0x0000, "adrone_condition_callback_to_state_dest"... }, +{ 0x0000, "adrone_condition_callback_to_state_dist"... }, +{ 0x0000, "adrone_condition_callback_to_state_flyb"... }, +{ 0x0000, "adrone_condition_callback_to_state_flyi"... }, +{ 0x0000, "adrone_condition_callback_to_state_flyo"... }, +{ 0x0000, "adrone_condition_callback_to_state_hove"... }, +{ 0x0000, "adrone_condition_callback_to_state_off" }, +{ 0x0000, "ads" }, +{ 0x0000, "ads_hint" }, +{ 0x0000, "ads_hint_breakout" }, +{ 0x0000, "ads_hint_breakout_think" }, +{ 0x0000, "ads_hint_clear" }, +{ 0x0000, "ads_hint_display" }, +{ 0x0000, "ads_on" }, +{ 0x0000, "adsmonitor" }, +{ 0x0000, "adstime" }, +{ 0x0000, "advance_bones_and_joker_intro" }, +{ 0x0000, "advance_gideon_if_player_ahead" }, +{ 0x0000, "advance_regardless_of_numbers" }, +{ 0x0000, "advancedtraverse" }, +{ 0x0000, "advancedtraverse2" }, +{ 0x0000, "advancedwindowtraverse" }, +{ 0x0000, "advanceonhidingenemy" }, +{ 0x0000, "advancetoenemygroup" }, +{ 0x0000, "advancetoenemygroupmax" }, +{ 0x0000, "advancetoenemyinterval" }, +{ 0x0000, "aerial_danger_exists_for" }, +{ 0x0000, "aerial_dangers_monitoring" }, +{ 0x0000, "aerial_group" }, +{ 0x0000, "aerial_neighbors" }, +{ 0x0000, "aerial_pathnode_group_connect_dist" }, +{ 0x0000, "aerial_pathnode_offset" }, +{ 0x0000, "aerial_pathnodes" }, +{ 0x0000, "aerial_pathnodes_force_connect" }, +{ 0x0000, "aerialdrone" }, +{ 0x0000, "aerialkillstreakmarker" }, +{ 0x0000, "affected" }, +{ 0x0000, "afk" }, +{ 0x0000, "after_collpase_ents" }, +{ 0x0000, "afterlandanim" }, +{ 0x0000, "afterlandanimconnected" }, +{ 0x0000, "aftermath_anims" }, +{ 0x0000, "agent_damage_finished" }, +{ 0x0000, "agent_funcs" }, +{ 0x0000, "agent_gameparticipant" }, +{ 0x0000, "agent_override_difficulty" }, +{ 0x0000, "agent_player_conf_think" }, +{ 0x0000, "agent_player_dom_think" }, +{ 0x0000, "agent_player_sd_think" }, +{ 0x0000, "agent_squadmember_conf_think" }, +{ 0x0000, "agent_squadmember_dom_think" }, +{ 0x0000, "agent_teamparticipant" }, +{ 0x0000, "agent_type" }, +{ 0x0000, "agentarray" }, +{ 0x0000, "agentbody" }, +{ 0x0000, "agentcostumetablename" }, +{ 0x0000, "agentdogbark" }, +{ 0x0000, "agentdogthink" }, +{ 0x0000, "agentfunc" }, +{ 0x0000, "aggresivelookat" }, +{ 0x0000, "aggressivemode" }, +{ 0x0000, "aggro_target" }, +{ 0x0000, "ah_delay_playerseek" }, +{ 0x0000, "ah_fast_body_cleanup" }, +{ 0x0000, "ah_init_track_block" }, +{ 0x0000, "ah_init_track_doors" }, +{ 0x0000, "ah_morgue_doors" }, +{ 0x0000, "ah_morgue_threat_proc" }, +{ 0x0000, "ah_move_track_block" }, +{ 0x0000, "ah_player_bodybag_slowdown" }, +{ 0x0000, "ah_track_door_open" }, +{ 0x0000, "ah_tranistion_doors" }, +{ 0x0000, "ai" }, +{ 0x0000, "ai_3d_sighting_model" }, +{ 0x0000, "ai_add_player_only_damage" }, +{ 0x0000, "ai_add_twenty_percent_damage" }, +{ 0x0000, "ai_ally_mb_intro_anim" }, +{ 0x0000, "ai_animate_props_on_death" }, +{ 0x0000, "ai_array" }, +{ 0x0000, "ai_array_killcount_flag_set" }, +{ 0x0000, "ai_boat_bow_splash_fx" }, +{ 0x0000, "ai_boat_water_foamfx" }, +{ 0x0000, "ai_canal_combat_01_accuracy_think" }, +{ 0x0000, "ai_canal_combat_02_accuracy_think" }, +{ 0x0000, "ai_canal_combat_03_accuracy_think" }, +{ 0x0000, "ai_canal_combat_04_accuracy_think" }, +{ 0x0000, "ai_canal_combat_05_accuracy_think" }, +{ 0x0000, "ai_charged_shot_wait_for_death" }, +{ 0x0000, "ai_classname_in_level" }, +{ 0x0000, "ai_classname_in_level_keys" }, +{ 0x0000, "ai_clear_custom_animation_reaction" }, +{ 0x0000, "ai_clear_custom_animation_reaction_and_"... }, +{ 0x0000, "ai_cond_player_at_ambient_battle" }, +{ 0x0000, "ai_cond_player_at_escape_battle" }, +{ 0x0000, "ai_cond_player_at_pitbull_battle" }, +{ 0x0000, "ai_cond_player_at_police_battle" }, +{ 0x0000, "ai_cond_player_at_standoff_battle" }, +{ 0x0000, "ai_cond_player_at_standoff_battle_or_da"... }, +{ 0x0000, "ai_cond_player_at_tanker_battle" }, +{ 0x0000, "ai_cond_player_at_van" }, +{ 0x0000, "ai_cond_reached_goal" }, +{ 0x0000, "ai_cond_reached_path_end" }, +{ 0x0000, "ai_create_behavior_function" }, +{ 0x0000, "ai_damage_think" }, +{ 0x0000, "ai_deathflag" }, +{ 0x0000, "ai_delete_self" }, +{ 0x0000, "ai_delete_when_out_of_sight" }, +{ 0x0000, "ai_detect_charged_damage" }, +{ 0x0000, "ai_detection" }, +{ 0x0000, "ai_detection_timeout" }, +{ 0x0000, "ai_disable_swim_or_underwater_walk" }, +{ 0x0000, "ai_diveboat_foam_trail" }, +{ 0x0000, "ai_diveboats_chase_trail" }, +{ 0x0000, "ai_dont_glow_in_thermal" }, +{ 0x0000, "ai_empty" }, +{ 0x0000, "ai_enable_swim_or_underwater_walk" }, +{ 0x0000, "ai_end_fixed_node" }, +{ 0x0000, "ai_end_ignore_all" }, +{ 0x0000, "ai_end_ignore_me" }, +{ 0x0000, "ai_end_magic_bullet_shield" }, +{ 0x0000, "ai_flee_from_microwave" }, +{ 0x0000, "ai_func_override" }, +{ 0x0000, "ai_functions" }, +{ 0x0000, "ai_game_mode" }, +{ 0x0000, "ai_gd" }, +{ 0x0000, "ai_get_behavior_function" }, +{ 0x0000, "ai_go_to_goal_before_colors" }, +{ 0x0000, "ai_ignore_everything" }, +{ 0x0000, "ai_ignore_foliage_for_time" }, +{ 0x0000, "ai_init" }, +{ 0x0000, "ai_jump_over_40_down_88" }, +{ 0x0000, "ai_kill" }, +{ 0x0000, "ai_kill_no_ragdoll" }, +{ 0x0000, "ai_kill_when_out_of_sight" }, +{ 0x0000, "ai_lasers" }, +{ 0x0000, "ai_lobby_think" }, +{ 0x0000, "ai_mantle_over_low_cover_40" }, +{ 0x0000, "ai_mb1" }, +{ 0x0000, "ai_mb1_allywarp" }, +{ 0x0000, "ai_mb1_drones" }, +{ 0x0000, "ai_mb1_first_guard_fallback" }, +{ 0x0000, "ai_mb1_jumpdown_guards" }, +{ 0x0000, "ai_mb1_script_end" }, +{ 0x0000, "ai_mb2" }, +{ 0x0000, "ai_mb2_drones" }, +{ 0x0000, "ai_mb2_enemies_run" }, +{ 0x0000, "ai_mb2_enemyrun" }, +{ 0x0000, "ai_mb2_gate" }, +{ 0x0000, "ai_mb2_mech_watcher" }, +{ 0x0000, "ai_mb2_remove_stencils" }, +{ 0x0000, "ai_mb2_script_end" }, +{ 0x0000, "ai_message_handler_hidden" }, +{ 0x0000, "ai_message_handler_spotted" }, +{ 0x0000, "ai_mode" }, +{ 0x0000, "ai_motorpool_animation" }, +{ 0x0000, "ai_notify" }, +{ 0x0000, "ai_number" }, +{ 0x0000, "ai_player_only_damage_func" }, +{ 0x0000, "ai_remove_outline_waiter" }, +{ 0x0000, "ai_remove_player_only_damage" }, +{ 0x0000, "ai_remove_twenty_percent_damage" }, +{ 0x0000, "ai_restore_ignore_setting" }, +{ 0x0000, "ai_run_behavior_until_condition" }, +{ 0x0000, "ai_save_ignore_setting" }, +{ 0x0000, "ai_set_custom_animation_reaction" }, +{ 0x0000, "ai_set_goback_override_function" }, +{ 0x0000, "ai_sets_goal" }, +{ 0x0000, "ai_shoot_missile" }, +{ 0x0000, "ai_shoot_missile_salvo" }, +{ 0x0000, "ai_shot_by_player_team_notify" }, +{ 0x0000, "ai_should_be_added" }, +{ 0x0000, "ai_silo_floor_01_balcony" }, +{ 0x0000, "ai_silo_floor_01_wave_2_think" }, +{ 0x0000, "ai_silo_floor_01_wave_3_think" }, +{ 0x0000, "ai_silo_think" }, +{ 0x0000, "ai_slide_across_car" }, +{ 0x0000, "ai_special_retreat_watcher" }, +{ 0x0000, "ai_start_balcony_death" }, +{ 0x0000, "ai_start_ignore_all" }, +{ 0x0000, "ai_start_ignore_me" }, +{ 0x0000, "ai_start_magic_bullet_shield" }, +{ 0x0000, "ai_start_pacifist" }, +{ 0x0000, "ai_start_respawn_death" }, +{ 0x0000, "ai_stealth_pause_handler" }, +{ 0x0000, "ai_step_up_32" }, +{ 0x0000, "ai_stop_death_function" }, +{ 0x0000, "ai_stun" }, +{ 0x0000, "ai_swim_death" }, +{ 0x0000, "ai_swim_pain" }, +{ 0x0000, "ai_target" }, +{ 0x0000, "ai_target_force" }, +{ 0x0000, "ai_target_force_damaged" }, +{ 0x0000, "ai_target_force_scripted" }, +{ 0x0000, "ai_thermal" }, +{ 0x0000, "ai_toggle_cloak" }, +{ 0x0000, "ai_toggle_cloak_animate" }, +{ 0x0000, "ai_toggle_cloak_complete_vo" }, +{ 0x0000, "ai_toggle_cloak_start_vo" }, +{ 0x0000, "ai_twenty_percent_damage_func" }, +{ 0x0000, "ai_unignore_everything" }, +{ 0x0000, "ai_wading_footsteps" }, +{ 0x0000, "ai_wait_go" }, +{ 0x0000, "ai_water_footstep" }, +{ 0x0000, "ai_water_set_depth" }, +{ 0x0000, "ai_wave_monitor_retreat" }, +{ 0x0000, "ai_wave_monitor_threshold" }, +{ 0x0000, "ai_wave_setgoalvolume" }, +{ 0x0000, "ai_wave_spawn" }, +{ 0x0000, "ai_wave_spawn_volume" }, +{ 0x0000, "ai_wave_spawn_volume_threshold" }, +{ 0x0000, "ai_wave_spawn_volume_threshold_retreat" }, +{ 0x0000, "aianim_simple" }, +{ 0x0000, "aianim_simple_vehicle" }, +{ 0x0000, "aiareintheroom" }, +{ 0x0000, "aiarraydeleteonflag" }, +{ 0x0000, "aiarrayfallbackonflag" }, +{ 0x0000, "aiarrayidleloop" }, +{ 0x0000, "aiarraymovetonewidlepos" }, +{ 0x0000, "aiarrayoverridemodelrandom" }, +{ 0x0000, "aiattack" }, +{ 0x0000, "aibattlechatterloop" }, +{ 0x0000, "aicount" }, +{ 0x0000, "aideathenemy" }, +{ 0x0000, "aideatheventthread" }, +{ 0x0000, "aideathfriendly" }, +{ 0x0000, "aideleteonflag" }, +{ 0x0000, "aidisablestealthcombat" }, +{ 0x0000, "aidisplacewaiter" }, +{ 0x0000, "aienablestealthcombat" }, +{ 0x0000, "aienabletotalcombat" }, +{ 0x0000, "aifallbackonflag" }, +{ 0x0000, "aifollow" }, +{ 0x0000, "aifolloworderwaiter" }, +{ 0x0000, "aigrenadedangerwaiter" }, +{ 0x0000, "aigroup_create" }, +{ 0x0000, "aigroup_soldierthink" }, +{ 0x0000, "aigroup_spawnerdeath" }, +{ 0x0000, "aigroup_spawnerempty" }, +{ 0x0000, "aigroup_spawnerthink" }, +{ 0x0000, "aihasweapon" }, +{ 0x0000, "aihostileburstloop" }, +{ 0x0000, "aiidleloop" }, +{ 0x0000, "aiidleloopdisable" }, +{ 0x0000, "aiinwater" }, +{ 0x0000, "aikilleventthread" }, +{ 0x0000, "aikills" }, +{ 0x0000, "aim_accel_turnrate_lerp" }, +{ 0x0000, "aim_additives_think" }, +{ 0x0000, "aim_assist_bmodel" }, +{ 0x0000, "aim_assist_using_bmodels_init" }, +{ 0x0000, "aim_assist_with_bmodels" }, +{ 0x0000, "aim_at_my_attacker" }, +{ 0x0000, "aim_axis_of_selected_ents" }, +{ 0x0000, "aim_burke_at_angles" }, +{ 0x0000, "aim_hud" }, +{ 0x0000, "aim_hud_on" }, +{ 0x0000, "aim_test" }, +{ 0x0000, "aim_turnrate_pitch" }, +{ 0x0000, "aim_turnrate_pitch_ads" }, +{ 0x0000, "aim_turnrate_yaw" }, +{ 0x0000, "aim_turnrate_yaw_ads" }, +{ 0x0000, "aim_turret_at_ambush_point_or_visible_e"... }, +{ 0x0000, "aim_while_moving_thread" }, +{ 0x0000, "aimassist_target" }, +{ 0x0000, "aimblendtime" }, +{ 0x0000, "aimbutdontshoot" }, +{ 0x0000, "aimedatshootentorpos" }, +{ 0x0000, "aimedsomewhatatenemy" }, +{ 0x0000, "aimfaryawtolerance" }, +{ 0x0000, "aimidlethread" }, +{ 0x0000, "aimovetonewidlepos" }, +{ 0x0000, "aimpitchdifftolerance" }, +{ 0x0000, "aimsetupblendtime" }, +{ 0x0000, "aimtarget" }, +{ 0x0000, "aimweight" }, +{ 0x0000, "aimweight_end" }, +{ 0x0000, "aimweight_start" }, +{ 0x0000, "aimweight_t" }, +{ 0x0000, "aimweight_transframes" }, +{ 0x0000, "aimyawdiffclosedistsq" }, +{ 0x0000, "aimyawdiffclosetolerance" }, +{ 0x0000, "aimyawdifffartolerance" }, +{ 0x0000, "ainame" }, +{ 0x0000, "ainameandrankwaiter" }, +{ 0x0000, "aiofficerorders" }, +{ 0x0000, "aioverridemodel" }, +{ 0x0000, "aioverridemodelrandom" }, +{ 0x0000, "aiowner" }, +{ 0x0000, "air_strip_ambient_a10_gun_dive_1" }, +{ 0x0000, "air_strip_ambient_a10_gun_dive_2" }, +{ 0x0000, "air_strip_ambient_a10_gun_dive_3" }, +{ 0x0000, "air_strip_ambient_dogfight_1" }, +{ 0x0000, "air_strip_ambient_dogfight_2" }, +{ 0x0000, "air_strip_ambient_dogfight_3" }, +{ 0x0000, "airank" }, +{ 0x0000, "airbrake_hint" }, +{ 0x0000, "aircraft_wash" }, +{ 0x0000, "aircraft_wash_thread" }, +{ 0x0000, "airdropcratecollision" }, +{ 0x0000, "airplane_list" }, +{ 0x0000, "airstrike_drones" }, +{ 0x0000, "airstrike_earthquake" }, +{ 0x0000, "airstrike_flares_monitor" }, +{ 0x0000, "airstrikefx" }, +{ 0x0000, "airstrikeinprogress" }, +{ 0x0000, "airstrikeoverrides" }, +{ 0x0000, "airstriketype" }, +{ 0x0000, "airtoairevent" }, +{ 0x0000, "airtogroundevent" }, +{ 0x0000, "aistartusingassaultvehicle" }, +{ 0x0000, "aispread" }, +{ 0x0000, "aistate" }, +{ 0x0000, "aistealthcombatenemygotocover" }, +{ 0x0000, "aisuppressai" }, +{ 0x0000, "aithreadthreader" }, +{ 0x0000, "aiturnnotifies" }, +{ 0x0000, "aitype_check" }, +{ 0x0000, "aiupdateanimstate" }, +{ 0x0000, "aiupdatecombat" }, +{ 0x0000, "aiupdatesuppressed" }, +{ 0x0000, "aiweapon" }, +{ 0x0000, "ajani" }, +{ 0x0000, "akimboweaponent" }, +{ 0x0000, "alarm_annoyance" }, +{ 0x0000, "alarm_create_loops" }, +{ 0x0000, "alarm_enable" }, +{ 0x0000, "alarm_guid" }, +{ 0x0000, "alarm_interval" }, +{ 0x0000, "alarm_is_playing" }, +{ 0x0000, "alarm_monitor_cleanup" }, +{ 0x0000, "alarm_on" }, +{ 0x0000, "alarm_playing" }, +{ 0x0000, "alarm_reverb_distance_mix" }, +{ 0x0000, "alarm_start" }, +{ 0x0000, "alarm_start_loops" }, +{ 0x0000, "alarm_stop_loops" }, +{ 0x0000, "alarm_update_loops" }, +{ 0x0000, "alarm_validate_damage" }, +{ 0x0000, "alarmfx" }, +{ 0x0000, "alarmfx01" }, +{ 0x0000, "alarmsoundent" }, +{ 0x0000, "alarmsystem" }, +{ 0x0000, "alcove_clips" }, +{ 0x0000, "alert_check_function" }, +{ 0x0000, "alert_level" }, +{ 0x0000, "alert_level_table" }, +{ 0x0000, "alert_sound" }, +{ 0x0000, "alert_stop_animating" }, +{ 0x0000, "alert_when_another_is_hurt" }, +{ 0x0000, "alertai" }, +{ 0x0000, "alertaigroup" }, +{ 0x0000, "alertallpoolguards" }, +{ 0x0000, "alerted" }, +{ 0x0000, "alerted_amount" }, +{ 0x0000, "alerted_by_corpse" }, +{ 0x0000, "alertedenemies" }, +{ 0x0000, "alertedentity" }, +{ 0x0000, "alertedinfo" }, +{ 0x0000, "alertface" }, +{ 0x0000, "alertgroup" }, +{ 0x0000, "alerthighlighthudeffect" }, +{ 0x0000, "alerttimedelay" }, +{ 0x0000, "alias" }, +{ 0x0000, "alias_data" }, +{ 0x0000, "alias_name" }, +{ 0x0000, "aliens_make_entity_sentient_func" }, +{ 0x0000, "align_hint_think" }, +{ 0x0000, "alignment_factor" }, +{ 0x0000, "alive" }, +{ 0x0000, "alivecount" }, +{ 0x0000, "aliveplayers" }, +{ 0x0000, "all_avatars_scheduled_for_delete" }, +{ 0x0000, "all_dom_flags" }, +{ 0x0000, "all_exopush_enemies_dead" }, +{ 0x0000, "all_hp_zones" }, +{ 0x0000, "all_players_istouching" }, +{ 0x0000, "all_team_streak_col" }, +{ 0x0000, "all3duiscreens" }, +{ 0x0000, "allboothdisplays" }, +{ 0x0000, "allenemyambushers" }, +{ 0x0000, "allenemypatrollers" }, +{ 0x0000, "allenemyvehicles" }, +{ 0x0000, "allenvarray" }, +{ 0x0000, "alley_1_big_metal_gate" }, +{ 0x0000, "alley_1_complete_dialogue" }, +{ 0x0000, "alley_a_dialogue" }, +{ 0x0000, "alley_b_dialogue" }, +{ 0x0000, "alley_beckon" }, +{ 0x0000, "alley_combat_dialogue" }, +{ 0x0000, "alley_dialogue" }, +{ 0x0000, "alley_ending_point_trigger" }, +{ 0x0000, "alley_fail_dialogue" }, +{ 0x0000, "alley_flank_dialogue" }, +{ 0x0000, "alley_flank_dialogue_nag" }, +{ 0x0000, "alley_gideon_slide" }, +{ 0x0000, "alley_meetup_dialogue" }, +{ 0x0000, "alley_oncoming_dialogue" }, +{ 0x0000, "alley_setup" }, +{ 0x0000, "alley_veh_god_on" }, +{ 0x0000, "alley1_combat" }, +{ 0x0000, "alley1_force_deaths" }, +{ 0x0000, "alley1_kva" }, +{ 0x0000, "alley1_oncoming" }, +{ 0x0000, "alley1_oncoming_burke_alley_enter" }, +{ 0x0000, "alley1_oncoming_goto" }, +{ 0x0000, "alley1_oncoming_grenade_awareness" }, +{ 0x0000, "alley1_oncoming_truck_anims" }, +{ 0x0000, "alley1_oncoming_truck_seq" }, +{ 0x0000, "alley1_oncoming_truck_sweeper_monitor" }, +{ 0x0000, "alley1_oncoming_turret_fire" }, +{ 0x0000, "alley1_oncoming_turret_think" }, +{ 0x0000, "alley1_stage1_combat" }, +{ 0x0000, "alley1_stage1_rooftop_movedown" }, +{ 0x0000, "alley1_stage2_combat" }, +{ 0x0000, "alley1_stage2_combat_flag" }, +{ 0x0000, "alley1_stage3_combat" }, +{ 0x0000, "alley1_stage3_combat_flag" }, +{ 0x0000, "alley1_stage3_refill_think" }, +{ 0x0000, "alley1_veh_destro" }, +{ 0x0000, "alley2_combat" }, +{ 0x0000, "alley2_combat_enemy_vol_assign" }, +{ 0x0000, "alley2_combat_player_monitor" }, +{ 0x0000, "alley2_combat_vol_assign" }, +{ 0x0000, "alley2_jumpers" }, +{ 0x0000, "alley2_jumpers_setup" }, +{ 0x0000, "alley2_kva" }, +{ 0x0000, "alley2_spawner_locator" }, +{ 0x0000, "alley2_stage1_combat" }, +{ 0x0000, "alley2_stage2_combat" }, +{ 0x0000, "alley2_stage3_combat" }, +{ 0x0000, "alleys_distant_emergency_siren_blasts" }, +{ 0x0000, "alleys_distant_euro_siren_loop" }, +{ 0x0000, "alleys_distant_standard_siren_loop" }, +{ 0x0000, "alleys_end_music" }, +{ 0x0000, "alleys_music_end" }, +{ 0x0000, "alleys_rpg_fight_music" }, +{ 0x0000, "alleys_rpg_music" }, +{ 0x0000, "alleys_rpg_music_backup_trigger" }, +{ 0x0000, "alleysallymovement" }, +{ 0x0000, "alleysbegin" }, +{ 0x0000, "alleysbegincombatdialog" }, +{ 0x0000, "alleyscafeanims" }, +{ 0x0000, "alleyscheckifplayerretreated" }, +{ 0x0000, "alleyscombat" }, +{ 0x0000, "alleyscombatbacklinefloodspawns" }, +{ 0x0000, "alleyscombatbacklineleftinteriorfloor1" }, +{ 0x0000, "alleyscombatbacklineleftside" }, +{ 0x0000, "alleyscombatbacklinerightinteriorfloor1" }, +{ 0x0000, "alleyscombatbacklinerightinteriorfloor2" }, +{ 0x0000, "alleyscombatbacklinerightside" }, +{ 0x0000, "alleyscombatenemycountmonitor" }, +{ 0x0000, "alleyscombatenemyorders" }, +{ 0x0000, "alleyscombatenemyretreat" }, +{ 0x0000, "alleyscombatenemysetup" }, +{ 0x0000, "alleyscombatenterbuilding" }, +{ 0x0000, "alleyscombatfinalbldgfloodspawns" }, +{ 0x0000, "alleyscombatfinalbuilding" }, +{ 0x0000, "alleyscombatfinalbuildinginterior" }, +{ 0x0000, "alleyscombatfinalbuildingshotgunners" }, +{ 0x0000, "alleyscombatfrontlinefloodspawns" }, +{ 0x0000, "alleyscombatfrontlineleftbackstairs" }, +{ 0x0000, "alleyscombatfrontlineleftside" }, +{ 0x0000, "alleyscombatfrontlineleftsideinteriorfl"... }, +{ 0x0000, "alleyscombatfrontlinerightbackatm" }, +{ 0x0000, "alleyscombatfrontlinerightside" }, +{ 0x0000, "alleyscombatinteriorfakebulletsactivate" }, +{ 0x0000, "alleyscombatinteriorfakebulletssetup" }, +{ 0x0000, "alleyscombatmidlineleftside" }, +{ 0x0000, "alleyscombatmidlinerightside" }, +{ 0x0000, "alleyscombatmidlinerightsideinterior" }, +{ 0x0000, "alleyscombattriggertoggles" }, +{ 0x0000, "alleysdialogtimer" }, +{ 0x0000, "alleysdronecivilians" }, +{ 0x0000, "alleysdronegawker" }, +{ 0x0000, "alleysenemyretreat" }, +{ 0x0000, "alleysenemyrpg" }, +{ 0x0000, "alleysenemyspawns" }, +{ 0x0000, "alleysflaginit" }, +{ 0x0000, "alleysgatebash" }, +{ 0x0000, "alleysgatebashrumblelight" }, +{ 0x0000, "alleysgateriprumbleheavy" }, +{ 0x0000, "alleysgateripunblockpath" }, +{ 0x0000, "alleysglobalsetup" }, +{ 0x0000, "alleysglobalvars" }, +{ 0x0000, "alleysilanaleadstheway" }, +{ 0x0000, "alleysintroanims" }, +{ 0x0000, "alleysintrotransitiondialogue" }, +{ 0x0000, "alleyskvaintrodialogue" }, +{ 0x0000, "alleysmidpointreminder" }, +{ 0x0000, "alleysmonitorgateriphint" }, +{ 0x0000, "alleysobjectivesetup" }, +{ 0x0000, "alleysprecache" }, +{ 0x0000, "alleysremainingenemies" }, +{ 0x0000, "alleysrpgguyshootfirst" }, +{ 0x0000, "alleyssetcompletedobjflags" }, +{ 0x0000, "alleyssniperpip" }, +{ 0x0000, "alleysspawnrpgenemies" }, +{ 0x0000, "alleysstartpoints" }, +{ 0x0000, "alleysstreettransitiondialogue" }, +{ 0x0000, "alleysvehicleexplodeondeath" }, +{ 0x0000, "alleysvehiclemonitor" }, +{ 0x0000, "alleysvideolog" }, +{ 0x0000, "alleysvisitorcentergate" }, +{ 0x0000, "alleysvisitorcentergatereminder" }, +{ 0x0000, "alleyway_fight_enemies" }, +{ 0x0000, "allfloorpannels" }, +{ 0x0000, "allies_bunker" }, +{ 0x0000, "allies_careful" }, +{ 0x0000, "allies_check_cloak_state" }, +{ 0x0000, "allies_cover_michell" }, +{ 0x0000, "allies_dialog_col" }, +{ 0x0000, "allies_inert" }, +{ 0x0000, "allies_plane" }, +{ 0x0000, "allies_rally_init" }, +{ 0x0000, "allies_s1" }, +{ 0x0000, "allies_s2" }, +{ 0x0000, "allies_start_spawn_name" }, +{ 0x0000, "allies_to_building_exit" }, +{ 0x0000, "allies_to_drone_swarm" }, +{ 0x0000, "allies_to_first_land_assist" }, +{ 0x0000, "allies_to_first_land_assist_debug" }, +{ 0x0000, "allies_to_fob" }, +{ 0x0000, "allies_to_fob_think" }, +{ 0x0000, "allies_to_hill" }, +{ 0x0000, "allies_to_truck_jump" }, +{ 0x0000, "allies_to_weapons_platform_video_log" }, +{ 0x0000, "alliesbreachatrium" }, +{ 0x0000, "alliesbreachatriumonalarm" }, +{ 0x0000, "alliesbreachconfroom" }, +{ 0x0000, "alliescapturing" }, +{ 0x0000, "allieschopper" }, +{ 0x0000, "alliesdrivein" }, +{ 0x0000, "alliesexitatrium" }, +{ 0x0000, "alliesexitconfroom" }, +{ 0x0000, "alliesexittruck" }, +{ 0x0000, "alliesflagcarrierclientnum" }, +{ 0x0000, "alliesflagstatus" }, +{ 0x0000, "alliesparkingdefend" }, +{ 0x0000, "alliesparkingkill" }, +{ 0x0000, "alliesparkingkillalt" }, +{ 0x0000, "alliesparkingkillvictim" }, +{ 0x0000, "alliesparkingsetup" }, +{ 0x0000, "alliesredirect" }, +{ 0x0000, "alliesshootpooltargets" }, +{ 0x0000, "alliesvulnerabletime" }, +{ 0x0000, "allieswarningtime" }, +{ 0x0000, "allow_backstabbers" }, +{ 0x0000, "allow_boost_jump" }, +{ 0x0000, "allow_death_delay" }, +{ 0x0000, "allow_death_during_zipline" }, +{ 0x0000, "allow_death_timer" }, +{ 0x0000, "allow_dog_paired_melee_vs_ai" }, +{ 0x0000, "allow_early_back_out" }, +{ 0x0000, "allow_exo_climb" }, +{ 0x0000, "allow_fake_shooting" }, +{ 0x0000, "allow_pipe_damage" }, +{ 0x0000, "allow_player_hovertank_mount" }, +{ 0x0000, "allow_player_input_1" }, +{ 0x0000, "allow_player_input_2" }, +{ 0x0000, "allow_player_zip" }, +{ 0x0000, "allow_random_killers" }, +{ 0x0000, "allow_swimming" }, +{ 0x0000, "allow_threat_paint" }, +{ 0x0000, "allowable_double_attachments" }, +{ 0x0000, "allowboostingabovetriggerradius" }, +{ 0x0000, "allowcarry" }, +{ 0x0000, "allowclasschoice" }, +{ 0x0000, "allowdronedelivery" }, +{ 0x0000, "allowedcallouts" }, +{ 0x0000, "allowedpartialreloadontheruntime" }, +{ 0x0000, "allowempdamage" }, +{ 0x0000, "allowenemyspectate" }, +{ 0x0000, "allowfauxdeath" }, +{ 0x0000, "allowfreespectate" }, +{ 0x0000, "allowlaststandai" }, +{ 0x0000, "allowlatecomers" }, +{ 0x0000, "allowmeleedamage" }, +{ 0x0000, "allowneutral" }, +{ 0x0000, "allowplayerscore" }, +{ 0x0000, "allowshoot" }, +{ 0x0000, "allowteamchoice" }, +{ 0x0000, "allowtelefrag" }, +{ 0x0000, "allowuse" }, +{ 0x0000, "allowvehicledamage" }, +{ 0x0000, "allowvote" }, +{ 0x0000, "allowweapons" }, +{ 0x0000, "alltargetlogicarray" }, +{ 0x0000, "alltargetmax" }, +{ 0x0000, "alltargetmin" }, +{ 0x0000, "alltargetsarray" }, +{ 0x0000, "alltriggerarray" }, +{ 0x0000, "allvfx_struct" }, +{ 0x0000, "ally" }, +{ 0x0000, "ally_advance_ahead_upon_killing_group" }, +{ 0x0000, "ally_ai_active" }, +{ 0x0000, "ally_alert_vol" }, +{ 0x0000, "ally_anims" }, +{ 0x0000, "ally_determine_move_speed" }, +{ 0x0000, "ally_dynamic_run_set" }, +{ 0x0000, "ally_enable_boost_traversals" }, +{ 0x0000, "ally_fire_on_dam" }, +{ 0x0000, "ally_grapple" }, +{ 0x0000, "ally_jet_shoot_think" }, +{ 0x0000, "ally_move_dynamic_speed" }, +{ 0x0000, "ally_mover" }, +{ 0x0000, "ally_one_handed_grenade_proc" }, +{ 0x0000, "ally_redirect_goto_node" }, +{ 0x0000, "ally_reset_dynamic_speed" }, +{ 0x0000, "ally_s2_squad_member_1" }, +{ 0x0000, "ally_s2_squad_member_2" }, +{ 0x0000, "ally_s2_squad_member_3" }, +{ 0x0000, "ally_s2_squad_member_4" }, +{ 0x0000, "ally_shoot_rpg_at_drones" }, +{ 0x0000, "ally_squad_member_1" }, +{ 0x0000, "ally_squad_member_2" }, +{ 0x0000, "ally_squad_member_3" }, +{ 0x0000, "ally_squad_member_4" }, +{ 0x0000, "ally_stop_dynamic_speed" }, +{ 0x0000, "ally_vo_controller" }, +{ 0x0000, "ally_vo_org" }, +{ 0x0000, "allyagentthink" }, +{ 0x0000, "allybreachconfroomanddie" }, +{ 0x0000, "allyburkeparkingsetup" }, +{ 0x0000, "allyclaimedtarget" }, +{ 0x0000, "allyclearforcegoalonend" }, +{ 0x0000, "allyconfroomdeath" }, +{ 0x0000, "allyexithandlevictim" }, +{ 0x0000, "allyexitpool" }, +{ 0x0000, "allyexittruck" }, +{ 0x0000, "allyinfiltrators" }, +{ 0x0000, "allypoolclimb" }, +{ 0x0000, "allypoolkill" }, +{ 0x0000, "allypoolsetup" }, +{ 0x0000, "allyredirect" }, +{ 0x0000, "allyredirectgotonode" }, +{ 0x0000, "allyredirectnoteworthy" }, +{ 0x0000, "allyscrambleanimations" }, +{ 0x0000, "allysetupconfroom" }, +{ 0x0000, "allysetupstruggle" }, +{ 0x0000, "allyshootpooltarget" }, +{ 0x0000, "allyshootwalkwaytarget" }, +{ 0x0000, "allysquad" }, +{ 0x0000, "allystealthanimations" }, +{ 0x0000, "allystruggleslomo" }, +{ 0x0000, "allystrugglesuccess" }, +{ 0x0000, "allytanks" }, +{ 0x0000, "allywalkwaykill" }, +{ 0x0000, "allywalkwaykillvictim" }, +{ 0x0000, "almost_dead" }, +{ 0x0000, "alpha_leader" }, +{ 0x0000, "alpha_leader_think" }, +{ 0x0000, "alpha_squad" }, +{ 0x0000, "alpha_squad_and_player" }, +{ 0x0000, "alphabetize" }, +{ 0x0000, "alphabetize_localized_string" }, +{ 0x0000, "already_dumpped" }, +{ 0x0000, "already_got_end_level_notetrack" }, +{ 0x0000, "already_ran_function" }, +{ 0x0000, "already_set" }, +{ 0x0000, "already_used" }, +{ 0x0000, "alreadyaddedtoalivecount" }, +{ 0x0000, "alt_rspns_random_test" }, +{ 0x0000, "alt_rspns_test_func" }, +{ 0x0000, "alternates" }, +{ 0x0000, "altmeleedeath" }, +{ 0x0000, "altmeleevictimorientation" }, +{ 0x0000, "always_loop_ents" }, +{ 0x0000, "always_pain" }, +{ 0x0000, "always_sprint" }, +{ 0x0000, "always_wake_drones" }, +{ 0x0000, "alwaysdrawfriendlynames" }, +{ 0x0000, "alwayslookatfirsttarget" }, +{ 0x0000, "alwaysrocketdeath" }, +{ 0x0000, "alwaysrunforward" }, +{ 0x0000, "alwaysstaticout" }, +{ 0x0000, "alwaysusepistol" }, +{ 0x0000, "am_i_hit" }, +{ 0x0000, "am_i_moving" }, +{ 0x0000, "amb_push_oneshots" }, +{ 0x0000, "amb_pushing" }, +{ 0x0000, "amb_sky_combat" }, +{ 0x0000, "amb_sky_combat_setup" }, +{ 0x0000, "ambience" }, +{ 0x0000, "ambience_inner" }, +{ 0x0000, "ambience_outer" }, +{ 0x0000, "ambient_animate" }, +{ 0x0000, "ambient_battle_deployable_cover" }, +{ 0x0000, "ambient_building_fires_fob_drone_swarm" }, +{ 0x0000, "ambient_combat" }, +{ 0x0000, "ambient_combat_allies" }, +{ 0x0000, "ambient_combat_axis" }, +{ 0x0000, "ambient_combat_vo" }, +{ 0x0000, "ambient_deck" }, +{ 0x0000, "ambient_dialogue_manager" }, +{ 0x0000, "ambient_drones" }, +{ 0x0000, "ambient_eq" }, +{ 0x0000, "ambient_explosion_before_landing" }, +{ 0x0000, "ambient_explosion_courtyard" }, +{ 0x0000, "ambient_explosion_dirt_cooling_towers" }, +{ 0x0000, "ambient_explosion_fireball_cooling_towe"... }, +{ 0x0000, "ambient_explosion_play" }, +{ 0x0000, "ambient_explosions" }, +{ 0x0000, "ambient_fan_rotate" }, +{ 0x0000, "ambient_fires_inside_building" }, +{ 0x0000, "ambient_flare_fx" }, +{ 0x0000, "ambient_gas_explosion_loading_zone" }, +{ 0x0000, "ambient_hangar" }, +{ 0x0000, "ambient_hangar_fan_blade_rotate" }, +{ 0x0000, "ambient_hangar_fan_blades_setup" }, +{ 0x0000, "ambient_hangar_workers" }, +{ 0x0000, "ambient_hangar_workers_spawn_settings" }, +{ 0x0000, "ambient_large_pipe_effects_courtyard" }, +{ 0x0000, "ambient_mb1_crane" }, +{ 0x0000, "ambient_mb2_claw_platform" }, +{ 0x0000, "ambient_mb2_crane" }, +{ 0x0000, "ambient_mb2_cranes" }, +{ 0x0000, "ambient_mb2_tanks" }, +{ 0x0000, "ambient_model_fix" }, +{ 0x0000, "ambient_modifier" }, +{ 0x0000, "ambient_police_drone_vo" }, +{ 0x0000, "ambient_police_drones" }, +{ 0x0000, "ambient_reverb" }, +{ 0x0000, "ambient_shrike_flyby" }, +{ 0x0000, "ambient_smk_walkway" }, +{ 0x0000, "ambient_sniper_rockets" }, +{ 0x0000, "ambient_soldier_vo_01" }, +{ 0x0000, "ambient_soldier_vo_02" }, +{ 0x0000, "ambient_soldier_vo_03" }, +{ 0x0000, "ambient_soldier_vo_04" }, +{ 0x0000, "ambient_soldier_vo_05" }, +{ 0x0000, "ambient_soldier_vo_06" }, +{ 0x0000, "ambient_track" }, +{ 0x0000, "ambient_underwater_effects_rescue" }, +{ 0x0000, "ambient_warbird_fire" }, +{ 0x0000, "ambient_warbird_shooting_think" }, +{ 0x0000, "ambient_warbird_wait_to_fire" }, +{ 0x0000, "ambientanimation" }, +{ 0x0000, "ambientcloudskill" }, +{ 0x0000, "ambientcloudsloadin" }, +{ 0x0000, "ambientdelay" }, +{ 0x0000, "ambientevent" }, +{ 0x0000, "ambienteventstart" }, +{ 0x0000, "ambientexp" }, +{ 0x0000, "ambienthdr" }, +{ 0x0000, "ambulance_damage_part" }, +{ 0x0000, "ambulance_firstframe_function" }, +{ 0x0000, "ambulance_max_health" }, +{ 0x0000, "ambulance_objective_update" }, +{ 0x0000, "ambulance_part_monitor" }, +{ 0x0000, "ambulance_push_active" }, +{ 0x0000, "ambulance_push_attach" }, +{ 0x0000, "ambulance_push_idle" }, +{ 0x0000, "ambulance_push_sequence_end" }, +{ 0x0000, "ambulance_push_step_away" }, +{ 0x0000, "ambush_ambushed_vo" }, +{ 0x0000, "ambush_breakout" }, +{ 0x0000, "ambush_duration" }, +{ 0x0000, "ambush_end" }, +{ 0x0000, "ambush_entrances" }, +{ 0x0000, "ambush_events" }, +{ 0x0000, "ambush_heli_explosion" }, +{ 0x0000, "ambush_player_if_alive_exopush" }, +{ 0x0000, "ambush_trap_ent" }, +{ 0x0000, "ambush_wait" }, +{ 0x0000, "ambush_yaw" }, +{ 0x0000, "ambushendtime" }, +{ 0x0000, "ambushnode" }, +{ 0x0000, "ambushtimer" }, +{ 0x0000, "americans" }, +{ 0x0000, "americans_setup" }, +{ 0x0000, "ammo" }, +{ 0x0000, "ammo_cache_think_global" }, +{ 0x0000, "ammo_icon" }, +{ 0x0000, "ammo_icon_fade_in" }, +{ 0x0000, "ammo_icon_fade_out" }, +{ 0x0000, "ammo_icon_think" }, +{ 0x0000, "ammo_icon_trig" }, +{ 0x0000, "ammo_max" }, +{ 0x0000, "ammo_pickup" }, +{ 0x0000, "ammocheatinterval" }, +{ 0x0000, "ammocheattime" }, +{ 0x0000, "ammofeeder" }, +{ 0x0000, "ammopickup" }, +{ 0x0000, "ammopickup_scalar" }, +{ 0x0000, "ammopickupfunc" }, +{ 0x0000, "ammopickupmodel" }, +{ 0x0000, "ammorefillprimary" }, +{ 0x0000, "ammorefillsecondary" }, +{ 0x0000, "amount" }, +{ 0x0000, "amount_in_sights" }, +{ 0x0000, "amplify_vfx" }, +{ 0x0000, "ams_enabled" }, +{ 0x0000, "ams_get_state" }, +{ 0x0000, "ams_init" }, +{ 0x0000, "ams_intensity" }, +{ 0x0000, "ams_player_health" }, +{ 0x0000, "ams_proxy_vehicle_speed" }, +{ 0x0000, "ams_set_intensity" }, +{ 0x0000, "ams_set_proxy_vehicle" }, +{ 0x0000, "ams_set_state" }, +{ 0x0000, "ams_start" }, +{ 0x0000, "ams_stop" }, +{ 0x0000, "amsx_get" }, +{ 0x0000, "amsx_get_proxy" }, +{ 0x0000, "amsx_get_proxy_vehicle_ent" }, +{ 0x0000, "amv_jetbike_height_time" }, +{ 0x0000, "amv_jetbike_height_val" }, +{ 0x0000, "angle" }, +{ 0x0000, "angle_interpolate" }, +{ 0x0000, "angle_lerp" }, +{ 0x0000, "angle_offset" }, +{ 0x0000, "angleaccel" }, +{ 0x0000, "anglelimit" }, +{ 0x0000, "anglerangethread" }, +{ 0x0000, "angles_and_origin" }, +{ 0x0000, "angles_clamp_180" }, +{ 0x0000, "angles_lerp" }, +{ 0x0000, "angles_origin" }, +{ 0x0000, "anglescheck" }, +{ 0x0000, "anglesclamp180" }, +{ 0x0000, "anglesondeath" }, +{ 0x0000, "anglesonkill" }, +{ 0x0000, "anglessubtract" }, +{ 0x0000, "anglevalid" }, +{ 0x0000, "angspeed" }, +{ 0x0000, "anim_1" }, +{ 0x0000, "anim_2" }, +{ 0x0000, "anim_3" }, +{ 0x0000, "anim_addmodel" }, +{ 0x0000, "anim_animationendnotify" }, +{ 0x0000, "anim_array" }, +{ 0x0000, "anim_at_entity" }, +{ 0x0000, "anim_at_self" }, +{ 0x0000, "anim_blend_time_override" }, +{ 0x0000, "anim_burke_boost_lets_go" }, +{ 0x0000, "anim_burke_crawl" }, +{ 0x0000, "anim_changes_pushplayer" }, +{ 0x0000, "anim_custom_animmode" }, +{ 0x0000, "anim_custom_animmode_loop" }, +{ 0x0000, "anim_custom_animmode_loop_solo" }, +{ 0x0000, "anim_custom_animmode_on_guy" }, +{ 0x0000, "anim_custom_animmode_solo" }, +{ 0x0000, "anim_deathnotify" }, +{ 0x0000, "anim_debug" }, +{ 0x0000, "anim_dialogueendnotify" }, +{ 0x0000, "anim_disablepain" }, +{ 0x0000, "anim_dontpushplayer" }, +{ 0x0000, "anim_down" }, +{ 0x0000, "anim_end_early" }, +{ 0x0000, "anim_end_early_animationendnotify" }, +{ 0x0000, "anim_end_early_deathnotify" }, +{ 0x0000, "anim_end_early_dialogueendnotify" }, +{ 0x0000, "anim_end_early_facialendnotify" }, +{ 0x0000, "anim_exists" }, +{ 0x0000, "anim_facialanim" }, +{ 0x0000, "anim_facialendnotify" }, +{ 0x0000, "anim_facialfiller" }, +{ 0x0000, "anim_first_frame" }, +{ 0x0000, "anim_first_frame_on_guy" }, +{ 0x0000, "anim_first_frame_solo" }, +{ 0x0000, "anim_first_frame_with_finale_gameplay" }, +{ 0x0000, "anim_generic" }, +{ 0x0000, "anim_generic_custom_animmode" }, +{ 0x0000, "anim_generic_custom_animmode_loop" }, +{ 0x0000, "anim_generic_first_frame" }, +{ 0x0000, "anim_generic_gravity" }, +{ 0x0000, "anim_generic_loop" }, +{ 0x0000, "anim_generic_queue" }, +{ 0x0000, "anim_generic_reach" }, +{ 0x0000, "anim_generic_reach_and_arrive" }, +{ 0x0000, "anim_generic_run" }, +{ 0x0000, "anim_generic_teleport" }, +{ 0x0000, "anim_gunhand" }, +{ 0x0000, "anim_guninhand" }, +{ 0x0000, "anim_handle_notetrack" }, +{ 0x0000, "anim_idle_down" }, +{ 0x0000, "anim_idle_up" }, +{ 0x0000, "anim_is_death" }, +{ 0x0000, "anim_laserbuoy" }, +{ 0x0000, "anim_last_frame_solo" }, +{ 0x0000, "anim_link_tag_model" }, +{ 0x0000, "anim_loop" }, +{ 0x0000, "anim_loop_hatch_anims_solo" }, +{ 0x0000, "anim_loop_packet" }, +{ 0x0000, "anim_loop_packet_solo" }, +{ 0x0000, "anim_loop_solo" }, +{ 0x0000, "anim_loop_solo_vm" }, +{ 0x0000, "anim_loop_vm" }, +{ 0x0000, "anim_moveto" }, +{ 0x0000, "anim_node" }, +{ 0x0000, "anim_org" }, +{ 0x0000, "anim_org_ajani_post_breach" }, +{ 0x0000, "anim_playsound_func" }, +{ 0x0000, "anim_pos" }, +{ 0x0000, "anim_prep" }, +{ 0x0000, "anim_prop_init_threads" }, +{ 0x0000, "anim_prop_models" }, +{ 0x0000, "anim_prop_models_animtree" }, +{ 0x0000, "anim_props" }, +{ 0x0000, "anim_props_animated" }, +{ 0x0000, "anim_pushplayer" }, +{ 0x0000, "anim_rate_to_speed" }, +{ 0x0000, "anim_reach" }, +{ 0x0000, "anim_reach_and_approach" }, +{ 0x0000, "anim_reach_and_approach_node_solo" }, +{ 0x0000, "anim_reach_and_approach_solo" }, +{ 0x0000, "anim_reach_and_idle" }, +{ 0x0000, "anim_reach_and_idle_solo" }, +{ 0x0000, "anim_reach_and_plant" }, +{ 0x0000, "anim_reach_and_plant_and_arrive" }, +{ 0x0000, "anim_reach_cleanup" }, +{ 0x0000, "anim_reach_cleanup_solo" }, +{ 0x0000, "anim_reach_failsafe" }, +{ 0x0000, "anim_reach_fix" }, +{ 0x0000, "anim_reach_idle" }, +{ 0x0000, "anim_reach_solo" }, +{ 0x0000, "anim_reach_success" }, +{ 0x0000, "anim_reach_together" }, +{ 0x0000, "anim_reach_together_with_overrides" }, +{ 0x0000, "anim_reach_with_funcs" }, +{ 0x0000, "anim_relative" }, +{ 0x0000, "anim_removemodel" }, +{ 0x0000, "anim_roundabout_rappel_1" }, +{ 0x0000, "anim_roundabout_rappel_2" }, +{ 0x0000, "anim_scene_building_exit_cormack" }, +{ 0x0000, "anim_scene_building_exit_will" }, +{ 0x0000, "anim_scene_building_jump" }, +{ 0x0000, "anim_scene_walker_stepover" }, +{ 0x0000, "anim_scene_will_grabs_car_door" }, +{ 0x0000, "anim_scene_will_grabs_car_door_post_che"... }, +{ 0x0000, "anim_self_set_real_time" }, +{ 0x0000, "anim_self_set_time" }, +{ 0x0000, "anim_sequence" }, +{ 0x0000, "anim_set_rate" }, +{ 0x0000, "anim_set_rate_internal" }, +{ 0x0000, "anim_set_rate_single" }, +{ 0x0000, "anim_set_real_time" }, +{ 0x0000, "anim_set_time" }, +{ 0x0000, "anim_simple" }, +{ 0x0000, "anim_simple_notify" }, +{ 0x0000, "anim_single" }, +{ 0x0000, "anim_single_droppod_custom" }, +{ 0x0000, "anim_single_end_early" }, +{ 0x0000, "anim_single_failsafe" }, +{ 0x0000, "anim_single_failsafeonguy" }, +{ 0x0000, "anim_single_internal" }, +{ 0x0000, "anim_single_mech" }, +{ 0x0000, "anim_single_qte_middle" }, +{ 0x0000, "anim_single_qte_middle_fail" }, +{ 0x0000, "anim_single_queue" }, +{ 0x0000, "anim_single_run" }, +{ 0x0000, "anim_single_run_solo" }, +{ 0x0000, "anim_single_solo" }, +{ 0x0000, "anim_single_solo_custom" }, +{ 0x0000, "anim_single_solo_d" }, +{ 0x0000, "anim_single_solo_in_place" }, +{ 0x0000, "anim_single_solo_internal_vm" }, +{ 0x0000, "anim_single_solo_run" }, +{ 0x0000, "anim_single_solo_vm" }, +{ 0x0000, "anim_single_solo_with_lerp" }, +{ 0x0000, "anim_single_solo_with_special_walk" }, +{ 0x0000, "anim_single_solo_with_wait_flag" }, +{ 0x0000, "anim_single_to_delete" }, +{ 0x0000, "anim_single_to_delete_solo" }, +{ 0x0000, "anim_single_to_loop" }, +{ 0x0000, "anim_single_to_loop_solo" }, +{ 0x0000, "anim_single_with_gameplay" }, +{ 0x0000, "anim_spawn_generic_model" }, +{ 0x0000, "anim_spawn_model" }, +{ 0x0000, "anim_spawn_tag_model" }, +{ 0x0000, "anim_spawner_teleport" }, +{ 0x0000, "anim_speed" }, +{ 0x0000, "anim_start_at_groundpos" }, +{ 0x0000, "anim_start_pos" }, +{ 0x0000, "anim_start_pos_solo" }, +{ 0x0000, "anim_state" }, +{ 0x0000, "anim_stop" }, +{ 0x0000, "anim_stopanimscripted" }, +{ 0x0000, "anim_struct" }, +{ 0x0000, "anim_struct_exfil" }, +{ 0x0000, "anim_struct2" }, +{ 0x0000, "anim_tag" }, +{ 0x0000, "anim_teleport" }, +{ 0x0000, "anim_teleport_solo" }, +{ 0x0000, "anim_time" }, +{ 0x0000, "anim_up" }, +{ 0x0000, "anim_van_intro" }, +{ 0x0000, "anim_wait_func" }, +{ 0x0000, "anim_weight" }, +{ 0x0000, "anim_with_teleport" }, +{ 0x0000, "animal_anims" }, +{ 0x0000, "animalanimations" }, +{ 0x0000, "animalias" }, +{ 0x0000, "animarchetype" }, +{ 0x0000, "animarray" }, +{ 0x0000, "animarrayanyexist" }, +{ 0x0000, "animarrayfuncs" }, +{ 0x0000, "animarraypickrandom" }, +{ 0x0000, "animate_collapse_ent" }, +{ 0x0000, "animate_dead_body" }, +{ 0x0000, "animate_drills" }, +{ 0x0000, "animate_drive_idle" }, +{ 0x0000, "animate_drive_idle_on_dummies" }, +{ 0x0000, "animate_guys" }, +{ 0x0000, "animate_on_goal" }, +{ 0x0000, "animate_player_on_rig_simple" }, +{ 0x0000, "animate_props_on_death" }, +{ 0x0000, "animate_script_origin" }, +{ 0x0000, "animate_the_other_guys" }, +{ 0x0000, "animate_turret_with_viewmodel" }, +{ 0x0000, "animated_gun" }, +{ 0x0000, "animated_lights" }, +{ 0x0000, "animated_pod_function" }, +{ 0x0000, "animated_prop_anims" }, +{ 0x0000, "animateddeath" }, +{ 0x0000, "animatedpalmtrees" }, +{ 0x0000, "animatemodel" }, +{ 0x0000, "animatemoveintoplace" }, +{ 0x0000, "animatetreewind" }, +{ 0x0000, "animation_process" }, +{ 0x0000, "animation_think" }, +{ 0x0000, "animcbs" }, +{ 0x0000, "animdodgeobstaclelistener" }, +{ 0x0000, "animdown" }, +{ 0x0000, "anime" }, +{ 0x0000, "animent" }, +{ 0x0000, "animflagnameindex" }, +{ 0x0000, "animhasfacialoverride" }, +{ 0x0000, "animidledown" }, +{ 0x0000, "animidleup" }, +{ 0x0000, "animname" }, +{ 0x0000, "animnode" }, +{ 0x0000, "animontag" }, +{ 0x0000, "animontag_ragdoll_death" }, +{ 0x0000, "animontag_ragdoll_death_fall" }, +{ 0x0000, "animontag_unloading_vehicle_explosion" }, +{ 0x0000, "animplaybackrate" }, +{ 0x0000, "animref" }, +{ 0x0000, "anims" }, +{ 0x0000, "animsapplied" }, +{ 0x0000, "animscript_sittag" }, +{ 0x0000, "animscript_target" }, +{ 0x0000, "animscriptdonotetracksthread" }, +{ 0x0000, "animsequence" }, +{ 0x0000, "animset" }, +{ 0x0000, "animsets" }, +{ 0x0000, "animsound_aliases" }, +{ 0x0000, "animsound_exists" }, +{ 0x0000, "animsound_hud_extralines" }, +{ 0x0000, "animsound_hudlimit" }, +{ 0x0000, "animsound_start_tracker" }, +{ 0x0000, "animsound_start_tracker_loop" }, +{ 0x0000, "animsound_tagged" }, +{ 0x0000, "animsound_tracker" }, +{ 0x0000, "animsounds" }, +{ 0x0000, "animsounds_thisframe" }, +{ 0x0000, "animstate" }, +{ 0x0000, "animsubstate" }, +{ 0x0000, "animtree" }, +{ 0x0000, "animup" }, +{ 0x0000, "anml_doberman" }, +{ 0x0000, "announcerdisabled" }, +{ 0x0000, "annoyance_tracker" }, +{ 0x0000, "antiintrusion" }, +{ 0x0000, "any_enemy_is_able_to_attack" }, +{ 0x0000, "any_players_istouching" }, +{ 0x0000, "any_wheel_on_ground" }, +{ 0x0000, "anyattachmentisscope" }, +{ 0x0000, "anyplayersinkillcam" }, +{ 0x0000, "anystingermissilelockedon" }, +{ 0x0000, "anythingistouching" }, +{ 0x0000, "anythingtouchingtrigger" }, +{ 0x0000, "apex" }, +{ 0x0000, "apm_mine_deletekillcament" }, +{ 0x0000, "applied_reverb" }, +{ 0x0000, "apply_difficulty_frac_with_func" }, +{ 0x0000, "apply_difficulty_step_with_func" }, +{ 0x0000, "apply_end_fog" }, +{ 0x0000, "apply_fog" }, +{ 0x0000, "apply_friendly_fire_damage_modifier" }, +{ 0x0000, "apply_jump_fx" }, +{ 0x0000, "apply_option_to_selected_fx" }, +{ 0x0000, "apply_reinforcement_perk" }, +{ 0x0000, "apply_reverb" }, +{ 0x0000, "apply_truckjunk" }, +{ 0x0000, "apply_whizby" }, +{ 0x0000, "applybombcarrierclass" }, +{ 0x0000, "applyemp" }, +{ 0x0000, "applyflagcarrierclass" }, +{ 0x0000, "applyflash" }, +{ 0x0000, "applyloadout" }, +{ 0x0000, "applyperks" }, +{ 0x0000, "applyprisonturretradararrow" }, +{ 0x0000, "approach_barracks_combat_setup" }, +{ 0x0000, "approach_handle_murica_movement_left" }, +{ 0x0000, "approach_idle_ents" }, +{ 0x0000, "approach_scene_ents" }, +{ 0x0000, "approach_spawn_functions" }, +{ 0x0000, "approach_types" }, +{ 0x0000, "approachconditioncheckfunc" }, +{ 0x0000, "approaching" }, +{ 0x0000, "approaching_roundabout_dialogue" }, +{ 0x0000, "approaching_standoff" }, +{ 0x0000, "approachnumber" }, +{ 0x0000, "approachtype" }, +{ 0x0000, "approachtypefunc" }, +{ 0x0000, "approachwaittillclose" }, +{ 0x0000, "aquiring_targets_think" }, +{ 0x0000, "ar_moment" }, +{ 0x0000, "arc_point" }, +{ 0x0000, "arcade_plane_controls" }, +{ 0x0000, "arcademode" }, +{ 0x0000, "arcademode_hud_timer" }, +{ 0x0000, "arcademode_stop_timer" }, +{ 0x0000, "arcademode_stoptime" }, +{ 0x0000, "archetype_exists" }, +{ 0x0000, "archetypechanged" }, +{ 0x0000, "archetypeexists" }, +{ 0x0000, "archetypes" }, +{ 0x0000, "archive" }, +{ 0x0000, "are_we_close" }, +{ 0x0000, "aredifferent" }, +{ 0x0000, "arm_repair_attempt" }, +{ 0x0000, "armada_intro_screen" }, +{ 0x0000, "armed" }, +{ 0x0000, "armordamagehints" }, +{ 0x0000, "armorpiercingmod" }, +{ 0x0000, "armorvestmod" }, +{ 0x0000, "armorygiveexoability" }, +{ 0x0000, "armorypoints" }, +{ 0x0000, "armorypurchasefail" }, +{ 0x0000, "armorythink" }, +{ 0x0000, "array" }, +{ 0x0000, "array_2dadd" }, +{ 0x0000, "array_add" }, +{ 0x0000, "array_call" }, +{ 0x0000, "array_checkaddattachment" }, +{ 0x0000, "array_combine" }, +{ 0x0000, "array_combine_all" }, +{ 0x0000, "array_combine_keys" }, +{ 0x0000, "array_combine_multiple" }, +{ 0x0000, "array_combine_non_integer_indices" }, +{ 0x0000, "array_combine_unique" }, +{ 0x0000, "array_compare" }, +{ 0x0000, "array_contains" }, +{ 0x0000, "array_delete" }, +{ 0x0000, "array_delete_evenly" }, +{ 0x0000, "array_exclude" }, +{ 0x0000, "array_find" }, +{ 0x0000, "array_first" }, +{ 0x0000, "array_index_by_classname" }, +{ 0x0000, "array_index_by_parameters" }, +{ 0x0000, "array_index_by_script_index" }, +{ 0x0000, "array_insert" }, +{ 0x0000, "array_kill" }, +{ 0x0000, "array_levelcall" }, +{ 0x0000, "array_levelthread" }, +{ 0x0000, "array_levelthread_safe" }, +{ 0x0000, "array_merge" }, +{ 0x0000, "array_merge_links" }, +{ 0x0000, "array_notify" }, +{ 0x0000, "array_randomize" }, +{ 0x0000, "array_remove" }, +{ 0x0000, "array_remove_array" }, +{ 0x0000, "array_remove_dead" }, +{ 0x0000, "array_remove_duplicates" }, +{ 0x0000, "array_remove_index" }, +{ 0x0000, "array_remove_nokeys" }, +{ 0x0000, "array_removeclaimedtargets" }, +{ 0x0000, "array_removedead" }, +{ 0x0000, "array_removedead_keepkeys" }, +{ 0x0000, "array_removedead_or_dying" }, +{ 0x0000, "array_removefirstinqueue" }, +{ 0x0000, "array_removeundefined" }, +{ 0x0000, "array_reverse" }, +{ 0x0000, "array_safe_delete" }, +{ 0x0000, "array_setgoalvolume" }, +{ 0x0000, "array_sort_by_handler" }, +{ 0x0000, "array_sort_with_func" }, +{ 0x0000, "array_sound_start" }, +{ 0x0000, "array_spawn" }, +{ 0x0000, "array_spawn_allow_fail" }, +{ 0x0000, "array_spawn_cg" }, +{ 0x0000, "array_spawn_function" }, +{ 0x0000, "array_spawn_function_noteworthy" }, +{ 0x0000, "array_spawn_function_targetname" }, +{ 0x0000, "array_spawn_noteworthy" }, +{ 0x0000, "array_spawn_targetname" }, +{ 0x0000, "array_spawn_targetname_allow_fail" }, +{ 0x0000, "array_spawn_targetname_cg" }, +{ 0x0000, "array_spawn_targetname_stagger" }, +{ 0x0000, "array_thread" }, +{ 0x0000, "array_thread_mod_delayed" }, +{ 0x0000, "array_thread_safe" }, +{ 0x0000, "array_thread4" }, +{ 0x0000, "array_thread5" }, +{ 0x0000, "array_wait" }, +{ 0x0000, "array_waitlogic1" }, +{ 0x0000, "array_waitlogic2" }, +{ 0x0000, "array_waittill_player_lookat" }, +{ 0x0000, "array_waittill_player_lookat_proc" }, +{ 0x0000, "arrayinsertion" }, +{ 0x0000, "arrayremovevalue" }, +{ 0x0000, "arrays_color_spawners" }, +{ 0x0000, "arrays_of_colorcoded_nodes" }, +{ 0x0000, "arrays_of_colorcoded_volumes" }, +{ 0x0000, "arrays_of_colorforced_ai" }, +{ 0x0000, "arrivalanim" }, +{ 0x0000, "arrivalendstance" }, +{ 0x0000, "arrivalnodetype" }, +{ 0x0000, "arrivalpathgoalpos" }, +{ 0x0000, "arrivalstance" }, +{ 0x0000, "arrivalstartdist" }, +{ 0x0000, "arrivaltype" }, +{ 0x0000, "arrive" }, +{ 0x0000, "art_print_fog" }, +{ 0x0000, "artendfogfileexport" }, +{ 0x0000, "artendvisionfileexport" }, +{ 0x0000, "artfxprintlnfog" }, +{ 0x0000, "artifact_pulse" }, +{ 0x0000, "artifacts" }, +{ 0x0000, "artifacts_fade" }, +{ 0x0000, "artillery_earthquake" }, +{ 0x0000, "artillerydangercenters" }, +{ 0x0000, "artilleryshellshock" }, +{ 0x0000, "artstartfogfileexport" }, +{ 0x0000, "artstartvisionfileexport" }, +{ 0x0000, "assault_drone_stinger_target_pos" }, +{ 0x0000, "assault_vehicle_ai_aerial_follow_path_o"... }, +{ 0x0000, "assault_vehicle_ai_aerial_movement" }, +{ 0x0000, "assault_vehicle_ai_aerial_pathing_c4" }, +{ 0x0000, "assault_vehicle_ai_aerial_pathing_turre"... }, +{ 0x0000, "assault_vehicle_ai_air_movement_func" }, +{ 0x0000, "assault_vehicle_ai_can_see_living_enemy" }, +{ 0x0000, "assault_vehicle_ai_end_on_owner_disconn"... }, +{ 0x0000, "assault_vehicle_ai_enemy_exists_and_is_"... }, +{ 0x0000, "assault_vehicle_ai_enemy_moved_air" }, +{ 0x0000, "assault_vehicle_ai_enemy_moved_ground" }, +{ 0x0000, "assault_vehicle_ai_follow_path" }, +{ 0x0000, "assault_vehicle_ai_get_camera_position" }, +{ 0x0000, "assault_vehicle_ai_get_nearest_node" }, +{ 0x0000, "assault_vehicle_ai_ground_movement" }, +{ 0x0000, "assault_vehicle_ai_ground_movement_loop" }, +{ 0x0000, "assault_vehicle_ai_init" }, +{ 0x0000, "assault_vehicle_ai_move_to_aerial_node" }, +{ 0x0000, "assault_vehicle_ai_path_timeout_time" }, +{ 0x0000, "assault_vehicle_ai_pick_aerial_node" }, +{ 0x0000, "assault_vehicle_ai_threat" }, +{ 0x0000, "assault_vehicle_ai_weapons" }, +{ 0x0000, "assaultfullstaticondeath" }, +{ 0x0000, "assaulthandledeath" }, +{ 0x0000, "assaulthandletimeoutwarning" }, +{ 0x0000, "assaulthudremove" }, +{ 0x0000, "assaulthudsetup" }, +{ 0x0000, "assaultobjectiveevent" }, +{ 0x0000, "assaultplayerexit" }, +{ 0x0000, "assaultsetinactivity" }, +{ 0x0000, "assaultvehiclemonitorweapons" }, +{ 0x0000, "assert_existance_of_anim" }, +{ 0x0000, "assert_existance_of_anim_vm" }, +{ 0x0000, "assert_existance_of_looping_anim" }, +{ 0x0000, "assert_if_anim_not_defined" }, +{ 0x0000, "assert_if_identical_origins" }, +{ 0x0000, "assertdisplayed" }, +{ 0x0000, "assertdisplayed_b" }, +{ 0x0000, "asset_name" }, +{ 0x0000, "asset_names" }, +{ 0x0000, "asset_type" }, +{ 0x0000, "assign_animals_tree" }, +{ 0x0000, "assign_animtree" }, +{ 0x0000, "assign_cloak_model" }, +{ 0x0000, "assign_drone_tree" }, +{ 0x0000, "assign_fx_to_trigger" }, +{ 0x0000, "assign_generic_human_tree" }, +{ 0x0000, "assign_goal_node" }, +{ 0x0000, "assign_goal_vol" }, +{ 0x0000, "assign_model" }, +{ 0x0000, "assign_nodes_to_zipline_guys" }, +{ 0x0000, "assign_npcid" }, +{ 0x0000, "assign_script_breachgroup_to_ents" }, +{ 0x0000, "assign_spawns" }, +{ 0x0000, "assign_spawns_version_2" }, +{ 0x0000, "assign_spawns_version_3" }, +{ 0x0000, "assign_unique_id" }, +{ 0x0000, "assignawards" }, +{ 0x0000, "assigned_brush" }, +{ 0x0000, "assigned_model" }, +{ 0x0000, "assigned_model_b" }, +{ 0x0000, "assigned_parent" }, +{ 0x0000, "assignpracticeroundclasses" }, +{ 0x0000, "assignteamspawns" }, +{ 0x0000, "assistedsuicide" }, +{ 0x0000, "assistedsuicideevent" }, +{ 0x0000, "assistplayer" }, +{ 0x0000, "assistpoints" }, +{ 0x0000, "assists_disabled" }, +{ 0x0000, "ast_mus_on" }, +{ 0x0000, "at_goal" }, +{ 0x0000, "at_path_end" }, +{ 0x0000, "at_rest" }, +{ 0x0000, "at_start" }, +{ 0x0000, "at_van_enemy_cleanup" }, +{ 0x0000, "atbrinkofdeath" }, +{ 0x0000, "atconcealmentnode" }, +{ 0x0000, "atk_bomber" }, +{ 0x0000, "atk_bomber_no_path_to_bomb_count" }, +{ 0x0000, "atk_bomber_update" }, +{ 0x0000, "atlas_base_weapon_manager" }, +{ 0x0000, "atlas_base_weapon_manager_elevator" }, +{ 0x0000, "atlas_building_roof_walla" }, +{ 0x0000, "atlas_drone_damage_function" }, +{ 0x0000, "atlas_guard" }, +{ 0x0000, "atlas_guard_dialogue_line1" }, +{ 0x0000, "atlas_guard1" }, +{ 0x0000, "atlas_guard2" }, +{ 0x0000, "atlas_guard3" }, +{ 0x0000, "atlas_guard4" }, +{ 0x0000, "atlas_guard5" }, +{ 0x0000, "atlas_guard6" }, +{ 0x0000, "atlas_guard7" }, +{ 0x0000, "atlas_intercepts" }, +{ 0x0000, "atlas_sign_flicker" }, +{ 0x0000, "atlas_suv_impact_fx" }, +{ 0x0000, "atlas_suv_rider_no_react" }, +{ 0x0000, "atlas_suv_rider_react" }, +{ 0x0000, "atlas_suv_rider_think" }, +{ 0x0000, "atlas_van_explode" }, +{ 0x0000, "atlas1" }, +{ 0x0000, "atlas2" }, +{ 0x0000, "atlascard_cormack_walk" }, +{ 0x0000, "atlascard_irons_grab_card" }, +{ 0x0000, "atlascard_irons_handshake" }, +{ 0x0000, "atlascard_irons_leave" }, +{ 0x0000, "atlascard_irons_place_hand" }, +{ 0x0000, "atlascard_irons_tap" }, +{ 0x0000, "atlascard_irons_turn" }, +{ 0x0000, "atlascard_irons_walk" }, +{ 0x0000, "atlasdrn_condition_callback_to_state_de"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_de"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_di"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_fl"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_fl"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_fl"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_ho"... }, +{ 0x0000, "atlasdrn_condition_callback_to_state_of"... }, +{ 0x0000, "atlasdrn_lens_focus" }, +{ 0x0000, "atm_is_muted" }, +{ 0x0000, "atm_max_off_time" }, +{ 0x0000, "atm_max_on_time" }, +{ 0x0000, "atm_mute_time" }, +{ 0x0000, "atm_off_time" }, +{ 0x0000, "atmosfogdistancescale" }, +{ 0x0000, "atmosfogenabled" }, +{ 0x0000, "atmosfogextinctionstrength" }, +{ 0x0000, "atmosfoghalfplanedistance" }, +{ 0x0000, "atmosfoghazecolor" }, +{ 0x0000, "atmosfoghazespread" }, +{ 0x0000, "atmosfoghazestrength" }, +{ 0x0000, "atmosfogheightfogbaseheight" }, +{ 0x0000, "atmosfogheightfogenabled" }, +{ 0x0000, "atmosfogheightfoghalfplanedistance" }, +{ 0x0000, "atmosfoginscatterstrength" }, +{ 0x0000, "atmosfogskyangularfalloffenabled" }, +{ 0x0000, "atmosfogskydistance" }, +{ 0x0000, "atmosfogskyfalloffanglerange" }, +{ 0x0000, "atmosfogskyfalloffstartangle" }, +{ 0x0000, "atmosfogstartdistance" }, +{ 0x0000, "atmosfogsundirection" }, +{ 0x0000, "atmosfogsunfogcolor" }, +{ 0x0000, "atrium_breach_signal_start" }, +{ 0x0000, "atrium_timer_expire" }, +{ 0x0000, "atriumanimations" }, +{ 0x0000, "atriumboostjump" }, +{ 0x0000, "atriumboostjumpguy" }, +{ 0x0000, "atriumbreachexplosionnotetrack" }, +{ 0x0000, "atriumbreachidle" }, +{ 0x0000, "atriumbreachidleburke" }, +{ 0x0000, "atriumbreachidleinfiltrators" }, +{ 0x0000, "atriumbreachmonitoralliesinposition" }, +{ 0x0000, "atriumdoorbreachdamage" }, +{ 0x0000, "atriumdoorsopen" }, +{ 0x0000, "atriumdoorsopenonalarm" }, +{ 0x0000, "atriumlookatdialogue" }, +{ 0x0000, "atriumreminderdialogue" }, +{ 0x0000, "atriumsetupdialogue" }, +{ 0x0000, "atriumshootfirstdialogue" }, +{ 0x0000, "atriumtimer" }, +{ 0x0000, "atriumtimewindow" }, +{ 0x0000, "atrrestoremech" }, +{ 0x0000, "attach_assault_drone_lights" }, +{ 0x0000, "attach_bone" }, +{ 0x0000, "attach_cig" }, +{ 0x0000, "attach_cig_self" }, +{ 0x0000, "attach_clip" }, +{ 0x0000, "attach_ent" }, +{ 0x0000, "attach_fixed_scanner" }, +{ 0x0000, "attach_flashlight_in_hand" }, +{ 0x0000, "attach_flashlight_on_gun" }, +{ 0x0000, "attach_flashlight_on_vehicle_unload" }, +{ 0x0000, "attach_fx_to_mechanism" }, +{ 0x0000, "attach_housing" }, +{ 0x0000, "attach_light_to_face" }, +{ 0x0000, "attach_light_to_police_car" }, +{ 0x0000, "attach_littlebird_parts" }, +{ 0x0000, "attach_model_override" }, +{ 0x0000, "attach_or_link" }, +{ 0x0000, "attach_phone" }, +{ 0x0000, "attach_player_current_weapon_to_anim_ta"... }, +{ 0x0000, "attach_player_current_weapon_to_rig" }, +{ 0x0000, "attach_pointlight_to_beam" }, +{ 0x0000, "attach_scanner" }, +{ 0x0000, "attach_scanner_turret" }, +{ 0x0000, "attach_tag" }, +{ 0x0000, "attach_wakefx" }, +{ 0x0000, "attach_weapon_to_tag_sync" }, +{ 0x0000, "attachdistortionfx" }, +{ 0x0000, "attachedguys" }, +{ 0x0000, "attachedmodels" }, +{ 0x0000, "attachedpath" }, +{ 0x0000, "attachedpropmodel" }, +{ 0x0000, "attachedproptag" }, +{ 0x0000, "attachedusemodel" }, +{ 0x0000, "attachflag" }, +{ 0x0000, "attachgrenademodel" }, +{ 0x0000, "attachhat" }, +{ 0x0000, "attachhead" }, +{ 0x0000, "attachmentdeath" }, +{ 0x0000, "attachmentexplode" }, +{ 0x0000, "attachmentmap_attachtoperk" }, +{ 0x0000, "attachmentmap_basetounique" }, +{ 0x0000, "attachmentmap_tobase" }, +{ 0x0000, "attachmentmap_tounique" }, +{ 0x0000, "attachmentmap_uniquetobase" }, +{ 0x0000, "attachmentperkmap" }, +{ 0x0000, "attachmenttype" }, +{ 0x0000, "attachmissiles" }, +{ 0x0000, "attachmodelti" }, +{ 0x0000, "attachprops" }, +{ 0x0000, "attachpropsfunction" }, +{ 0x0000, "attachusemodel" }, +{ 0x0000, "attachweapon" }, +{ 0x0000, "attack_accuracy" }, +{ 0x0000, "attack_available" }, +{ 0x0000, "attack_behavior" }, +{ 0x0000, "attack_damage_trigger" }, +{ 0x0000, "attack_delay" }, +{ 0x0000, "attack_drone_audio_handler" }, +{ 0x0000, "attack_drone_flybys_audio" }, +{ 0x0000, "attack_drone_formation_init" }, +{ 0x0000, "attack_drone_init" }, +{ 0x0000, "attack_drone_kamikaze_audio" }, +{ 0x0000, "attack_drone_kamikaze_flying_fx" }, +{ 0x0000, "attack_drone_queen_1shot_handler" }, +{ 0x0000, "attack_drone_queen_audio" }, +{ 0x0000, "attack_drone_queen_flybys_audio" }, +{ 0x0000, "attack_drone_queen_flying_fx" }, +{ 0x0000, "attack_drones_nofly_zone_radius" }, +{ 0x0000, "attack_drones_num_drones_per_queen" }, +{ 0x0000, "attack_drones_num_queens" }, +{ 0x0000, "attack_heli_cleanup" }, +{ 0x0000, "attack_heli_fx" }, +{ 0x0000, "attack_heli_safe_volumes" }, +{ 0x0000, "attack_hint_display" }, +{ 0x0000, "attack_if_buddy_killed" }, +{ 0x0000, "attack_origin_condition_threadd" }, +{ 0x0000, "attack_player_for_time" }, +{ 0x0000, "attack_sight_required" }, +{ 0x0000, "attackback" }, +{ 0x0000, "attacked_by_dog" }, +{ 0x0000, "attacker_isonmyteam" }, +{ 0x0000, "attacker_troop_isonmyteam" }, +{ 0x0000, "attackercandamageitem" }, +{ 0x0000, "attackerdata" }, +{ 0x0000, "attackerent" }, +{ 0x0000, "attackerinlaststand" }, +{ 0x0000, "attackerinremotekillstreak" }, +{ 0x0000, "attackerishittingteam" }, +{ 0x0000, "attackerlist" }, +{ 0x0000, "attackeronground" }, +{ 0x0000, "attackerposition" }, +{ 0x0000, "attackers" }, +{ 0x0000, "attackerstance" }, +{ 0x0000, "attackertable" }, +{ 0x0000, "attackheliaiburstsize" }, +{ 0x0000, "attackheliexcluders" }, +{ 0x0000, "attackhelifov" }, +{ 0x0000, "attackheligraceperiod" }, +{ 0x0000, "attackhelikillsai" }, +{ 0x0000, "attackhelimemory" }, +{ 0x0000, "attackhelimovetime" }, +{ 0x0000, "attackheliplayerbreak" }, +{ 0x0000, "attackhelirange" }, +{ 0x0000, "attackhelitargetreaquire" }, +{ 0x0000, "attackhelitimeout" }, +{ 0x0000, "attacking_player" }, +{ 0x0000, "attackmiss" }, +{ 0x0000, "attackmisstracktargetthread" }, +{ 0x0000, "attacknode" }, +{ 0x0000, "attacknothingtodo" }, +{ 0x0000, "attackoffset" }, +{ 0x0000, "attackradius" }, +{ 0x0000, "attackradiussq" }, +{ 0x0000, "attackstate" }, +{ 0x0000, "attacksuppressableenemy" }, +{ 0x0000, "attackteleportthread" }, +{ 0x0000, "attackvisibleenemy" }, +{ 0x0000, "attackzheight" }, +{ 0x0000, "attackzheightdown" }, +{ 0x0000, "attempt_execute" }, +{ 0x0000, "attempt_mark_enemy" }, +{ 0x0000, "attract_range" }, +{ 0x0000, "attract_strength" }, +{ 0x0000, "attractor" }, +{ 0x0000, "attractor2" }, +{ 0x0000, "attractornumber" }, +{ 0x0000, "aud" }, +{ 0x0000, "aud_2b_missile_final" }, +{ 0x0000, "aud_2b_missile1" }, +{ 0x0000, "aud_2b_missile2" }, +{ 0x0000, "aud_2b_missile3" }, +{ 0x0000, "aud_ac_units" }, +{ 0x0000, "aud_add_progress_map" }, +{ 0x0000, "aud_alarm_submix" }, +{ 0x0000, "aud_ally_card_accept" }, +{ 0x0000, "aud_ally_card_error" }, +{ 0x0000, "aud_ally_card_swipe" }, +{ 0x0000, "aud_ambient_animations" }, +{ 0x0000, "aud_ambient_helicopter" }, +{ 0x0000, "aud_approaching_poolhouse" }, +{ 0x0000, "aud_ascent_final_warbird" }, +{ 0x0000, "aud_atlas_suv_explo" }, +{ 0x0000, "aud_autopsy_entrance" }, +{ 0x0000, "aud_autopsy_entrance_vo" }, +{ 0x0000, "aud_autopsy_knife_pry_door" }, +{ 0x0000, "aud_avs_enemy_warbird" }, +{ 0x0000, "aud_avs_enemy_warbird_2" }, +{ 0x0000, "aud_avs_enemy_warbird_grapple" }, +{ 0x0000, "aud_avs_intro_allies_1" }, +{ 0x0000, "aud_avs_intro_allies_2" }, +{ 0x0000, "aud_background_chatter" }, +{ 0x0000, "aud_background_chatter_gate" }, +{ 0x0000, "aud_balcony_aircraft_wait" }, +{ 0x0000, "aud_ball_fountain" }, +{ 0x0000, "aud_bet_exo_climb_gear_lt" }, +{ 0x0000, "aud_bet_exo_climb_gear_rt" }, +{ 0x0000, "aud_bet_exo_climb_hit_lt" }, +{ 0x0000, "aud_bet_exo_climb_hit_rt" }, +{ 0x0000, "aud_bet_exo_climb_settle_lt" }, +{ 0x0000, "aud_bet_exo_climb_settle_rt" }, +{ 0x0000, "aud_bet_exo_climb_windup_lt" }, +{ 0x0000, "aud_bet_exo_climb_windup_rt" }, +{ 0x0000, "aud_big_gate_open_stage_1" }, +{ 0x0000, "aud_big_gate_open_stage_2" }, +{ 0x0000, "aud_big_gate_pre_open" }, +{ 0x0000, "aud_big_gate_stop_stage_1" }, +{ 0x0000, "aud_big_gate_stop_stage_2" }, +{ 0x0000, "aud_briefing" }, +{ 0x0000, "aud_building_drop" }, +{ 0x0000, "aud_building_pre_drop" }, +{ 0x0000, "aud_burke_bus1_land" }, +{ 0x0000, "aud_burke_hill_slide_stump" }, +{ 0x0000, "aud_burke_intro_anim" }, +{ 0x0000, "aud_burke_ledge_jump" }, +{ 0x0000, "aud_burke_nearing_cliff" }, +{ 0x0000, "aud_burke_open_door" }, +{ 0x0000, "aud_burke_river_over_log" }, +{ 0x0000, "aud_burke_riverbank_footstep_left" }, +{ 0x0000, "aud_burke_riverbank_footstep_right" }, +{ 0x0000, "aud_burke_riverbank_slide" }, +{ 0x0000, "aud_burke_step_over_log" }, +{ 0x0000, "aud_burke_stumble_knee" }, +{ 0x0000, "aud_burke_stumble_run" }, +{ 0x0000, "aud_burke_takedown" }, +{ 0x0000, "aud_burke_tree_cover_01" }, +{ 0x0000, "aud_burke_wall_climb" }, +{ 0x0000, "aud_burke_water_deep_step" }, +{ 0x0000, "aud_burke_water_enter" }, +{ 0x0000, "aud_burke_water_exit" }, +{ 0x0000, "aud_burke_water_fall_forward" }, +{ 0x0000, "aud_burke_water_footstep_left" }, +{ 0x0000, "aud_burke_water_footstep_right" }, +{ 0x0000, "aud_burke_water_jump" }, +{ 0x0000, "aud_burke_water_shallow_step" }, +{ 0x0000, "aud_burke_water_slip" }, +{ 0x0000, "aud_cap_45_onearm_toss" }, +{ 0x0000, "aud_cap_escape_to_heli_truck_1" }, +{ 0x0000, "aud_cap_escape_to_heli_truck_2" }, +{ 0x0000, "aud_cap_heli_sfx_01" }, +{ 0x0000, "aud_cap_heli_sfx_02" }, +{ 0x0000, "aud_cap_heli_sfx_03" }, +{ 0x0000, "aud_cap_heli_sfx_04" }, +{ 0x0000, "aud_cap_heli_sfx_05" }, +{ 0x0000, "aud_cap_heli_sfx_06" }, +{ 0x0000, "aud_cap_interrogation_transition_vo" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_01" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_02" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_03" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_03_crk" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_04" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_05" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_06" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_07" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_08" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_09" }, +{ 0x0000, "aud_cap_s2_trolley_sfx_10" }, +{ 0x0000, "aud_cap_sml_onearm_toss" }, +{ 0x0000, "aud_captured_foley_override_handler" }, +{ 0x0000, "aud_captured_setup_anims" }, +{ 0x0000, "aud_cave_ambience" }, +{ 0x0000, "aud_cave_cascade" }, +{ 0x0000, "aud_check_sound_done" }, +{ 0x0000, "aud_chopper_sniper_bullet" }, +{ 0x0000, "aud_chopper_sniper_whizby" }, +{ 0x0000, "aud_clamp" }, +{ 0x0000, "aud_clear_sticky_threat" }, +{ 0x0000, "aud_close_sounds" }, +{ 0x0000, "aud_combat_clearing_1_warbird" }, +{ 0x0000, "aud_combat_clearing_2_littlebird_1" }, +{ 0x0000, "aud_combat_clearing_2_littlebird_2" }, +{ 0x0000, "aud_combat_clearing_3_littlebird_1" }, +{ 0x0000, "aud_combat_clearing_3_littlebird_2" }, +{ 0x0000, "aud_conduit_smash" }, +{ 0x0000, "aud_copy_vector" }, +{ 0x0000, "aud_cormack_approach" }, +{ 0x0000, "aud_cormack_final_monitor_smash" }, +{ 0x0000, "aud_cormack_final_smash_promo" }, +{ 0x0000, "aud_cormack_grapple_kill" }, +{ 0x0000, "aud_cormack_monitor_smash_promo" }, +{ 0x0000, "aud_cormack_rappel_cable" }, +{ 0x0000, "aud_courtyard_hangar_door_close" }, +{ 0x0000, "aud_courtyard_hangar_door_hack" }, +{ 0x0000, "aud_courtyard_hangar_door_hack_idle" }, +{ 0x0000, "aud_courtyard_hangar_door_open" }, +{ 0x0000, "aud_crane_mount_crouch_jump" }, +{ 0x0000, "aud_crane_mount_lt_hand_hit" }, +{ 0x0000, "aud_crane_mount_lt_hand_rest" }, +{ 0x0000, "aud_crane_mount_rt_hand_hit" }, +{ 0x0000, "aud_crane_mount_rt_hand_rest" }, +{ 0x0000, "aud_crash_wakeup_sfx" }, +{ 0x0000, "aud_create_drive_envs" }, +{ 0x0000, "aud_create_entity" }, +{ 0x0000, "aud_create_linked_entity" }, +{ 0x0000, "aud_ctyard_vrap01" }, +{ 0x0000, "aud_ctyard_vrap02" }, +{ 0x0000, "aud_ctyard_vrap04" }, +{ 0x0000, "aud_ctyard_vrap05" }, +{ 0x0000, "aud_delete_on_sounddone" }, +{ 0x0000, "aud_destroy_deployed_pod" }, +{ 0x0000, "aud_det_foley_override_handler" }, +{ 0x0000, "aud_detach_from_vtol" }, +{ 0x0000, "aud_disable_deathsdoor_audio" }, +{ 0x0000, "aud_dna_bomb_01" }, +{ 0x0000, "aud_dna_bomb_02" }, +{ 0x0000, "aud_door" }, +{ 0x0000, "aud_door_takedown_mix_handler" }, +{ 0x0000, "aud_door_takedown_scream" }, +{ 0x0000, "aud_drone_attack" }, +{ 0x0000, "aud_drone_investigating" }, +{ 0x0000, "aud_drone_start_jets" }, +{ 0x0000, "aud_drone_view_intro_start" }, +{ 0x0000, "aud_drone_view_intro_target" }, +{ 0x0000, "aud_drop_pod_fire" }, +{ 0x0000, "aud_drop_pod_land_fail" }, +{ 0x0000, "aud_drop_pod_land_success" }, +{ 0x0000, "aud_drop_pod_trophy_kill" }, +{ 0x0000, "aud_duck" }, +{ 0x0000, "aud_dyanmic_event" }, +{ 0x0000, "aud_dynamic_event_startup" }, +{ 0x0000, "aud_enable_deathsdoor_audio" }, +{ 0x0000, "aud_engine_disable" }, +{ 0x0000, "aud_engine_throttle_amount" }, +{ 0x0000, "aud_engine_wait" }, +{ 0x0000, "aud_enter_vtol" }, +{ 0x0000, "aud_escape_doctor_bodybag" }, +{ 0x0000, "aud_escape_give_gun_exo" }, +{ 0x0000, "aud_escape_guard_takedown_door" }, +{ 0x0000, "aud_escape_keycard" }, +{ 0x0000, "aud_estate_grounds_ambience" }, +{ 0x0000, "aud_estate_grounds_emitters" }, +{ 0x0000, "aud_estate_living_ambience" }, +{ 0x0000, "aud_estate_security_ambience" }, +{ 0x0000, "aud_exfil_door_1" }, +{ 0x0000, "aud_exfil_door_2a" }, +{ 0x0000, "aud_exfil_door_2b" }, +{ 0x0000, "aud_exfil_vtol_ascend" }, +{ 0x0000, "aud_exfil_vtol_grapple" }, +{ 0x0000, "aud_exfil_vtol_start" }, +{ 0x0000, "aud_exfil_vtol_wind" }, +{ 0x0000, "aud_exit_vtol" }, +{ 0x0000, "aud_exo_climb_burke" }, +{ 0x0000, "aud_exo_climb_flank_land" }, +{ 0x0000, "aud_exo_climb_flank_over" }, +{ 0x0000, "aud_exo_climb_gear_lt" }, +{ 0x0000, "aud_exo_climb_gear_rt" }, +{ 0x0000, "aud_exo_climb_gideon_land" }, +{ 0x0000, "aud_exo_climb_hit_lt" }, +{ 0x0000, "aud_exo_climb_hit_rt" }, +{ 0x0000, "aud_exo_climb_mount_jump" }, +{ 0x0000, "aud_exo_climb_mount_land" }, +{ 0x0000, "aud_exo_climb_rest_lt" }, +{ 0x0000, "aud_exo_climb_rest_rt" }, +{ 0x0000, "aud_exo_climb_slide_push" }, +{ 0x0000, "aud_exo_climb_slide_start" }, +{ 0x0000, "aud_exo_climb_slide_stop" }, +{ 0x0000, "aud_exo_climb_windup_lt" }, +{ 0x0000, "aud_exo_climb_windup_rt" }, +{ 0x0000, "aud_facility_breach_start" }, +{ 0x0000, "aud_fade_in" }, +{ 0x0000, "aud_fade_in_music" }, +{ 0x0000, "aud_fade_loop_out_and_delete" }, +{ 0x0000, "aud_fade_loop_out_and_delete_temp" }, +{ 0x0000, "aud_fade_out" }, +{ 0x0000, "aud_fade_out_and_delete" }, +{ 0x0000, "aud_fadeup_intro_loop" }, +{ 0x0000, "aud_fall_scream" }, +{ 0x0000, "aud_falls_climbing" }, +{ 0x0000, "aud_fin_rocket_damage_vfx" }, +{ 0x0000, "aud_find_exploder" }, +{ 0x0000, "aud_flag_handler" }, +{ 0x0000, "aud_foam_room_emitters" }, +{ 0x0000, "aud_foliage_insects" }, +{ 0x0000, "aud_foliage_mix" }, +{ 0x0000, "aud_foliage_movement" }, +{ 0x0000, "aud_forest_ambience" }, +{ 0x0000, "aud_forest_ambient_loops" }, +{ 0x0000, "aud_fountains" }, +{ 0x0000, "aud_garage_hyd_wrench" }, +{ 0x0000, "aud_garage_lift" }, +{ 0x0000, "aud_gas_sfx" }, +{ 0x0000, "aud_get_ambi_submix" }, +{ 0x0000, "aud_get_envelope_domain" }, +{ 0x0000, "aud_get_music_submix" }, +{ 0x0000, "aud_get_optional_param" }, +{ 0x0000, "aud_get_player_locamote_state" }, +{ 0x0000, "aud_get_progress_map" }, +{ 0x0000, "aud_get_sticky_threat" }, +{ 0x0000, "aud_get_threat_level" }, +{ 0x0000, "aud_gideon_autopsy_halls_start" }, +{ 0x0000, "aud_gideon_heli_runout_kick" }, +{ 0x0000, "aud_gideon_heli_runout_start" }, +{ 0x0000, "aud_gideon_test_chamber_ascend_start" }, +{ 0x0000, "aud_gideon_test_chamber_bodybag_1" }, +{ 0x0000, "aud_gideon_test_chamber_bodybag_2" }, +{ 0x0000, "aud_gideon_test_chamber_climb_stairs_1" }, +{ 0x0000, "aud_gideon_test_chamber_climb_stairs_2" }, +{ 0x0000, "aud_gideon_test_chamber_descend_stairs" }, +{ 0x0000, "aud_gideon_test_chamber_descend_stairs_"... }, +{ 0x0000, "aud_gideon_test_chamber_door_kick" }, +{ 0x0000, "aud_gideon_test_chamber_security" }, +{ 0x0000, "aud_gideon_test_chamber_stair_door" }, +{ 0x0000, "aud_grapple_from_foliage" }, +{ 0x0000, "aud_grapple_infil" }, +{ 0x0000, "aud_grapple_kill_foliage" }, +{ 0x0000, "aud_grapple_land_debris" }, +{ 0x0000, "aud_grapple_launch" }, +{ 0x0000, "aud_grapple_monitor" }, +{ 0x0000, "aud_grates" }, +{ 0x0000, "aud_ground_veh_deathwatch" }, +{ 0x0000, "aud_ground_veh_loops" }, +{ 0x0000, "aud_ground_veh_speed_mapping" }, +{ 0x0000, "aud_guard_station_ambience" }, +{ 0x0000, "aud_guard_station_main_door" }, +{ 0x0000, "aud_guardhouse_foley_cormack" }, +{ 0x0000, "aud_gun_throw_logic" }, +{ 0x0000, "aud_handle_alarms" }, +{ 0x0000, "aud_handle_buoy_sfx" }, +{ 0x0000, "aud_handle_clearing_dambs" }, +{ 0x0000, "aud_handle_earthquake" }, +{ 0x0000, "aud_handle_gangam_jets" }, +{ 0x0000, "aud_handle_incoming" }, +{ 0x0000, "aud_handle_map_setups" }, +{ 0x0000, "aud_handle_river_progress_flags" }, +{ 0x0000, "aud_handle_river_sfx" }, +{ 0x0000, "aud_handle_river_shallow_flag" }, +{ 0x0000, "aud_handle_so_missile" }, +{ 0x0000, "aud_handle_vista_jets" }, +{ 0x0000, "aud_handle_warning_vo" }, +{ 0x0000, "aud_handle_wave_incoming" }, +{ 0x0000, "aud_handle_waves_crash" }, +{ 0x0000, "aud_hangar_ambience" }, +{ 0x0000, "aud_hangar_car_door_exit" }, +{ 0x0000, "aud_hangar_door_exit" }, +{ 0x0000, "aud_hangar_door_open" }, +{ 0x0000, "aud_hangar_walla" }, +{ 0x0000, "aud_hatch_gideon" }, +{ 0x0000, "aud_hatch_plr" }, +{ 0x0000, "aud_hazmat_guy_foley" }, +{ 0x0000, "aud_hazmat_guy_pushes_alarm" }, +{ 0x0000, "aud_heli_battle_flyover" }, +{ 0x0000, "aud_heli_crash_pos" }, +{ 0x0000, "aud_heli_escape_idle_sfx" }, +{ 0x0000, "aud_heli_manticore_flyover" }, +{ 0x0000, "aud_helicopter_deathwatch" }, +{ 0x0000, "aud_helo_spotlight_spawn" }, +{ 0x0000, "aud_hostage_truck_hits_water" }, +{ 0x0000, "aud_hostage_truck_over_curb" }, +{ 0x0000, "aud_hostage_truck_over_edge" }, +{ 0x0000, "aud_hostage_truck_tbone" }, +{ 0x0000, "aud_human_activity_streams" }, +{ 0x0000, "aud_ilana_carmack_escape_controlroom" }, +{ 0x0000, "aud_ilana_carmack_escape_controlroom_at"... }, +{ 0x0000, "aud_ilana_carmack_escape_hallway" }, +{ 0x0000, "aud_ilana_carmack_escape_hallway_end" }, +{ 0x0000, "aud_ilana_carmack_escape_takedown" }, +{ 0x0000, "aud_ilana_carmack_rescue_01" }, +{ 0x0000, "aud_impact_monitor" }, +{ 0x0000, "aud_impact_system_diveboat" }, +{ 0x0000, "aud_impact_system_hovertank" }, +{ 0x0000, "aud_impact_system_jetbike" }, +{ 0x0000, "aud_in_zone" }, +{ 0x0000, "aud_incin_after" }, +{ 0x0000, "aud_incin_after_loop1" }, +{ 0x0000, "aud_incin_amb_kill" }, +{ 0x0000, "aud_incin_blackout" }, +{ 0x0000, "aud_incin_cart_done" }, +{ 0x0000, "aud_incin_cart_push" }, +{ 0x0000, "aud_incin_cart_push_stop" }, +{ 0x0000, "aud_incin_cart_start" }, +{ 0x0000, "aud_incin_flame_logic_first_burst" }, +{ 0x0000, "aud_incin_flame_loop" }, +{ 0x0000, "aud_incin_flame_loop_2" }, +{ 0x0000, "aud_incin_pilot_light" }, +{ 0x0000, "aud_incin_pilot_light1" }, +{ 0x0000, "aud_incin_pilot_light2" }, +{ 0x0000, "aud_incin_pilot_light3" }, +{ 0x0000, "aud_incin_pilot_light4" }, +{ 0x0000, "aud_incin_pilot_light5" }, +{ 0x0000, "aud_incin_pipe_burst" }, +{ 0x0000, "aud_incin_pipe_grab" }, +{ 0x0000, "aud_init" }, +{ 0x0000, "aud_insect_sound" }, +{ 0x0000, "aud_intel" }, +{ 0x0000, "aud_interrogation_music_pt1" }, +{ 0x0000, "aud_interrogation_music_pt2" }, +{ 0x0000, "aud_interrogation_scene" }, +{ 0x0000, "aud_into_mech_missle" }, +{ 0x0000, "aud_intro_caravan_mute" }, +{ 0x0000, "aud_intro_caravan_passby" }, +{ 0x0000, "aud_intro_caravan_unmute" }, +{ 0x0000, "aud_intro_drone" }, +{ 0x0000, "aud_intro_foley" }, +{ 0x0000, "aud_intro_heli_flyover" }, +{ 0x0000, "aud_intro_to_elev_walla" }, +{ 0x0000, "aud_intro_truck_gate" }, +{ 0x0000, "aud_intro_truck_passby_01" }, +{ 0x0000, "aud_intro_truck_passby_02" }, +{ 0x0000, "aud_intro_truck_stop" }, +{ 0x0000, "aud_introblack_bullet" }, +{ 0x0000, "aud_irons_reveal_bomb_shake" }, +{ 0x0000, "aud_irons_reveal_bomb_shake_02" }, +{ 0x0000, "aud_irons_reveal_star_trek_door" }, +{ 0x0000, "aud_irons_says_hello" }, +{ 0x0000, "aud_ironsstealth" }, +{ 0x0000, "aud_is_even" }, +{ 0x0000, "aud_is_specops" }, +{ 0x0000, "aud_jeep_death_listener" }, +{ 0x0000, "aud_knox_keypad" }, +{ 0x0000, "aud_knox_thermite" }, +{ 0x0000, "aud_knox_thermite_promo" }, +{ 0x0000, "aud_lab_ambient_emitters" }, +{ 0x0000, "aud_lab_foley_override_handler" }, +{ 0x0000, "aud_lab_intro_screen" }, +{ 0x0000, "aud_lab_phone_wait" }, +{ 0x0000, "aud_lab_tech_chair_startle_1" }, +{ 0x0000, "aud_lab_tech_chair_startle_2" }, +{ 0x0000, "aud_lab_tech_desk_bump" }, +{ 0x0000, "aud_laser_energy_beam_start" }, +{ 0x0000, "aud_laser_pre_move_down" }, +{ 0x0000, "aud_last_time" }, +{ 0x0000, "aud_level_fadein" }, +{ 0x0000, "aud_limp_exo" }, +{ 0x0000, "aud_limp_off" }, +{ 0x0000, "aud_limp_on" }, +{ 0x0000, "aud_little_bird_hit" }, +{ 0x0000, "aud_lockdown_alarm" }, +{ 0x0000, "aud_lowstealth" }, +{ 0x0000, "aud_manticore_crane" }, +{ 0x0000, "aud_max" }, +{ 0x0000, "aud_mech_crush_guy" }, +{ 0x0000, "aud_mech_grapple_pitch_up" }, +{ 0x0000, "aud_mech_idle_sfx" }, +{ 0x0000, "aud_mech_jump" }, +{ 0x0000, "aud_mech_missile_fire" }, +{ 0x0000, "aud_mech_obj_move" }, +{ 0x0000, "aud_mech_obj_move_end" }, +{ 0x0000, "aud_mech_obj_move_wait" }, +{ 0x0000, "aud_mech_panic_walla_watcher" }, +{ 0x0000, "aud_mech_scanner" }, +{ 0x0000, "aud_mech_trucks_enter" }, +{ 0x0000, "aud_mech1_bg_truck" }, +{ 0x0000, "aud_mechkill_catchdude" }, +{ 0x0000, "aud_median_impact" }, +{ 0x0000, "aud_meet_atlast_roof_explode" }, +{ 0x0000, "aud_microwave_grenade" }, +{ 0x0000, "aud_microwave_grenade_sparks_dude" }, +{ 0x0000, "aud_microwave_grenade_sparks_env" }, +{ 0x0000, "aud_min" }, +{ 0x0000, "aud_monitor_irons" }, +{ 0x0000, "aud_morgue_bodybag_doors" }, +{ 0x0000, "aud_morgue_bodybag_line_emt" }, +{ 0x0000, "aud_morgue_computer_door_entry_sfx" }, +{ 0x0000, "aud_mus_boost" }, +{ 0x0000, "aud_music_state" }, +{ 0x0000, "aud_num_alive_enemies" }, +{ 0x0000, "aud_observation_guard_radio" }, +{ 0x0000, "aud_old_music_state" }, +{ 0x0000, "aud_onearm_weapon_swap" }, +{ 0x0000, "aud_overrides" }, +{ 0x0000, "aud_pa_announc_01" }, +{ 0x0000, "aud_pa_announc_02" }, +{ 0x0000, "aud_pa_announc_03" }, +{ 0x0000, "aud_pa_announc_04" }, +{ 0x0000, "aud_painting_fall" }, +{ 0x0000, "aud_panic_walla" }, +{ 0x0000, "aud_patching_in_foley" }, +{ 0x0000, "aud_patrol_helo_debris_sfx" }, +{ 0x0000, "aud_penthouse_front_door" }, +{ 0x0000, "aud_percent_chance" }, +{ 0x0000, "aud_piston_ent" }, +{ 0x0000, "aud_pitbull_crash_concussion" }, +{ 0x0000, "aud_play" }, +{ 0x0000, "aud_play_announcer_warning" }, +{ 0x0000, "aud_play_distance_attenuated_2d" }, +{ 0x0000, "aud_play_dust" }, +{ 0x0000, "aud_play_dynamic_explosion" }, +{ 0x0000, "aud_play_horror_ambience" }, +{ 0x0000, "aud_play_laser_move_down" }, +{ 0x0000, "aud_play_laser_move_up" }, +{ 0x0000, "aud_play_line_emitter" }, +{ 0x0000, "aud_play_pcap_vo" }, +{ 0x0000, "aud_play_pod_impact" }, +{ 0x0000, "aud_play_point_source_loop" }, +{ 0x0000, "aud_play_rocket_travel_loops" }, +{ 0x0000, "aud_play_tank_explosion" }, +{ 0x0000, "aud_play_trophy_fire" }, +{ 0x0000, "aud_player_bus_exo_jump" }, +{ 0x0000, "aud_player_bus_exo_land" }, +{ 0x0000, "aud_player_bus_jump_handplant" }, +{ 0x0000, "aud_player_bus_land" }, +{ 0x0000, "aud_player_bus1_exo_land" }, +{ 0x0000, "aud_player_bus1_land" }, +{ 0x0000, "aud_player_climb_foley" }, +{ 0x0000, "aud_player_climb_to_ledge" }, +{ 0x0000, "aud_player_computer" }, +{ 0x0000, "aud_player_computer_gl_timing_fix" }, +{ 0x0000, "aud_player_computer_promo" }, +{ 0x0000, "aud_player_exo_punch_driver" }, +{ 0x0000, "aud_player_exo_punch_metal_plate" }, +{ 0x0000, "aud_player_gets_in_tank" }, +{ 0x0000, "aud_player_grab_mirror" }, +{ 0x0000, "aud_player_hill_slide" }, +{ 0x0000, "aud_player_jump_back_to_bus" }, +{ 0x0000, "aud_player_jump_to_truck" }, +{ 0x0000, "aud_player_land_back_on_bus" }, +{ 0x0000, "aud_player_land_on_truck" }, +{ 0x0000, "aud_player_rappel_complete" }, +{ 0x0000, "aud_player_throw_driver" }, +{ 0x0000, "aud_player_throw_metal_plate" }, +{ 0x0000, "aud_player_wall_climb_01" }, +{ 0x0000, "aud_player_wall_climb_02" }, +{ 0x0000, "aud_player_wall_climb_03" }, +{ 0x0000, "aud_player_wall_climb_04" }, +{ 0x0000, "aud_player_wall_climb_05" }, +{ 0x0000, "aud_playermech_end" }, +{ 0x0000, "aud_playermech_foley_override_handler" }, +{ 0x0000, "aud_playermech_start" }, +{ 0x0000, "aud_plr_hit" }, +{ 0x0000, "aud_plr_hit_vo_line" }, +{ 0x0000, "aud_plr_hit_vo_look" }, +{ 0x0000, "aud_plr_hit_vo_move_back" }, +{ 0x0000, "aud_plr_hit_vo_move_forward" }, +{ 0x0000, "aud_plr_inside_mech" }, +{ 0x0000, "aud_pod_arm_reach" }, +{ 0x0000, "aud_pod_hits_ground" }, +{ 0x0000, "aud_pod_hits_ground_corrected" }, +{ 0x0000, "aud_pod_scene_begin" }, +{ 0x0000, "aud_pod_turbulence_01" }, +{ 0x0000, "aud_pod_turbulence_02" }, +{ 0x0000, "aud_poolhouse_ambience" }, +{ 0x0000, "aud_post_courtyard_emitters" }, +{ 0x0000, "aud_print" }, +{ 0x0000, "aud_print_3d_on_ent" }, +{ 0x0000, "aud_print_debug" }, +{ 0x0000, "aud_print_error" }, +{ 0x0000, "aud_print_synch" }, +{ 0x0000, "aud_print_warning" }, +{ 0x0000, "aud_print_zone" }, +{ 0x0000, "aud_print_zone_small" }, +{ 0x0000, "aud_rappel_player_hookup" }, +{ 0x0000, "aud_rappel_player_movement_start" }, +{ 0x0000, "aud_rappel_player_movement_stop" }, +{ 0x0000, "aud_reached_penthouse" }, +{ 0x0000, "aud_ready_hooks" }, +{ 0x0000, "aud_recon_foley" }, +{ 0x0000, "aud_red_light" }, +{ 0x0000, "aud_reinforcements_door1" }, +{ 0x0000, "aud_reinforcements_door2" }, +{ 0x0000, "aud_rescue_drone" }, +{ 0x0000, "aud_rescue_sfx_a" }, +{ 0x0000, "aud_rescue_sfx_b" }, +{ 0x0000, "aud_rescue_sfx_c" }, +{ 0x0000, "aud_rescue_sfx_d" }, +{ 0x0000, "aud_rescue_sfx_e" }, +{ 0x0000, "aud_rescue_sfx_f" }, +{ 0x0000, "aud_rescue_sfx_g" }, +{ 0x0000, "aud_rocket_launch_start" }, +{ 0x0000, "aud_rocket_stage_01_start" }, +{ 0x0000, "aud_rooftop_warbird_departing" }, +{ 0x0000, "aud_rooftop_wind_volume" }, +{ 0x0000, "aud_rooftops_ambience" }, +{ 0x0000, "aud_rotate_vector_yaw" }, +{ 0x0000, "aud_run_tank_system" }, +{ 0x0000, "aud_s1_elevator_boss_foley" }, +{ 0x0000, "aud_s1_elevator_cormack_foley" }, +{ 0x0000, "aud_s1_elevator_guard_foley" }, +{ 0x0000, "aud_s1_elevator_kick_1" }, +{ 0x0000, "aud_s1_elevator_kick_2" }, +{ 0x0000, "aud_s2walk_alarm_tone_lp" }, +{ 0x0000, "aud_s2walk_cell_prisoners" }, +{ 0x0000, "aud_s2walk_cells_foley_mix" }, +{ 0x0000, "aud_s2walk_clear_foley_mix" }, +{ 0x0000, "aud_s2walk_cormack_punched" }, +{ 0x0000, "aud_s2walk_door_close" }, +{ 0x0000, "aud_s2walk_door_open" }, +{ 0x0000, "aud_s2walk_emitters" }, +{ 0x0000, "aud_s2walk_execution_fire" }, +{ 0x0000, "aud_s2walk_execution_kneeling_prisoners" }, +{ 0x0000, "aud_s2walk_flyby_1" }, +{ 0x0000, "aud_s2walk_guard_3_foley_01" }, +{ 0x0000, "aud_s2walk_guard_3_foley_02" }, +{ 0x0000, "aud_s2walk_guard_hip_radio" }, +{ 0x0000, "aud_s2walk_guard_radios" }, +{ 0x0000, "aud_s2walk_ilona_push" }, +{ 0x0000, "aud_s2walk_loudspeaker2_line1" }, +{ 0x0000, "aud_s2walk_loudspeaker2_line2" }, +{ 0x0000, "aud_s2walk_prisoner_2_beating" }, +{ 0x0000, "aud_s2walk_start_cormack_foley" }, +{ 0x0000, "aud_s2walk_start_gideon_bodyfall" }, +{ 0x0000, "aud_s2walk_start_gideon_foley" }, +{ 0x0000, "aud_s2walk_start_guard_1_foley" }, +{ 0x0000, "aud_s2walk_start_guard_1_grabpush" }, +{ 0x0000, "aud_s2walk_start_guard_2_foley" }, +{ 0x0000, "aud_s2walk_start_guard_2_grab" }, +{ 0x0000, "aud_s2walk_start_guard_2_grabpush" }, +{ 0x0000, "aud_s2walk_start_guard_2_push" }, +{ 0x0000, "aud_s2walk_start_guard_3_foley" }, +{ 0x0000, "aud_s2walk_start_guard_3_walkup_foley" }, +{ 0x0000, "aud_s2walk_start_ilona_foley" }, +{ 0x0000, "aud_s2walk_start_player_foley" }, +{ 0x0000, "aud_s2walk_temp_guard_vo" }, +{ 0x0000, "aud_s2walk_trigger_start" }, +{ 0x0000, "aud_s2walk_yard_prisoners_whimpering" }, +{ 0x0000, "aud_s3escape_doctor_radio" }, +{ 0x0000, "aud_scale_envelope" }, +{ 0x0000, "aud_scale_vector" }, +{ 0x0000, "aud_scale_vector_2d" }, +{ 0x0000, "aud_scanner_door_open" }, +{ 0x0000, "aud_security_alarm" }, +{ 0x0000, "aud_security_center_drones_on" }, +{ 0x0000, "aud_security_countdown" }, +{ 0x0000, "aud_security_hatch_exit" }, +{ 0x0000, "aud_security_main_screen" }, +{ 0x0000, "aud_security_plant_emp" }, +{ 0x0000, "aud_security_prints" }, +{ 0x0000, "aud_security_reboot" }, +{ 0x0000, "aud_security_vent" }, +{ 0x0000, "aud_security_welcome" }, +{ 0x0000, "aud_separation_door" }, +{ 0x0000, "aud_separation_elevator" }, +{ 0x0000, "aud_separation_logic" }, +{ 0x0000, "aud_server_room_door_crack" }, +{ 0x0000, "aud_server_room_door_enter" }, +{ 0x0000, "aud_server_room_door_kick" }, +{ 0x0000, "aud_server_room_thermite" }, +{ 0x0000, "aud_server_thermite_burn_loop" }, +{ 0x0000, "aud_server_thermite_burn_start" }, +{ 0x0000, "aud_server_thermite_out" }, +{ 0x0000, "aud_set_ambi_submix" }, +{ 0x0000, "aud_set_level_fade_time" }, +{ 0x0000, "aud_set_mission_failed_music" }, +{ 0x0000, "aud_set_music_submix" }, +{ 0x0000, "aud_set_point_source_loop_volume" }, +{ 0x0000, "aud_set_spec_ops" }, +{ 0x0000, "aud_set_sticky_threat" }, +{ 0x0000, "aud_set_timescale" }, +{ 0x0000, "aud_setup_drop_pod_loop" }, +{ 0x0000, "aud_shack_explode" }, +{ 0x0000, "aud_shack_explode_whizby" }, +{ 0x0000, "aud_slomo_wait" }, +{ 0x0000, "aud_smooth" }, +{ 0x0000, "aud_sonar_vision_off" }, +{ 0x0000, "aud_sonar_vision_on" }, +{ 0x0000, "aud_spark_1" }, +{ 0x0000, "aud_spark_2" }, +{ 0x0000, "aud_spark_3" }, +{ 0x0000, "aud_spark_4" }, +{ 0x0000, "aud_spark_5" }, +{ 0x0000, "aud_sprinklers" }, +{ 0x0000, "aud_start_dna_events" }, +{ 0x0000, "aud_start_dna_events_cg" }, +{ 0x0000, "aud_start_exfil_foley" }, +{ 0x0000, "aud_start_nyse_fire" }, +{ 0x0000, "aud_start_slow_mo_gunshot_callback" }, +{ 0x0000, "aud_stealth_broken_timer" }, +{ 0x0000, "aud_stealth_melee" }, +{ 0x0000, "aud_stop_and_delete_ent" }, +{ 0x0000, "aud_stop_cormack_foley" }, +{ 0x0000, "aud_stop_headspace_ambience" }, +{ 0x0000, "aud_stop_horror_ambience" }, +{ 0x0000, "aud_stop_line_emitter" }, +{ 0x0000, "aud_stop_mech_panic_walla_watcher" }, +{ 0x0000, "aud_stop_mute_device_for_vo" }, +{ 0x0000, "aud_stop_point_source_loop" }, +{ 0x0000, "aud_stop_slow_mo_gunshot_callback" }, +{ 0x0000, "aud_stop_sound_logic" }, +{ 0x0000, "aud_stop_training_mute_device" }, +{ 0x0000, "aud_stop_vrap_mute_device" }, +{ 0x0000, "aud_table_pulldown" }, +{ 0x0000, "aud_tank_death_listener" }, +{ 0x0000, "aud_tank_field_littlebird" }, +{ 0x0000, "aud_tank_field_warbird" }, +{ 0x0000, "aud_tank_fire_watch" }, +{ 0x0000, "aud_tank_road_littlebird_1" }, +{ 0x0000, "aud_tank_road_littlebird_2" }, +{ 0x0000, "aud_tank_section_vehicles_handler" }, +{ 0x0000, "aud_tank_section_vehicles_spawned" }, +{ 0x0000, "aud_tanker_crash" }, +{ 0x0000, "aud_tanker_fall_down" }, +{ 0x0000, "aud_tennis_court_wakeup" }, +{ 0x0000, "aud_tire_splash" }, +{ 0x0000, "aud_titan_siege_mode_adj_left_side" }, +{ 0x0000, "aud_titan_siege_mode_adj_left_side_back" }, +{ 0x0000, "aud_titan_siege_mode_adj_right_side" }, +{ 0x0000, "aud_titan_siege_mode_adj_right_side_bac"... }, +{ 0x0000, "aud_training_s2_potus_ziptie_release" }, +{ 0x0000, "aud_transport_chopper" }, +{ 0x0000, "aud_trolley_music" }, +{ 0x0000, "aud_truck_dodge_slowmo_start" }, +{ 0x0000, "aud_truck_dodge_slowmo_whoosh" }, +{ 0x0000, "aud_truck_hits_divider" }, +{ 0x0000, "aud_truck_hits_ground" }, +{ 0x0000, "aud_truck_jump_slowmo" }, +{ 0x0000, "aud_truck_punch_slowmo" }, +{ 0x0000, "aud_truck1_engine_pullup" }, +{ 0x0000, "aud_truck2_engine_drive" }, +{ 0x0000, "aud_truck2_engine_idle" }, +{ 0x0000, "aud_truck2_engine_pullup" }, +{ 0x0000, "aud_trucks_arrive" }, +{ 0x0000, "aud_turret_entry" }, +{ 0x0000, "aud_turrets_activate" }, +{ 0x0000, "aud_use_string_tables" }, +{ 0x0000, "aud_var_nade_type" }, +{ 0x0000, "aud_vector_magnitude_2d" }, +{ 0x0000, "aud_vehicle_ride_data" }, +{ 0x0000, "aud_vrap_mute_start" }, +{ 0x0000, "aud_vtol_excellerate_end" }, +{ 0x0000, "aud_vtol_excellerate_start" }, +{ 0x0000, "aud_vtol_exterior_idle" }, +{ 0x0000, "aud_vtol_land" }, +{ 0x0000, "aud_vtol_passed" }, +{ 0x0000, "aud_wait_delay" }, +{ 0x0000, "aud_wait_for_mission_fail_music" }, +{ 0x0000, "aud_wakeup_amb" }, +{ 0x0000, "aud_wakeup_mech_cooldown_pings" }, +{ 0x0000, "aud_wakeup_mix" }, +{ 0x0000, "aud_warehouse_mech_lift" }, +{ 0x0000, "aud_warehouse_mech_lift_alarm" }, +{ 0x0000, "aud_warehouse_mech_lift_vo" }, +{ 0x0000, "aud_warehouse_roof_machines" }, +{ 0x0000, "aud_warehouse_roof_machines_line" }, +{ 0x0000, "aud_warning_vo" }, +{ 0x0000, "aud_watch_for_anim_end" }, +{ 0x0000, "aud_water_footsteps_foley" }, +{ 0x0000, "aud_water_footsteps_override" }, +{ 0x0000, "aud_water_sound" }, +{ 0x0000, "aud_waterfall_ambience" }, +{ 0x0000, "aud_windmill_sniper_whizby" }, +{ 0x0000, "aud_zap_logic_change" }, +{ 0x0000, "aud_zap_scene" }, +{ 0x0000, "audiblesightplaying" }, +{ 0x0000, "audio" }, +{ 0x0000, "audio_buzzer_struct" }, +{ 0x0000, "audio_jet_counter" }, +{ 0x0000, "audio_monitor_chopper01_death" }, +{ 0x0000, "audio_monitor_chopper02_death" }, +{ 0x0000, "audio_org" }, +{ 0x0000, "audio_presets_music_cue_groups" }, +{ 0x0000, "audio_presets_music_cues" }, +{ 0x0000, "audio_presets_music_moods" }, +{ 0x0000, "audio_presets_vehicle_maps" }, +{ 0x0000, "audio_presets_vehicles" }, +{ 0x0000, "audio_push_1_box_drop" }, +{ 0x0000, "audio_push_1_box_pickup" }, +{ 0x0000, "audio_push_1_box_push" }, +{ 0x0000, "audio_push_1_crane_move_1" }, +{ 0x0000, "audio_push_1_crane_move_2" }, +{ 0x0000, "audio_push_1_crane_move_3" }, +{ 0x0000, "audio_push_2_box_drop" }, +{ 0x0000, "audio_push_2_box_pickup" }, +{ 0x0000, "audio_push_2_box_push" }, +{ 0x0000, "audio_push_2_crane_move_1" }, +{ 0x0000, "audio_push_2_crane_move_2" }, +{ 0x0000, "audio_push_2_crane_move_3" }, +{ 0x0000, "audio_start_wrestling_exo_guy" }, +{ 0x0000, "audio_start_wrestling_guy2" }, +{ 0x0000, "audio_start_wrestling_guy3" }, +{ 0x0000, "audio_start_wrestling_guy4" }, +{ 0x0000, "audio_start_wrestling_guy5" }, +{ 0x0000, "audio_stingers_school_bodies_room" }, +{ 0x0000, "audio_stringtable_mapname" }, +{ 0x0000, "audio_zones" }, +{ 0x0000, "audx_attenuate" }, +{ 0x0000, "audx_delete_on_sounddone_internal" }, +{ 0x0000, "audx_do_dynamic_explosion_math" }, +{ 0x0000, "audx_duck" }, +{ 0x0000, "audx_fade_in_internal" }, +{ 0x0000, "audx_fade_out_internal" }, +{ 0x0000, "audx_play_distance_attenuated_2d_intern"... }, +{ 0x0000, "audx_play_line_emitter_internal" }, +{ 0x0000, "audx_print_3d_timer" }, +{ 0x0000, "audx_set_spec_ops" }, +{ 0x0000, "audx_slomo_wait" }, +{ 0x0000, "auto_adjust_difficulty_player_movement_"... }, +{ 0x0000, "auto_adjust_difficulty_player_positione"... }, +{ 0x0000, "auto_adjust_difficulty_track_player_dea"... }, +{ 0x0000, "auto_adjust_difficulty_track_player_sho"... }, +{ 0x0000, "auto_adjust_enemy_death_detection" }, +{ 0x0000, "auto_adjust_enemy_died" }, +{ 0x0000, "auto_adjust_flags" }, +{ 0x0000, "auto_adjust_new_zone" }, +{ 0x0000, "auto_adjust_results" }, +{ 0x0000, "auto_adust_zone_complete" }, +{ 0x0000, "auto_combat_music" }, +{ 0x0000, "auto_mg42_target" }, +{ 0x0000, "auto_mgturretlink" }, +{ 0x0000, "auto_occumulator_base" }, +{ 0x0000, "auto_recloak" }, +{ 0x0000, "autoadjust_playerspots" }, +{ 0x0000, "autoassign" }, +{ 0x0000, "autoclose" }, +{ 0x0000, "autofocus_hipenable" }, +{ 0x0000, "autofocus_hipenable_bike" }, +{ 0x0000, "autofocus_loop" }, +{ 0x0000, "autopsy_cleanup" }, +{ 0x0000, "autopsy_create_fodder_techs" }, +{ 0x0000, "autopsy_doctor_door_doctor" }, +{ 0x0000, "autopsy_doctor_door_enemies" }, +{ 0x0000, "autopsy_doctor_door_enemy_ammo" }, +{ 0x0000, "autopsy_doctor_door_enemy_think" }, +{ 0x0000, "autopsy_doctor_door_fail" }, +{ 0x0000, "autopsy_doctor_door_gideon" }, +{ 0x0000, "autopsy_doctor_door_no_hint" }, +{ 0x0000, "autopsy_doctor_door_player" }, +{ 0x0000, "autopsy_door_action" }, +{ 0x0000, "autopsy_door_tech" }, +{ 0x0000, "autopsy_first_frame_entry_doors" }, +{ 0x0000, "autopsy_fodder_tech_animate" }, +{ 0x0000, "autopsy_fodder_tech_think" }, +{ 0x0000, "autopsy_guard" }, +{ 0x0000, "autopsy_guard_player_hit" }, +{ 0x0000, "autopsy_main_doctor" }, +{ 0x0000, "autopsy_start" }, +{ 0x0000, "autoresettime" }, +{ 0x0000, "autosave_by_name" }, +{ 0x0000, "autosave_by_name_silent" }, +{ 0x0000, "autosave_by_name_thread" }, +{ 0x0000, "autosave_check_override" }, +{ 0x0000, "autosave_check_pitbull_moving" }, +{ 0x0000, "autosave_check_pitbull_no_recent_accel" }, +{ 0x0000, "autosave_check_pitbull_upright" }, +{ 0x0000, "autosave_fly_check" }, +{ 0x0000, "autosave_hostile_drone_check" }, +{ 0x0000, "autosave_jetbike_check_too_slow" }, +{ 0x0000, "autosave_jetbike_check_trailing" }, +{ 0x0000, "autosave_now" }, +{ 0x0000, "autosave_now_silent" }, +{ 0x0000, "autosave_now_trigger" }, +{ 0x0000, "autosave_or_timeout" }, +{ 0x0000, "autosave_proximity_threat_func" }, +{ 0x0000, "autosave_recon" }, +{ 0x0000, "autosave_stealth" }, +{ 0x0000, "autosave_stealth_meter_check" }, +{ 0x0000, "autosave_stealth_silent" }, +{ 0x0000, "autosave_stealth_spotted_check" }, +{ 0x0000, "autosave_tactical" }, +{ 0x0000, "autosave_tactical_grenade_check" }, +{ 0x0000, "autosave_tactical_grenade_check_dieout" }, +{ 0x0000, "autosave_tactical_player_nades" }, +{ 0x0000, "autosave_tactical_proc" }, +{ 0x0000, "autosave_tactical_setup" }, +{ 0x0000, "autosave_threat_check_enabled" }, +{ 0x0000, "autosave_timeout" }, +{ 0x0000, "autosaveammocheck" }, +{ 0x0000, "autosavecheck" }, +{ 0x0000, "autosavecheck_not_picky" }, +{ 0x0000, "autosaveconfcentercombatcheck" }, +{ 0x0000, "autosaveconfcenterstealthcheck" }, +{ 0x0000, "autosavehealthcheck" }, +{ 0x0000, "autosavenamethink" }, +{ 0x0000, "autosaveplayercheck" }, +{ 0x0000, "autosaveprint" }, +{ 0x0000, "autosaves_think" }, +{ 0x0000, "autosavesniperdronestealth" }, +{ 0x0000, "autosavethreatcheck" }, +{ 0x0000, "autoshootanimrate" }, +{ 0x0000, "autospot_is_close_to_player" }, +{ 0x0000, "autospotadswatcher" }, +{ 0x0000, "autospotdeathwatcher" }, +{ 0x0000, "autotarget" }, +{ 0x0000, "auxillary_hud" }, +{ 0x0000, "available" }, +{ 0x0000, "available_crash_paths" }, +{ 0x0000, "availablepositions" }, +{ 0x0000, "avalanche_environment" }, +{ 0x0000, "avalanche_falling_death" }, +{ 0x0000, "avatar" }, +{ 0x0000, "avatar_after_spawn" }, +{ 0x0000, "avatar_scheduled_for_removal" }, +{ 0x0000, "avatar_spawnpoint" }, +{ 0x0000, "avatarinfo" }, +{ 0x0000, "avengedplayerevent" }, +{ 0x0000, "avm_add_envelope" }, +{ 0x0000, "avm_add_in_state_callback" }, +{ 0x0000, "avm_add_init_state_callback" }, +{ 0x0000, "avm_add_loops" }, +{ 0x0000, "avm_add_oneshot" }, +{ 0x0000, "avm_add_oneshots" }, +{ 0x0000, "avm_add_param_map_env" }, +{ 0x0000, "avm_add_state_transition" }, +{ 0x0000, "avm_begin_behavior_data" }, +{ 0x0000, "avm_begin_behavior_def" }, +{ 0x0000, "avm_begin_loop_data" }, +{ 0x0000, "avm_begin_loop_def" }, +{ 0x0000, "avm_begin_oneshot_data" }, +{ 0x0000, "avm_begin_oneshot_def" }, +{ 0x0000, "avm_begin_param_map" }, +{ 0x0000, "avm_begin_preset_def" }, +{ 0x0000, "avm_begin_state_data" }, +{ 0x0000, "avm_begin_state_def" }, +{ 0x0000, "avm_begin_state_group" }, +{ 0x0000, "avm_change_smoothing_rate" }, +{ 0x0000, "avm_compute_alpha_from_rc" }, +{ 0x0000, "avm_compute_doppler_pitch" }, +{ 0x0000, "avm_compute_smoothing_rc_from_alpha" }, +{ 0x0000, "avm_create_vehicle_proxy" }, +{ 0x0000, "avm_end_behavior_data" }, +{ 0x0000, "avm_end_behavior_def" }, +{ 0x0000, "avm_end_loop_data" }, +{ 0x0000, "avm_end_loop_def" }, +{ 0x0000, "avm_end_oneshot_data" }, +{ 0x0000, "avm_end_oneshot_def" }, +{ 0x0000, "avm_end_param_map" }, +{ 0x0000, "avm_end_preset_def" }, +{ 0x0000, "avm_end_state_data" }, +{ 0x0000, "avm_end_state_def" }, +{ 0x0000, "avm_end_state_group" }, +{ 0x0000, "avm_get_running_instance_count" }, +{ 0x0000, "avm_get_update_rate" }, +{ 0x0000, "avm_init" }, +{ 0x0000, "avm_register_callback" }, +{ 0x0000, "avm_set_instance_master_volume" }, +{ 0x0000, "avm_set_loop_mute_state" }, +{ 0x0000, "avmx_add_behavior_shortcut_param_maps" }, +{ 0x0000, "avmx_add_instance" }, +{ 0x0000, "avmx_add_oneshot_ducking_scalar" }, +{ 0x0000, "avmx_add_preset" }, +{ 0x0000, "avmx_are_all_defined" }, +{ 0x0000, "avmx_continuously_update_snd_ent" }, +{ 0x0000, "avmx_create_instance_struct" }, +{ 0x0000, "avmx_create_param_io_struct" }, +{ 0x0000, "avmx_create_preset" }, +{ 0x0000, "avmx_fade_stop_and_delete_sound_obj" }, +{ 0x0000, "avmx_generate_instance_name" }, +{ 0x0000, "avmx_get" }, +{ 0x0000, "avmx_get_behavior_instance_struct" }, +{ 0x0000, "avmx_get_behavior_preset_struct" }, +{ 0x0000, "avmx_get_behavior_restricted_oneshots" }, +{ 0x0000, "avmx_get_callback" }, +{ 0x0000, "avmx_get_current_instance_sound_item_in"... }, +{ 0x0000, "avmx_get_envelope" }, +{ 0x0000, "avmx_get_fadein_time" }, +{ 0x0000, "avmx_get_fadeout_time" }, +{ 0x0000, "avmx_get_instance" }, +{ 0x0000, "avmx_get_instance_name" }, +{ 0x0000, "avmx_get_instance_preset" }, +{ 0x0000, "avmx_get_instance_preset_name" }, +{ 0x0000, "avmx_get_instance_sound_item_output" }, +{ 0x0000, "avmx_get_instance_sound_item_volume" }, +{ 0x0000, "avmx_get_instance_state_struct" }, +{ 0x0000, "avmx_get_master_volume" }, +{ 0x0000, "avmx_get_oneshot_poly_mode" }, +{ 0x0000, "avmx_get_oneshot_update_mode" }, +{ 0x0000, "avmx_get_preset" }, +{ 0x0000, "avmx_get_preset_name" }, +{ 0x0000, "avmx_get_sound_alias" }, +{ 0x0000, "avmx_get_sound_alias_count" }, +{ 0x0000, "avmx_get_sound_instance" }, +{ 0x0000, "avmx_get_state_preset_struct" }, +{ 0x0000, "avmx_get_vehicle_entity" }, +{ 0x0000, "avmx_handle_oneshot_ducking" }, +{ 0x0000, "avmx_is_player_mode" }, +{ 0x0000, "avmx_is_vehicle_proxy" }, +{ 0x0000, "avmx_launch_state_machines" }, +{ 0x0000, "avmx_map_input" }, +{ 0x0000, "avmx_map_io" }, +{ 0x0000, "avmx_monitor_death" }, +{ 0x0000, "avmx_monitor_oneshot_done" }, +{ 0x0000, "avmx_normalize_ranged_value" }, +{ 0x0000, "avmx_preset_determine_param_map_env_own"... }, +{ 0x0000, "avmx_preset_determine_param_map_owner" }, +{ 0x0000, "avmx_preset_set_param_map_defaults" }, +{ 0x0000, "avmx_remove_instance" }, +{ 0x0000, "avmx_remove_oneshot_ducking_scalar" }, +{ 0x0000, "avmx_set_behavior_oneshot_overrides" }, +{ 0x0000, "avmx_set_instance_init_callback" }, +{ 0x0000, "avmx_set_instance_master_volume" }, +{ 0x0000, "avmx_set_loop_play_state" }, +{ 0x0000, "avmx_set_loop_volume" }, +{ 0x0000, "avmx_set_oneshot_ducking_scalar" }, +{ 0x0000, "avmx_set_oneshot_update_mode" }, +{ 0x0000, "avmx_set_preset_name" }, +{ 0x0000, "avmx_start_instance" }, +{ 0x0000, "avmx_start_loop" }, +{ 0x0000, "avmx_start_oneshot_alias" }, +{ 0x0000, "avmx_state_condition_function" }, +{ 0x0000, "avmx_state_enter_action_function" }, +{ 0x0000, "avmx_state_enter_action_init_data" }, +{ 0x0000, "avmx_state_enter_action_play_loops" }, +{ 0x0000, "avmx_state_enter_action_play_oneshots" }, +{ 0x0000, "avmx_state_exit_action_function" }, +{ 0x0000, "avmx_stop_instance" }, +{ 0x0000, "avmx_stop_loop" }, +{ 0x0000, "avmx_stop_snd_ent" }, +{ 0x0000, "avmx_update_instance_loop_assets" }, +{ 0x0000, "avmx_update_loop_ducking_scalar" }, +{ 0x0000, "avmx_update_loops" }, +{ 0x0000, "avmx_update_oneshot_duck_scalar" }, +{ 0x0000, "avmx_update_sound_ent_output_param" }, +{ 0x0000, "avmx_vehicle_getspeed" }, +{ 0x0000, "avoid_players" }, +{ 0x0000, "avoidairstrikelocations" }, +{ 0x0000, "avoidcarepackages" }, +{ 0x0000, "avoidcornervisibleenemies" }, +{ 0x0000, "avoidenemiesbydistance" }, +{ 0x0000, "avoidenemyspawn" }, +{ 0x0000, "avoidfullvisibleenemies" }, +{ 0x0000, "avoidgasclouds" }, +{ 0x0000, "avoidgrenades" }, +{ 0x0000, "avoidkillstreakonspawntimer" }, +{ 0x0000, "avoidlastattackerlocation" }, +{ 0x0000, "avoidlastdeathlocation" }, +{ 0x0000, "avoidmines" }, +{ 0x0000, "avoidrecentlyused" }, +{ 0x0000, "avoidsamespawn" }, +{ 0x0000, "avoidspawninhp" }, +{ 0x0000, "avoidtelefrag" }, +{ 0x0000, "award_intel" }, +{ 0x0000, "award_player_exo_challenge_kill_for_sce"... }, +{ 0x0000, "awardcapturepoints" }, +{ 0x0000, "awardedfinalsurvivor" }, +{ 0x0000, "awardgameevent" }, +{ 0x0000, "awardhordeheadshots" }, +{ 0x0000, "awardhordekill" }, +{ 0x0000, "awardhorderevive" }, +{ 0x0000, "awardhorderoundnumber" }, +{ 0x0000, "awardhordweaponlevel" }, +{ 0x0000, "awardpoints" }, +{ 0x0000, "awardxp" }, +{ 0x0000, "aware_aievents" }, +{ 0x0000, "awareness_meter_fail" }, +{ 0x0000, "awareness_param" }, +{ 0x0000, "axis_check_cloak_state" }, +{ 0x0000, "axis_global_accuracy_mod" }, +{ 0x0000, "axis_start_spawn_name" }, +{ 0x0000, "axiscapturing" }, +{ 0x0000, "axischopper" }, +{ 0x0000, "axisflagcarrierclientnum" }, +{ 0x0000, "axisflagstatus" }, +{ 0x0000, "axismode" }, +{ 0x0000, "azm_get_current_zone" }, +{ 0x0000, "azm_get_damb_enable" }, +{ 0x0000, "azm_get_filter_bypass" }, +{ 0x0000, "azm_get_filter_enable" }, +{ 0x0000, "azm_get_mix_bypass" }, +{ 0x0000, "azm_get_mix_enable" }, +{ 0x0000, "azm_get_occlusion_bypass" }, +{ 0x0000, "azm_get_occlusion_enable" }, +{ 0x0000, "azm_get_quad_enable" }, +{ 0x0000, "azm_get_reverb_bypass" }, +{ 0x0000, "azm_get_reverb_enable" }, +{ 0x0000, "azm_init" }, +{ 0x0000, "azm_print_enter_blend" }, +{ 0x0000, "azm_print_exit_blend" }, +{ 0x0000, "azm_print_progress" }, +{ 0x0000, "azm_set_current_zone" }, +{ 0x0000, "azm_set_damb_enable" }, +{ 0x0000, "azm_set_filter_bypass" }, +{ 0x0000, "azm_set_filter_enable" }, +{ 0x0000, "azm_set_mix_bypass" }, +{ 0x0000, "azm_set_mix_enable" }, +{ 0x0000, "azm_set_occlusion_bypass" }, +{ 0x0000, "azm_set_occlusion_enable" }, +{ 0x0000, "azm_set_quad_enable" }, +{ 0x0000, "azm_set_reverb_bypass" }, +{ 0x0000, "azm_set_reverb_enable" }, +{ 0x0000, "azm_set_zone_dynamic_ambience" }, +{ 0x0000, "azm_set_zone_mix" }, +{ 0x0000, "azm_set_zone_occlusion" }, +{ 0x0000, "azm_set_zone_reverb" }, +{ 0x0000, "azm_set_zone_streamed_ambience" }, +{ 0x0000, "azm_start_zone" }, +{ 0x0000, "azm_stop_zone" }, +{ 0x0000, "azm_stop_zones" }, +{ 0x0000, "azm_use_string_table" }, +{ 0x0000, "azmx_blend_zones" }, +{ 0x0000, "azmx_get_blend_args" }, +{ 0x0000, "azmx_get_preset_from_string_table" }, +{ 0x0000, "azmx_get_zone_preset_from_stringtable_i"... }, +{ 0x0000, "azmx_is_valid_damb_blend_request" }, +{ 0x0000, "azmx_is_valid_mix_blend_request" }, +{ 0x0000, "azmx_is_valid_samb_blend_request" }, +{ 0x0000, "azmx_load_zone" }, +{ 0x0000, "azmx_restart_damb" }, +{ 0x0000, "azmx_restart_mix" }, +{ 0x0000, "azmx_restart_occlusion" }, +{ 0x0000, "azmx_restart_reverb" }, +{ 0x0000, "azmx_restart_stream" }, +{ 0x0000, "azmx_set_param_internal" }, +{ 0x0000, "azmx_wait_till_fade_done_and_remove_zon"... }, +// + +*/ \ No newline at end of file diff --git a/src/h1/xsk/resolver.hpp b/src/h1/xsk/resolver.hpp index d2fb26a..eb5213b 100644 --- a/src/h1/xsk/resolver.hpp +++ b/src/h1/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::h1 diff --git a/src/h2/stdafx.hpp b/src/h2/stdafx.hpp index d4f3dd6..1119f2b 100644 --- a/src/h2/stdafx.hpp +++ b/src/h2/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/h2/xsk/assembler.cpp b/src/h2/xsk/assembler.cpp index eec2333..8b55e02 100644 --- a/src/h2/xsk/assembler.cpp +++ b/src/h2/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -379,24 +393,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -405,9 +407,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -423,33 +424,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint16_t file_id = 0; - std::uint16_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -458,22 +451,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -487,25 +471,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -514,25 +499,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = (std::uint16_t)std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFF; - if (field_id == 0) - { - field_id = 0xFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 0xD5D7) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -543,7 +516,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -572,24 +545,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/h2/xsk/assembler.hpp b/src/h2/xsk/assembler.hpp index b2728b6..61c6726 100644 --- a/src/h2/xsk/assembler.hpp +++ b/src/h2/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::h2 diff --git a/src/h2/xsk/compiler.cpp b/src/h2/xsk/compiler.cpp index 407e820..1ca2afd 100644 --- a/src/h2/xsk/compiler.cpp +++ b/src/h2/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = h2__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -393,9 +393,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -534,7 +534,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -588,7 +588,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -734,7 +734,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -755,9 +755,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -847,7 +847,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -897,7 +897,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1055,7 +1055,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1109,7 +1109,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1372,10 +1372,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1392,7 +1392,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1408,7 +1408,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1490,10 +1490,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1510,7 +1510,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1526,7 +1526,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1548,7 +1548,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1624,7 +1624,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1791,7 +1791,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2082,7 +2082,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2094,7 +2094,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2107,7 +2107,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2224,7 +2224,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2261,7 +2261,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2304,7 +2304,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2434,7 +2434,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2706,7 +2706,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2735,7 +2735,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/h2/xsk/compiler.hpp b/src/h2/xsk/compiler.hpp index 7be3a95..2c7f16b 100644 --- a/src/h2/xsk/compiler.hpp +++ b/src/h2/xsk/compiler.hpp @@ -88,7 +88,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/h2/xsk/decompiler.cpp b/src/h2/xsk/decompiler.cpp index 4e5b1c5..cac833e 100644 --- a/src/h2/xsk/decompiler.cpp +++ b/src/h2/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1365,7 +1365,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1846,7 +1846,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1921,7 +1921,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2057,7 +2057,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2164,11 +2164,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2566,7 +2566,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2685,7 +2685,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3076,7 +3076,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/h2/xsk/disassembler.cpp b/src/h2/xsk/disassembler.cpp index 8eeeb57..a4f0555 100644 --- a/src/h2/xsk/disassembler.cpp +++ b/src/h2/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// H2 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,8 +69,8 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); @@ -169,7 +169,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -311,19 +311,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -342,88 +337,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint16_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0xD5D7) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x40000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -431,24 +381,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -458,7 +448,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 10; @@ -481,7 +471,7 @@ void disassembler::resolve_local_functions() case opcode::OP_ScriptLocalChildThreadCall: case opcode::OP_ScriptLocalMethodThreadCall: case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); + inst->data[0] = resolve_function(inst->data[0]); break; default: break; @@ -513,9 +503,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -533,40 +523,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/h2/xsk/disassembler.hpp b/src/h2/xsk/disassembler.hpp index 7603bf2..185c847 100644 --- a/src/h2/xsk/disassembler.hpp +++ b/src/h2/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/h2/xsk/h2.hpp b/src/h2/xsk/h2.hpp index 4741a6b..571fdd4 100644 --- a/src/h2/xsk/h2.hpp +++ b/src/h2/xsk/h2.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::h2 { +constexpr std::uint16_t max_string_id = 0xD5D7; + enum class opcode : std::uint8_t { OP_SetNewLocalVariableFieldCached0 = 0x17, diff --git a/src/h2/xsk/lexer.cpp b/src/h2/xsk/lexer.cpp index db01098..1fb3e15 100644 --- a/src/h2/xsk/lexer.cpp +++ b/src/h2/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 111 -#define YY_END_OF_BUFFER 112 +#define YY_NUM_RULES 112 +#define YY_END_OF_BUFFER 113 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[333] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, - 1, 2, 95, 110, 110, 94, 98, 110, 55, 56, - 92, 90, 61, 91, 62, 93, 109, 109, 64, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 111, + 1, 2, 95, 111, 111, 94, 98, 111, 55, 56, + 92, 90, 61, 91, 62, 93, 110, 110, 64, 65, 79, 89, 80, 66, 101, 59, 60, 99, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 57, 97, 58, 96, 5, 6, - 5, 12, 13, 12, 110, 92, 93, 76, 0, 103, + 5, 12, 13, 12, 111, 92, 93, 76, 0, 103, 0, 15, 0, 0, 0, 0, 85, 0, 74, 0, - 87, 0, 0, 8, 83, 67, 81, 68, 82, 105, - 0, 11, 4, 3, 84, 105, 109, 106, 0, 0, + 87, 0, 0, 8, 83, 67, 81, 68, 82, 106, + 0, 11, 4, 3, 84, 106, 110, 107, 0, 0, 0, 0, 63, 71, 77, 75, 78, 72, 101, 88, 101, 101, 101, 101, 101, 101, 29, 101, 101, 101, 101, 101, 27, 33, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 86, 73, 7, 14, 10, 9, 0, 103, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 103, 0, 105, 0, 3, 105, - 105, 106, 107, 108, 100, 69, 70, 101, 101, 101, + 0, 0, 0, 0, 103, 0, 106, 0, 3, 106, + 106, 107, 108, 109, 100, 69, 70, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 31, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 104, 0, 0, 0, 0, 0, 102, 0, 0, @@ -595,7 +595,7 @@ static const flex_int16_t yy_accept[333] = 54, 101, 101, 101, 101, 101, 101, 101, 101, 101, 30, 0, 0, 0, 0, 0, 101, 101, 101, 101, 101, 21, 101, 101, 39, 34, 101, 43, 101, 101, - 101, 104, 0, 0, 16, 0, 101, 101, 101, 36, + 101, 105, 0, 0, 16, 0, 101, 101, 101, 36, 32, 101, 101, 101, 101, 101, 101, 0, 17, 0, 101, 101, 38, 101, 42, 101, 101, 101, 23, 19, @@ -1193,11 +1193,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1256,582 +1256,587 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw h2::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw h2::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw h2::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return h2::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw h2::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return h2::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw h2::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw h2::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return h2::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return h2::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return h2::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return h2::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return h2::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return h2::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return h2::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return h2::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return h2::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return h2::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return h2::parser::make_WAITFRAME(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return h2::parser::make_IF(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return h2::parser::make_ELSE(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return h2::parser::make_DO(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return h2::parser::make_WHILE(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return h2::parser::make_FOR(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return h2::parser::make_FOREACH(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return h2::parser::make_IN(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return h2::parser::make_SWITCH(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return h2::parser::make_CASE(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return h2::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return h2::parser::make_BREAK(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return h2::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return h2::parser::make_RETURN(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return h2::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return h2::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return h2::parser::make_PROFEND(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return h2::parser::make_THREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return h2::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return h2::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return h2::parser::make_CALL(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return h2::parser::make_TRUE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return h2::parser::make_FALSE(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return h2::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return h2::parser::make_SIZE(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return h2::parser::make_GAME(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return h2::parser::make_SELF(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return h2::parser::make_ANIM(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return h2::parser::make_LEVEL(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return h2::parser::make_LPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return h2::parser::make_RPAREN(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return h2::parser::make_LBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return h2::parser::make_RBRACE(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return h2::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return h2::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return h2::parser::make_COMMA(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return h2::parser::make_DOT(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return h2::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return h2::parser::make_COLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return h2::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return h2::parser::make_QMARK(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return h2::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return h2::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return h2::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return h2::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return h2::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return h2::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return h2::parser::make_OR(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return h2::parser::make_AND(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return h2::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return h2::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return h2::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return h2::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return h2::parser::make_LESS(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return h2::parser::make_GREATER(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return h2::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return h2::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return h2::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return h2::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return h2::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return h2::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return h2::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return h2::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return h2::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return h2::parser::make_ADD(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return h2::parser::make_SUB(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return h2::parser::make_MUL(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return h2::parser::make_DIV(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return h2::parser::make_MOD(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return h2::parser::make_NOT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return h2::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return h2::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return h2::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" +#line 157 "lexer.lpp" { return h2::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return h2::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return h2::parser::make_PATH(xsk::gsc::h2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return h2::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 159 "lexer.lpp" +{ return h2::parser::make_IDENTIFIER(xsk::gsc::h2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" -{ return h2::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 160 "lexer.lpp" +{ return h2::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 103: /* rule 103 can match eol */ YY_RULE_SETUP -#line 160 "lexer.lpp" +#line 161 "lexer.lpp" { return h2::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return h2::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 162 "lexer.lpp" +{ return h2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return h2::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return h2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return h2::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return h2::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return h2::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return h2::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return h2::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 166 "lexer.lpp" +{ return h2::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 109: YY_RULE_SETUP -#line 166 "lexer.lpp" -{ return h2::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 167 "lexer.lpp" -{ if(ctx->header_top > 0) h2_pop_header(ctx); else return h2::parser::make_H2EOF(ctx->loc); } +{ return h2::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 110: -/* rule 110 can match eol */ YY_RULE_SETUP #line 168 "lexer.lpp" -{ throw h2::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return h2::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 169 "lexer.lpp" +{ if(ctx->header_top > 0) h2_pop_header(ctx); else return h2::parser::make_H2EOF(ctx->loc); } YY_BREAK case 111: +/* rule 111 can match eol */ YY_RULE_SETUP #line 170 "lexer.lpp" +{ throw h2::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 172 "lexer.lpp" ECHO; YY_BREAK -#line 1834 "lexer.cpp" +#line 1839 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2961,65 +2966,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" void h2_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3027,9 +3032,9 @@ void h2_push_header(xsk::gsc::context* ctx, const std::string& file) void h2_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/h2/xsk/lexer.hpp b/src/h2/xsk/lexer.hpp index ee7ad0f..8a004cc 100644 --- a/src/h2/xsk/lexer.hpp +++ b/src/h2/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/h2/xsk/parser.cpp b/src/h2/xsk/parser.cpp index f7a9b07..64454b1 100644 --- a/src/h2/xsk/parser.cpp +++ b/src/h2/xsk/parser.cpp @@ -498,10 +498,7 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -802,10 +799,7 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1106,10 +1100,7 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1409,10 +1400,7 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1967,10 +1955,7 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1995,1321 +1980,1303 @@ namespace xsk { namespace gsc { namespace h2 { switch (yyn) { case 2: // root: program -#line 254 "parser.ypp" +#line 251 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2001 "parser.cpp" +#line 1986 "parser.cpp" break; case 3: // root: %empty -#line 255 "parser.ypp" +#line 252 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 2007 "parser.cpp" +#line 1992 "parser.cpp" break; case 4: // program: program inline -#line 260 "parser.ypp" +#line 257 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2013 "parser.cpp" +#line 1998 "parser.cpp" break; case 5: // program: program include -#line 262 "parser.ypp" +#line 259 "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 2019 "parser.cpp" +#line 2004 "parser.cpp" break; case 6: // program: program declaration -#line 264 "parser.ypp" +#line 261 "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 2025 "parser.cpp" +#line 2010 "parser.cpp" break; case 7: // program: inline -#line 266 "parser.ypp" +#line 263 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2031 "parser.cpp" +#line 2016 "parser.cpp" break; case 8: // program: include -#line 268 "parser.ypp" +#line 265 "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 2037 "parser.cpp" +#line 2022 "parser.cpp" break; case 9: // program: declaration -#line 270 "parser.ypp" +#line 267 "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 2043 "parser.cpp" +#line 2028 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 274 "parser.ypp" +#line 271 "parser.ypp" { h2_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2049 "parser.cpp" +#line 2034 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 279 "parser.ypp" +#line 276 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2055 "parser.cpp" +#line 2040 "parser.cpp" break; case 12: // declaration: "/#" -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2061 "parser.cpp" +#line 2046 "parser.cpp" break; case 13: // declaration: "#/" -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2067 "parser.cpp" +#line 2052 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2073 "parser.cpp" +#line 2058 "parser.cpp" break; case 15: // declaration: decl_constant -#line 286 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2079 "parser.cpp" +#line 2064 "parser.cpp" break; case 16: // declaration: decl_thread -#line 287 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2085 "parser.cpp" +#line 2070 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 292 "parser.ypp" +#line 289 "parser.ypp" { ctx->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 2091 "parser.cpp" +#line 2076 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 297 "parser.ypp" +#line 294 "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 2097 "parser.cpp" +#line 2082 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 302 "parser.ypp" +#line 299 "parser.ypp" { ctx->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 2103 "parser.cpp" +#line 2088 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2109 "parser.cpp" +#line 2094 "parser.cpp" break; case 21: // stmt: stmt_block -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2115 "parser.cpp" +#line 2100 "parser.cpp" break; case 22: // stmt: stmt_call -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2121 "parser.cpp" +#line 2106 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2127 "parser.cpp" +#line 2112 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2133 "parser.cpp" +#line 2118 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2139 "parser.cpp" +#line 2124 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2145 "parser.cpp" +#line 2130 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2151 "parser.cpp" +#line 2136 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2157 "parser.cpp" +#line 2142 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2163 "parser.cpp" +#line 2148 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } -#line 2169 "parser.cpp" +#line 2154 "parser.cpp" break; case 31: // stmt: stmt_if -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2175 "parser.cpp" +#line 2160 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2181 "parser.cpp" +#line 2166 "parser.cpp" break; case 33: // stmt: stmt_while -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2187 "parser.cpp" +#line 2172 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2193 "parser.cpp" +#line 2178 "parser.cpp" break; case 35: // stmt: stmt_for -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2199 "parser.cpp" +#line 2184 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2205 "parser.cpp" +#line 2190 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2211 "parser.cpp" +#line 2196 "parser.cpp" break; case 38: // stmt: stmt_case -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2217 "parser.cpp" +#line 2202 "parser.cpp" break; case 39: // stmt: stmt_default -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2223 "parser.cpp" +#line 2208 "parser.cpp" break; case 40: // stmt: stmt_break -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2229 "parser.cpp" +#line 2214 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2235 "parser.cpp" +#line 2220 "parser.cpp" break; case 42: // stmt: stmt_return -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2241 "parser.cpp" +#line 2226 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 329 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2247 "parser.cpp" +#line 2232 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 330 "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 2253 "parser.cpp" +#line 2238 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 331 "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 2259 "parser.cpp" +#line 2244 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 335 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2265 "parser.cpp" +#line 2250 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 336 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2271 "parser.cpp" +#line 2256 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 340 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2277 "parser.cpp" +#line 2262 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 341 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2283 "parser.cpp" +#line 2268 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 346 "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 2289 "parser.cpp" +#line 2274 "parser.cpp" break; case 51: // stmt_list: stmt -#line 348 "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 2295 "parser.cpp" +#line 2280 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 353 "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 2301 "parser.cpp" +#line 2286 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 355 "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 2307 "parser.cpp" +#line 2292 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 357 "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 2313 "parser.cpp" +#line 2298 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 359 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2319 "parser.cpp" +#line 2304 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 364 "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 2325 "parser.cpp" +#line 2310 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 366 "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 2331 "parser.cpp" +#line 2316 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 371 "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 2337 "parser.cpp" +#line 2322 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 373 "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 2343 "parser.cpp" +#line 2328 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 375 "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 2349 "parser.cpp" +#line 2334 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 380 "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 2355 "parser.cpp" +#line 2340 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 385 "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 2361 "parser.cpp" +#line 2346 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 387 "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 2367 "parser.cpp" +#line 2352 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 392 "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 2373 "parser.cpp" +#line 2358 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 397 "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 2379 "parser.cpp" +#line 2364 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 399 "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 2385 "parser.cpp" +#line 2370 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 404 "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 2391 "parser.cpp" +#line 2376 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 406 "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 2397 "parser.cpp" +#line 2382 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 411 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2403 "parser.cpp" +#line 2388 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 416 "parser.ypp" +#line 413 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2409 "parser.cpp" +#line 2394 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 418 "parser.ypp" +#line 415 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2415 "parser.cpp" +#line 2400 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2421 "parser.cpp" +#line 2406 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 428 "parser.ypp" +#line 425 "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 2427 "parser.cpp" +#line 2412 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2433 "parser.cpp" +#line 2418 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 438 "parser.ypp" +#line 435 "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 2439 "parser.cpp" +#line 2424 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 443 "parser.ypp" +#line 440 "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 2445 "parser.cpp" +#line 2430 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 448 "parser.ypp" +#line 445 "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 2451 "parser.cpp" +#line 2436 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 450 "parser.ypp" +#line 447 "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 2457 "parser.cpp" +#line 2442 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 455 "parser.ypp" +#line 452 "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 2463 "parser.cpp" +#line 2448 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 460 "parser.ypp" +#line 457 "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 2469 "parser.cpp" +#line 2454 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 462 "parser.ypp" +#line 459 "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 2475 "parser.cpp" +#line 2460 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2481 "parser.cpp" +#line 2466 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2487 "parser.cpp" +#line 2472 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 477 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2493 "parser.cpp" +#line 2478 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 482 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2499 "parser.cpp" +#line 2484 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 484 "parser.ypp" +#line 481 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2505 "parser.cpp" +#line 2490 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 489 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2511 "parser.cpp" +#line 2496 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 494 "parser.ypp" +#line 491 "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 2517 "parser.cpp" +#line 2502 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 499 "parser.ypp" +#line 496 "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 2523 "parser.cpp" +#line 2508 "parser.cpp" break; case 90: // expr: expr_ternary -#line 503 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2529 "parser.cpp" +#line 2514 "parser.cpp" break; case 91: // expr: expr_binary -#line 504 "parser.ypp" +#line 501 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2535 "parser.cpp" +#line 2520 "parser.cpp" break; case 92: // expr: expr_primitive -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2541 "parser.cpp" +#line 2526 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2547 "parser.cpp" +#line 2532 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 510 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2553 "parser.cpp" +#line 2538 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2559 "parser.cpp" +#line 2544 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2565 "parser.cpp" +#line 2550 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2571 "parser.cpp" +#line 2556 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2577 "parser.cpp" +#line 2562 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2583 "parser.cpp" +#line 2568 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2589 "parser.cpp" +#line 2574 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 527 "parser.ypp" +#line 524 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2595 "parser.cpp" +#line 2580 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 529 "parser.ypp" +#line 526 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2601 "parser.cpp" +#line 2586 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 531 "parser.ypp" +#line 528 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2607 "parser.cpp" +#line 2592 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 533 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2613 "parser.cpp" +#line 2598 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 535 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2619 "parser.cpp" +#line 2604 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 540 "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 2625 "parser.cpp" +#line 2610 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 542 "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 2631 "parser.cpp" +#line 2616 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 547 "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 2637 "parser.cpp" +#line 2622 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 549 "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 2643 "parser.cpp" +#line 2628 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 554 "parser.ypp" +#line 551 "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 2649 "parser.cpp" +#line 2634 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2655 "parser.cpp" +#line 2640 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2661 "parser.cpp" +#line 2646 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2667 "parser.cpp" +#line 2652 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2673 "parser.cpp" +#line 2658 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2679 "parser.cpp" +#line 2664 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2685 "parser.cpp" +#line 2670 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2691 "parser.cpp" +#line 2676 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2697 "parser.cpp" +#line 2682 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2703 "parser.cpp" +#line 2688 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2709 "parser.cpp" +#line 2694 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2715 "parser.cpp" +#line 2700 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2721 "parser.cpp" +#line 2706 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2727 "parser.cpp" +#line 2712 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 585 "parser.ypp" +#line 582 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2733 "parser.cpp" +#line 2718 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2739 "parser.cpp" +#line 2724 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2745 "parser.cpp" +#line 2730 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2751 "parser.cpp" +#line 2736 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2757 "parser.cpp" +#line 2742 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2763 "parser.cpp" +#line 2748 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2769 "parser.cpp" +#line 2754 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2775 "parser.cpp" +#line 2760 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2781 "parser.cpp" +#line 2766 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2787 "parser.cpp" +#line 2772 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2793 "parser.cpp" +#line 2778 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2799 "parser.cpp" +#line 2784 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2805 "parser.cpp" +#line 2790 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2811 "parser.cpp" +#line 2796 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2817 "parser.cpp" +#line 2802 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2823 "parser.cpp" +#line 2808 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2829 "parser.cpp" +#line 2814 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2835 "parser.cpp" +#line 2820 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2841 "parser.cpp" +#line 2826 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2847 "parser.cpp" +#line 2832 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2853 "parser.cpp" +#line 2838 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2859 "parser.cpp" +#line 2844 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2865 "parser.cpp" +#line 2850 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 615 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2871 "parser.cpp" +#line 2856 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 616 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2877 "parser.cpp" +#line 2862 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 617 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2883 "parser.cpp" +#line 2868 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 618 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2889 "parser.cpp" +#line 2874 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2895 "parser.cpp" +#line 2880 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 620 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2901 "parser.cpp" +#line 2886 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 621 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2907 "parser.cpp" +#line 2892 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 622 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2913 "parser.cpp" +#line 2898 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 623 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2919 "parser.cpp" +#line 2904 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2925 "parser.cpp" +#line 2910 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2931 "parser.cpp" +#line 2916 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 634 "parser.ypp" +#line 631 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2937 "parser.cpp" +#line 2922 "parser.cpp" break; case 159: // expr_call: expr_function -#line 638 "parser.ypp" +#line 635 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2943 "parser.cpp" +#line 2928 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 639 "parser.ypp" +#line 636 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2949 "parser.cpp" +#line 2934 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 642 "parser.ypp" +#line 639 "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 2955 "parser.cpp" +#line 2940 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 643 "parser.ypp" +#line 640 "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 2961 "parser.cpp" +#line 2946 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2967 "parser.cpp" +#line 2952 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 647 "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 2973 "parser.cpp" +#line 2958 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 649 "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 2979 "parser.cpp" +#line 2964 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 651 "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 2985 "parser.cpp" +#line 2970 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 653 "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 2991 "parser.cpp" +#line 2976 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 658 "parser.ypp" +#line 655 "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 2997 "parser.cpp" +#line 2982 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 660 "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 3003 "parser.cpp" +#line 2988 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 665 "parser.ypp" +#line 662 "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 3009 "parser.cpp" +#line 2994 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 667 "parser.ypp" +#line 664 "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 3015 "parser.cpp" +#line 3000 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 669 "parser.ypp" +#line 666 "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 3021 "parser.cpp" +#line 3006 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 674 "parser.ypp" +#line 671 "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 3027 "parser.cpp" +#line 3012 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 679 "parser.ypp" +#line 676 "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 3033 "parser.cpp" +#line 3018 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 681 "parser.ypp" +#line 678 "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 3039 "parser.cpp" +#line 3024 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 683 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3045 "parser.cpp" +#line 3030 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 688 "parser.ypp" +#line 685 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3051 "parser.cpp" +#line 3036 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 690 "parser.ypp" +#line 687 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3057 "parser.cpp" +#line 3042 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 695 "parser.ypp" +#line 692 "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 3063 "parser.cpp" +#line 3048 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 697 "parser.ypp" +#line 694 "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 3069 "parser.cpp" +#line 3054 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 702 "parser.ypp" +#line 699 "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 3075 "parser.cpp" +#line 3060 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3081 "parser.cpp" +#line 3066 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 709 "parser.ypp" +#line 706 "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 3087 "parser.cpp" +#line 3072 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 714 "parser.ypp" +#line 711 "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 3093 "parser.cpp" +#line 3078 "parser.cpp" break; case 185: // expr_size: expr_object ".size" -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3099 "parser.cpp" +#line 3084 "parser.cpp" break; case 186: // expr_paren: "(" expr ")" -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3105 "parser.cpp" +#line 3090 "parser.cpp" break; case 187: // expr_object: expr_call -#line 728 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3111 "parser.cpp" +#line 3096 "parser.cpp" break; case 188: // expr_object: expr_method -#line 729 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3117 "parser.cpp" +#line 3102 "parser.cpp" break; case 189: // expr_object: expr_array -#line 730 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3123 "parser.cpp" +#line 3108 "parser.cpp" break; case 190: // expr_object: expr_field -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3129 "parser.cpp" +#line 3114 "parser.cpp" break; case 191: // expr_object: expr_game -#line 732 "parser.ypp" +#line 729 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3135 "parser.cpp" +#line 3120 "parser.cpp" break; case 192: // expr_object: expr_self -#line 733 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3141 "parser.cpp" +#line 3126 "parser.cpp" break; case 193: // expr_object: expr_anim -#line 734 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3147 "parser.cpp" +#line 3132 "parser.cpp" break; case 194: // expr_object: expr_level -#line 735 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3153 "parser.cpp" +#line 3138 "parser.cpp" break; case 195: // expr_object: expr_identifier -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3159 "parser.cpp" +#line 3144 "parser.cpp" break; case 196: // expr_thisthread: "thisthread" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3165 "parser.cpp" +#line 3150 "parser.cpp" break; case 197: // expr_empty_array: "[" "]" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3171 "parser.cpp" +#line 3156 "parser.cpp" break; case 198: // expr_undefined: "undefined" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3177 "parser.cpp" +#line 3162 "parser.cpp" break; case 199: // expr_game: "game" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3183 "parser.cpp" +#line 3168 "parser.cpp" break; case 200: // expr_self: "self" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3189 "parser.cpp" +#line 3174 "parser.cpp" break; case 201: // expr_anim: "anim" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3195 "parser.cpp" +#line 3180 "parser.cpp" break; case 202: // expr_level: "level" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3201 "parser.cpp" +#line 3186 "parser.cpp" break; case 203: // expr_animation: "%" "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3207 "parser.cpp" +#line 3192 "parser.cpp" break; case 204: // expr_animtree: "#animtree" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3213 "parser.cpp" +#line 3198 "parser.cpp" break; case 205: // expr_identifier: "identifier" -#line 786 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3219 "parser.cpp" +#line 3204 "parser.cpp" break; case 206: // expr_path: "path" -#line 791 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3225 "parser.cpp" +#line 3210 "parser.cpp" break; case 207: // expr_path: expr_identifier -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3231 "parser.cpp" +#line 3216 "parser.cpp" break; case 208: // expr_istring: "localized string" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3237 "parser.cpp" +#line 3222 "parser.cpp" break; case 209: // expr_string: "string literal" -#line 803 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3243 "parser.cpp" +#line 3228 "parser.cpp" break; case 210: // expr_color: "color" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3249 "parser.cpp" +#line 3234 "parser.cpp" break; case 211: // expr_vector: "(" expr "," expr "," expr ")" -#line 813 "parser.ypp" +#line 810 "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 3255 "parser.cpp" +#line 3240 "parser.cpp" break; case 212: // expr_float: "-" "float" -#line 818 "parser.ypp" +#line 815 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3261 "parser.cpp" +#line 3246 "parser.cpp" break; case 213: // expr_float: "float" -#line 820 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3267 "parser.cpp" +#line 3252 "parser.cpp" break; - case 214: // expr_integer: "-" "int" -#line 825 "parser.ypp" + case 214: // expr_integer: "-" "integer" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3273 "parser.cpp" +#line 3258 "parser.cpp" break; - case 215: // expr_integer: "int" -#line 827 "parser.ypp" + case 215: // expr_integer: "integer" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3279 "parser.cpp" +#line 3264 "parser.cpp" break; - case 216: // expr_integer: "octal int" + case 216: // expr_false: "false" #line 829 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3285 "parser.cpp" - break; - - case 217: // expr_integer: "binary int" -#line 831 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3291 "parser.cpp" - break; - - case 218: // expr_integer: "hexadecimal int" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3297 "parser.cpp" - break; - - case 219: // expr_false: "false" -#line 838 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3303 "parser.cpp" +#line 3270 "parser.cpp" break; - case 220: // expr_true: "true" -#line 843 "parser.ypp" + case 217: // expr_true: "true" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3309 "parser.cpp" +#line 3276 "parser.cpp" break; -#line 3313 "parser.cpp" +#line 3280 "parser.cpp" default: break; @@ -3504,25 +3471,24 @@ namespace xsk { namespace gsc { namespace h2 { ">>", "||", "&&", "==", "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", - "localized string", "color", "float", "int", "octal int", "binary int", - "hexadecimal int", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", - "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", - "inline", "include", "declaration", "decl_usingtree", "decl_constant", - "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", - "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", - "stmt_wait", "stmt_waittill", "stmt_waittillmatch", - "stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", + "localized string", "color", "float", "integer", "ADD_ARRAY", "THEN", + "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", "POSTINC", "POSTDEC", + "$accept", "root", "program", "inline", "include", "declaration", + "decl_usingtree", "decl_constant", "decl_thread", "stmt", "stmt_dev", + "stmt_block", "stmt_list", "stmt_expr", "stmt_call", "stmt_assign", + "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", + "stmt_waittillmatch", "stmt_waittillframeend", "stmt_waitframe", + "stmt_if", "stmt_ifelse", "stmt_while", "stmt_dowhile", "stmt_for", + "stmt_foreach", "stmt_switch", "stmt_case", "stmt_default", "stmt_break", + "stmt_continue", "stmt_return", "stmt_breakpoint", "stmt_prof_begin", + "stmt_prof_end", "expr", "expr_or_empty", "expr_assign", + "expr_increment", "expr_decrement", "expr_ternary", "expr_binary", + "expr_primitive", "expr_complement", "expr_not", "expr_call", + "expr_method", "expr_function", "expr_pointer", "expr_add_array", + "expr_parameters", "expr_arguments", "expr_arguments_no_empty", + "expr_reference", "expr_array", "expr_field", "expr_size", "expr_paren", + "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", + "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier", "expr_path", "expr_istring", "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR @@ -3790,58 +3756,57 @@ namespace xsk { namespace gsc { namespace h2 { } - const short parser::yypact_ninf_ = -269; + const short parser::yypact_ninf_ = -261; const short parser::yytable_ninf_ = -208; const short parser::yypact_[] = { - 15, -269, -269, 10, 10, -32, -269, 26, 15, -269, - -269, -269, -269, -269, -269, -20, -269, -269, -24, -21, - -49, -269, -269, -269, -269, -30, 858, -269, -269, -269, - 25, -18, -269, -269, -35, -25, -269, 28, -269, -269, - -269, -269, -269, -269, -269, 858, 724, -30, 858, 858, - 55, -17, -269, -269, -269, -269, -269, -269, -269, 2001, - -269, -269, -269, -269, -269, 198, 435, -269, -269, -269, - -269, 589, 690, -269, -269, 814, -269, -269, -269, 819, - 881, 886, 1084, -269, -269, 552, 67, -269, -269, -269, - -269, -269, -269, -269, -269, 80, 34, -30, 75, 107, - 105, 112, 120, 115, 121, 1287, 724, -269, 2084, 118, - 128, -269, -269, -269, -269, -269, -269, -269, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, -269, 925, -30, - -269, -269, 135, 132, 858, -30, -269, 1021, -269, -269, - 858, 858, -30, 858, 858, -30, 858, -269, 858, 1731, - 858, -269, 1966, 117, 117, 920, 2115, 2166, 2166, 309, - 309, 309, 309, 2125, 632, 2156, 54, 54, -269, -269, - -269, 1771, -269, -30, 13, -269, 141, 1072, 858, 136, - 12, 145, 1225, 147, 150, 153, 155, 33, 156, 152, - 157, 791, 161, 166, 173, -269, 177, 130, 130, -269, - -269, -269, 1123, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, 172, 174, 175, - 178, 180, -269, -269, 36, -269, -269, -269, -269, 7, - 1811, 22, 183, 1851, 29, 192, 1891, 1930, 193, 2084, - 858, -269, 141, -269, 858, -269, 1174, 2036, -269, 200, - -269, 858, 228, 858, -4, -30, 858, 158, 199, 202, - -269, -269, -269, -269, 2071, -269, 858, 858, 858, -269, - -269, 69, 69, -269, -269, -269, -269, -269, -269, -269, - 207, 212, 213, 214, -269, -269, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 210, -269, 858, - 211, -269, 858, 215, 858, 217, 2084, 38, -269, -269, - 209, 1453, 221, 1487, 222, -269, -269, -269, 1251, -7, - 1521, -269, -269, -269, 44, 45, 1731, 858, 858, 858, - 858, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, - 2084, 2084, 223, 46, 225, 53, 227, 1555, 858, -269, - -269, 1225, 858, 1225, 858, 858, -30, 34, 224, 232, - 1589, 1331, 1375, 1419, 858, -269, 858, -269, 858, -269, - 77, 256, 1623, -269, 2084, 235, 1657, 255, -269, -269, - -269, 236, 239, 858, 240, 858, 241, 858, 87, 88, - 98, -269, 1225, 246, -4, 1225, 858, -269, -269, 234, - -269, 254, -269, 257, -269, -269, -269, -269, -269, 258, - -269, 1691, 247, 250, 253, 1225, 1225, -269, -269, -269, - -269, -269 + 24, -261, -261, -71, -71, -23, -261, 39, 24, -261, + -261, -261, -261, -261, -261, -20, -261, -261, -5, -3, + -26, -261, -261, -261, -261, -35, 1143, -261, -261, -261, + 28, 17, -261, -261, -36, -33, -261, 27, -261, -261, + -261, -261, -261, -261, -261, 1143, 1015, -35, 1143, 1143, + -58, 7, -261, -261, -261, -261, 1897, -261, -261, -261, + -261, -261, 345, 435, -261, -261, -261, -261, 581, 609, + -261, -261, 614, -261, -261, -261, 848, 950, 1104, 1168, + -261, -261, 74, 46, -261, -261, -261, -261, -261, -261, + -261, -261, 54, 69, -35, 79, 73, 91, 83, 104, + 101, 110, 1222, 1015, -261, 1980, 111, 116, -261, -261, + -261, -261, -261, -261, -261, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, -261, 1207, -35, -261, -261, 122, + 121, 1143, -35, -261, 785, -261, -261, 1143, 1143, -35, + 1143, 1143, -35, 1143, -261, 1143, 1666, 1143, -261, 1862, + 114, 114, 2011, 2021, 2103, 2103, 53, 53, 53, 53, + 2052, 2093, 2062, 59, 59, -261, -261, -261, 1706, -261, + -35, 18, -261, 130, 836, 1143, 125, -11, 137, 989, + 138, 139, 150, 159, -53, 153, 154, 158, 1079, 160, + 163, 176, -261, 173, 127, 127, -261, -261, -261, 887, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, 168, 171, 174, 179, 180, -261, + -261, 683, -261, -261, -261, -261, 8, 1746, 21, 183, + 1786, 29, 186, 1826, 1010, 182, 1980, 1143, -261, 130, + -261, 1143, -261, 938, 1932, -261, 193, -261, 1143, 220, + 1143, 550, -35, 1143, 145, 191, 195, -261, -261, -261, + -261, 1967, -261, 1143, 1143, 1143, -261, -261, 210, 210, + -261, -261, -261, -261, -261, -261, -261, 202, 208, 212, + 216, -261, -261, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 205, -261, 1143, 213, -261, 1143, + 215, 1143, 222, 1980, 31, -261, -261, 214, 1388, 223, + 1422, 219, -261, -261, -261, 13, -6, 1456, -261, -261, + -261, 32, 50, 1666, 1143, 1143, 1143, 1143, 1980, 1980, + 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 230, + 51, 231, 60, 232, 1490, 1143, -261, -261, 989, 1143, + 989, 1143, 1143, -35, 69, 224, 225, 1524, 1266, 1310, + 1354, 1143, -261, 1143, -261, 1143, -261, 71, 263, 1558, + -261, 1980, 227, 1592, 260, -261, -261, -261, 233, 237, + 1143, 238, 1143, 239, 1143, 78, 84, 85, -261, 989, + 242, 550, 989, 1143, -261, -261, 252, -261, 253, -261, + 256, -261, -261, -261, -261, -261, 278, -261, 1626, 271, + 274, 276, 989, 989, -261, -261, -261, -261, -261 }; const unsigned char @@ -3850,616 +3815,601 @@ namespace xsk { namespace gsc { namespace h2 { 3, 12, 13, 0, 0, 0, 205, 0, 2, 7, 8, 9, 14, 15, 16, 0, 206, 207, 0, 0, 0, 1, 4, 5, 6, 176, 0, 10, 11, 209, - 0, 0, 175, 204, 0, 0, 196, 0, 220, 219, + 0, 0, 175, 204, 0, 0, 196, 0, 217, 216, 198, 199, 200, 201, 202, 0, 178, 0, 0, 0, - 0, 0, 208, 210, 213, 215, 216, 217, 218, 0, - 90, 91, 92, 129, 130, 131, 132, 159, 160, 133, - 134, 135, 136, 137, 138, 0, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 0, 149, 150, 151, - 152, 153, 154, 155, 156, 0, 0, 0, 0, 207, - 0, 0, 207, 0, 0, 0, 178, 197, 180, 0, - 177, 181, 158, 157, 212, 214, 203, 18, 0, 0, + 0, 0, 208, 210, 213, 215, 0, 90, 91, 92, + 129, 130, 131, 132, 159, 160, 133, 134, 135, 136, + 137, 138, 0, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 149, 150, 151, 152, 153, 154, + 155, 156, 0, 0, 0, 0, 207, 0, 0, 207, + 0, 0, 0, 178, 197, 180, 0, 177, 181, 158, + 157, 212, 214, 203, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, - 161, 162, 207, 0, 178, 0, 17, 0, 19, 174, - 0, 178, 0, 0, 178, 0, 0, 186, 0, 180, - 0, 173, 0, 122, 123, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 124, 125, 126, 127, - 128, 0, 184, 0, 0, 177, 182, 0, 0, 0, + 0, 0, 0, 0, 185, 0, 0, 161, 162, 207, + 0, 178, 0, 17, 0, 19, 174, 0, 178, 0, + 0, 178, 0, 0, 186, 0, 180, 0, 173, 0, + 122, 123, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 124, 125, 126, 127, 128, 0, 184, + 0, 0, 177, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 49, 0, 0, 0, 51, - 20, 21, 0, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, - 187, 188, 189, 190, 0, 191, 192, 193, 194, 195, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, - 0, 183, 0, 163, 178, 47, 0, 0, 69, 0, - 70, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 82, 83, 84, 86, 0, 87, 178, 178, 0, 187, - 188, 106, 108, 48, 50, 58, 59, 60, 56, 57, - 0, 0, 0, 0, 107, 109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 165, 178, - 0, 167, 178, 0, 0, 0, 110, 0, 46, 64, - 0, 0, 0, 0, 0, 52, 53, 54, 0, 0, - 0, 81, 80, 85, 0, 0, 0, 0, 0, 0, - 0, 95, 101, 102, 103, 104, 105, 96, 97, 98, - 100, 99, 0, 0, 0, 0, 0, 0, 178, 164, - 71, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 178, 166, 178, 168, 178, 211, - 0, 72, 0, 74, 93, 0, 0, 0, 79, 88, - 89, 0, 0, 178, 0, 178, 0, 178, 0, 0, - 0, 169, 0, 0, 55, 0, 0, 61, 63, 177, - 66, 177, 68, 177, 170, 171, 172, 73, 75, 0, - 77, 0, 0, 0, 0, 0, 0, 62, 65, 67, - 76, 78 + 0, 0, 49, 0, 0, 0, 51, 20, 21, 0, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 0, 0, 0, 187, 188, 189, + 190, 0, 191, 192, 193, 194, 195, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 0, 183, 0, + 163, 178, 47, 0, 0, 69, 0, 70, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 82, 83, 84, + 86, 0, 87, 178, 178, 0, 187, 188, 106, 108, + 48, 50, 58, 59, 60, 56, 57, 0, 0, 0, + 0, 107, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 165, 178, 0, 167, 178, + 0, 0, 0, 110, 0, 46, 64, 0, 0, 0, + 0, 0, 52, 53, 54, 0, 0, 0, 81, 80, + 85, 0, 0, 0, 0, 0, 0, 0, 95, 101, + 102, 103, 104, 105, 96, 97, 98, 100, 99, 0, + 0, 0, 0, 0, 0, 178, 164, 71, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 178, 166, 178, 168, 178, 211, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 178, 0, 178, 0, 178, 0, 0, 0, 169, 0, + 0, 55, 0, 0, 61, 63, 177, 66, 177, 68, + 177, 170, 171, 172, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 62, 65, 67, 76, 78 }; const short parser::yypgoto_[] = { - -269, -269, -269, 273, 319, 321, -269, -269, -269, 163, - -269, -94, 143, -83, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, 190, -269, - -268, -260, -258, -269, -269, -269, -269, -269, -130, -26, - -70, -68, -269, -269, 325, -45, -269, -12, 219, -269, - -269, 245, -269, -269, -269, 252, 300, 335, 369, -269, - -269, 0, 6, -269, -9, -269, -269, -269, 137, -269, - -269 + -261, -261, -261, 321, 323, 324, -261, -261, -261, -183, + -261, -88, 100, -78, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, 187, -261, + -260, -257, -254, -261, -261, -261, -261, -261, -85, -12, + -70, -65, -261, -261, -128, -45, -261, 177, 247, -261, + -261, 257, -261, -261, -261, 275, 332, 359, 365, -261, + -261, 0, 6, -261, 2, -261, -261, -261, 142, -261, + -261 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 209, - 210, 211, 212, 334, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 108, 395, - 237, 238, 239, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 31, 109, 185, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 206, + 207, 208, 209, 331, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 105, 392, + 234, 235, 236, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 31, 106, 182, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 335, 141, 15, 18, - 19, 30, 20, 98, 336, 375, 337, 240, 1, 2, - 3, 4, 5, 101, 25, 32, 21, 96, 34, 35, - 27, 37, 97, 28, 99, 102, 41, 42, 43, 44, - 100, 103, 29, 376, 206, 300, 301, 111, 302, 303, - 26, 144, 207, 208, 16, 6, 269, 240, 263, -207, - 6, 110, 240, 160, 16, 6, 270, 318, 34, 35, - 95, 37, 160, 116, 321, 142, 104, 289, 289, 160, - 147, 143, 240, 369, 138, 16, 6, 139, 160, 378, - 379, 385, 304, 305, 160, 160, 160, 149, 387, 16, - 6, 34, 35, 160, 37, 6, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 138, 277, 145, - 139, 241, 411, 150, 29, 16, 6, 160, 55, 56, - 57, 58, 424, 425, 146, 242, 240, 160, 160, 182, - 134, 135, 136, 426, 289, 186, 335, 249, 160, 114, - 115, 151, 252, 143, 336, 255, 337, 152, 16, 6, - 153, 241, 34, 35, 154, 37, 241, 155, 160, 156, - 41, 42, 43, 44, 140, 242, 141, 161, 206, 144, - 242, 290, 290, 262, 183, 264, 241, 249, 278, 271, - 268, 273, 249, 143, 274, 242, 242, 275, 143, 276, - 242, 132, 133, 134, 135, 136, 281, 249, 249, 280, - 286, 282, 249, 143, 143, 285, 59, 287, 143, 16, - 6, 140, 140, 141, 141, 288, 295, 319, 296, 297, - -187, -187, 298, -187, 299, 105, 322, -187, 112, 113, - 241, 240, 325, 240, 142, 330, -187, 332, 290, -187, - 143, 347, 341, 115, 242, 342, 348, 349, 350, 362, - 364, 368, 242, 370, 366, 372, 249, 384, 140, 386, - 141, 388, 143, 412, 249, 339, 374, 416, 399, 432, - 143, 22, 240, 398, 289, 240, 400, -187, -187, 414, - 417, 142, 142, 418, 420, 422, 159, 143, 143, 433, - 428, 437, 434, 435, 438, 240, 240, 439, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 23, 181, 24, - 266, 429, 0, 0, 279, 0, 0, 0, 142, 0, - 250, 0, 0, 253, 143, 241, 256, 241, 257, 0, - 259, 0, 0, 0, 0, 272, 0, 0, 419, 242, - 421, 242, 423, 0, 0, 0, 243, 119, 120, 0, - 0, 249, 0, 249, 0, 294, 397, 143, 267, 143, - 0, 0, 0, 0, 0, 0, 241, 0, 290, 241, - 0, 284, 244, 132, 133, 134, 135, 136, 0, 245, - 242, 0, 242, 242, 0, 0, 243, 0, 0, 241, - 241, 243, 249, 0, 249, 249, 0, 0, 143, 0, - 143, 143, 0, 242, 242, 0, 243, 243, 0, 294, - 0, 243, 244, 0, 0, 249, 249, 244, 0, 245, - 0, 143, 143, 0, 245, 0, 0, 246, 0, 0, - 326, 0, 291, 292, 0, 0, 0, 244, 0, 245, - 245, 331, 0, 333, 245, 0, 340, -188, -188, 184, - -188, 0, 0, 0, -188, 0, 251, 0, 346, 254, - 0, 0, 247, -188, 0, 243, -188, 246, 0, 0, - 0, 0, 246, 243, 0, 0, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 246, 246, 0, - 0, 244, 246, 0, 367, 0, 248, 0, 245, 338, - 0, 0, 247, 0, -188, -188, 245, 247, 0, 0, - 0, 0, 0, 0, 391, 0, 393, 380, 381, 382, - 383, 0, 247, 247, 0, 0, 0, 247, 0, 0, - 0, 0, 0, 0, 0, 0, 248, 0, 0, 0, - 0, 248, 392, 0, 394, 396, 246, 0, 0, 0, - 0, 0, 0, 0, 246, 427, 248, 248, 430, 0, - 0, 248, 0, 0, -195, -195, 0, -195, 0, 327, - 243, -195, 243, 0, 0, 0, 144, 0, 440, 441, - -195, 247, 0, -195, -207, 0, 431, 0, 0, 247, - 0, 344, 345, 0, 0, 0, 244, 0, 244, 0, - 0, -189, -189, 245, -189, 245, 0, 0, -189, 0, - 0, 243, 0, 243, 243, 248, 0, -189, 0, 0, - -189, -195, -195, 248, 363, 0, 0, 365, 0, 0, - 0, 0, 0, 0, 243, 243, 0, 244, 0, 338, - 244, 0, 0, 0, 245, 0, 245, 245, 0, 0, - 0, 246, 0, 246, 0, 0, 0, 0, -189, -189, - 244, 244, 0, 0, 0, 0, 0, 245, 245, 0, - 119, 120, 0, 390, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 247, 0, 247, 408, - 0, 409, 246, 410, 246, 246, 132, 133, 134, 135, - 136, 0, -190, -190, 0, -190, 0, 0, 0, -190, - 0, 0, 33, 0, 0, 246, 246, 0, -190, 0, - 248, -190, 248, 0, 0, 0, 0, 247, 0, 247, - 247, 0, 0, 0, 0, 0, 34, 35, 36, 37, - 38, 39, 40, 0, 41, 42, 43, 44, 45, 0, - 247, 247, 106, 107, 0, 0, 47, 0, 0, -190, - -190, 248, 0, 248, 248, 0, 0, 0, 0, 0, - 0, 0, 48, 49, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 248, 248, 0, 0, 0, 50, - 0, 0, 51, 16, 6, 29, 52, 53, 54, 55, - 56, 57, 58, 34, 35, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 44, 45, 0, 0, 0, 46, - 0, 0, 0, 47, 0, 283, 34, 35, 0, 37, - 0, -191, -191, 137, -191, 0, 0, 0, -191, 48, - 49, 0, 138, 0, 0, 139, 33, -191, 0, 0, - -191, 0, 0, 0, 0, 0, 50, 0, 0, 51, - 16, 6, 29, 52, 53, 54, 55, 56, 57, 58, - 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, - 43, 44, 45, 16, 6, 0, 46, 0, -191, -191, - 47, 0, 0, -192, -192, 0, -192, 0, -193, -193, - -192, -193, 0, 0, 0, -193, 48, 49, 0, -192, - 0, 0, -192, 33, -193, 0, 0, -193, 0, 0, - 0, 0, 0, 50, 0, 0, 51, 16, 6, 29, - 52, 53, 54, 55, 56, 57, 58, 34, 35, 36, + 15, 107, 137, 17, 17, 145, 269, 138, 15, 18, + 19, 332, 95, 181, 333, 98, 372, 334, 16, 6, + 248, 20, 30, 251, 25, 32, 291, 1, 2, 3, + 4, 5, 274, 266, 96, 99, 111, 112, 29, 21, + 97, 100, 55, 267, 373, 34, 35, 108, 37, 27, + 26, 28, 141, 16, 6, 6, 16, 6, 107, 237, + -207, 135, 93, 260, 136, 29, 315, 94, 157, 301, + 302, 157, 139, 92, 318, 101, 366, 375, 140, 157, + 291, 157, 157, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 146, 376, 382, 113, 142, 237, + 157, 157, 16, 6, 237, 384, -195, -195, 143, -195, + 157, 116, 117, -195, 6, 144, 408, 148, 141, 286, + 286, 157, -195, 421, 237, -195, -207, 147, 157, 422, + 423, 150, 238, 324, 157, 157, 179, 129, 130, 131, + 132, 133, 183, 149, 246, 131, 132, 133, 151, 249, + 140, 332, 252, 152, 333, 341, 342, 334, 153, 34, + 35, 157, 37, -195, -195, 158, 141, 41, 42, 43, + 44, 137, 238, 180, 261, 203, 138, 238, 237, 265, + 259, 268, 270, 271, 246, 388, 286, 390, 360, 246, + 140, 362, 287, 287, 272, 140, 275, 238, 129, 130, + 131, 132, 133, 273, 246, 246, 277, 283, 278, 246, + 140, 140, 279, 56, 282, 140, 16, 6, 137, 137, + 284, 285, 292, 138, 138, 293, 424, 316, 294, 427, + 319, 322, 102, 295, 296, 109, 110, 387, 327, 329, + 112, 139, 34, 35, 338, 37, 344, 140, 339, 437, + 438, 238, 345, 405, 359, 406, 346, 407, 135, 287, + 347, 136, 361, 246, 363, 137, 365, 369, 367, 140, + 138, 246, 336, 371, 381, 383, 385, 140, 396, 397, + 409, 411, 413, 237, 263, 237, 395, 414, 139, 139, + 156, 415, 417, 419, 140, 140, 425, 429, 430, 16, + 6, 431, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 239, 178, 432, 237, 434, 286, 237, 435, 22, + 436, 23, 24, 426, 247, 139, 276, 250, 0, 0, + 253, 140, 254, 0, 256, 0, 0, 237, 237, 0, + 0, 0, 0, 0, 0, 416, 238, 418, 238, 420, + 0, 239, 0, 0, 0, 0, 239, 0, 246, 0, + 246, 0, 264, 394, 140, 0, 140, -187, -187, 0, + -187, 239, 239, 0, -187, 281, 239, 0, 0, 0, + 0, 240, 0, -187, 0, 0, -187, 238, 0, 287, + 238, 241, 0, 0, 0, 0, 0, 0, 0, 246, + 0, 246, 246, 0, 0, 140, 0, 140, 140, 242, + 238, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 240, 246, 246, -187, -187, 240, 0, 140, 140, + 239, 241, 0, 0, 323, 0, 241, 0, 239, 0, + 0, 240, 240, 0, 0, 328, 240, 330, 0, 242, + 337, 288, 289, 0, 242, 0, 241, -188, -188, 0, + -188, 0, 343, 0, -188, 0, 243, 0, 0, 242, + 242, 0, 0, -188, 242, 0, -188, 0, 0, 0, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 0, 0, 244, 0, 0, 0, 0, 364, 245, + 240, 0, 0, 0, 0, 0, 243, 0, 240, 0, + 241, 243, 0, 0, -188, -188, 0, 0, 335, 0, + 0, 377, 378, 379, 380, 0, 243, 243, 242, 0, + 0, 243, 0, 244, 0, 239, 242, 239, 244, 245, + 0, 0, 0, 0, 245, 0, 389, 0, 391, 393, + 0, 0, 0, 244, 244, 0, 0, 0, 244, 245, + 245, 0, 0, 0, 245, 0, 0, 0, 0, 0, + 0, 0, 34, 35, 0, 37, 239, 0, 239, 239, + 41, 42, 43, 44, 0, 243, 0, 0, 203, 0, + 428, 0, 0, 243, 0, 0, 204, 205, 0, 239, + 239, 0, 0, -189, -189, 240, -189, 240, 0, 0, + -189, 0, 244, 0, 0, 241, 0, 241, 245, -189, + 244, 0, -189, 0, 0, 0, 245, 0, 0, 16, + 6, -190, -190, 242, -190, 242, 34, 35, -190, 37, + 0, 0, 0, 134, 0, 0, 240, -190, 240, 240, + -190, 0, 135, 0, 0, 136, 241, 0, 335, 241, + -189, -189, 0, 0, 0, 0, 0, 0, 0, 240, + 240, 0, 0, 0, 242, 0, 242, 242, 0, 241, + 241, 0, 297, 298, 0, 299, 300, 0, -190, -190, + 243, 0, 243, 16, 6, 0, 0, 242, 242, 0, + 0, 0, 0, 0, 0, 34, 35, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 244, 0, 244, + 0, 135, 0, 245, 136, 245, 0, 0, 0, 301, + 302, 243, 0, 243, 243, 0, 0, 0, 0, 0, + 0, 0, 0, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 243, 243, 0, 0, 244, 0, + 244, 244, 16, 6, 245, 0, 245, 245, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, + 0, 244, 244, 0, 0, 0, 185, 245, 245, 186, + 187, 188, 0, 189, 190, 191, 192, 0, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 34, 35, 0, + 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, + 0, 144, 202, 203, 0, 0, 0, 0, 0, 184, + 262, 204, 205, 0, 0, 0, 0, 185, 0, 0, + 186, 187, 188, 0, 189, 190, 191, 192, 0, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 34, 35, + 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, + -191, -191, 144, -191, 203, 0, 0, -191, 0, 0, + 184, 0, 204, 205, 0, 0, -191, 0, 185, -191, + 0, 186, 187, 188, 0, 189, 190, 191, 192, 0, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 34, + 35, 0, 37, 0, 0, 16, 6, 41, 42, 43, + 44, 0, 0, 144, 290, 203, 0, -191, -191, 0, + 0, 184, 325, 204, 205, 0, 0, 0, 0, 185, + 0, 0, 186, 187, 188, 0, 189, 190, 191, 192, + 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 34, 35, 0, 37, 0, 0, 16, 6, 41, 42, + 43, 44, -192, -192, 144, -192, 203, 0, 0, -192, + 0, 0, 184, 0, 204, 205, 0, 0, -192, 0, + 185, -192, 0, 186, 187, 188, 0, 189, 190, 191, + 192, 0, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 34, 35, 33, 37, 0, 0, 16, 6, 41, + 42, 43, 44, 0, 0, 144, 0, 203, 0, -192, + -192, 0, 0, 0, 0, 204, 205, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, - -192, -192, 0, 106, 0, -193, -193, 47, 119, 120, - 0, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 48, 49, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 0, + 321, 0, 0, 103, 104, 115, 0, 47, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 16, 6, + 0, 0, 0, 48, 49, 0, 0, 33, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, - 55, 56, 57, 58, 187, 0, 0, 0, 0, 0, - 0, 0, 188, 0, 0, 189, 190, 191, 0, 192, - 193, 194, 195, 0, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 34, 35, 0, 37, 0, 0, 0, - 0, 41, 42, 43, 44, 0, 0, 147, 205, 206, - 0, 0, 0, 0, 0, 187, 265, 207, 208, 0, - 0, 0, 0, 188, 0, 0, 189, 190, 191, 0, - 192, 193, 194, 195, 0, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 34, 35, 0, 37, 0, 0, - 16, 6, 41, 42, 43, 44, -194, -194, 147, -194, - 206, 0, 0, -194, 0, 0, 187, 0, 207, 208, - 0, 0, -194, 0, 188, -194, 0, 189, 190, 191, - 0, 192, 193, 194, 195, 0, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 34, 35, 0, 37, 0, - 0, 16, 6, 41, 42, 43, 44, 0, 0, 147, - 293, 206, 0, -194, -194, 0, 0, 187, 328, 207, - 208, 0, 0, 0, 0, 188, 0, 0, 189, 190, - 191, 0, 192, 193, 194, 195, 0, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 34, 35, 0, 37, - 0, 0, 16, 6, 41, 42, 43, 44, 0, 0, - 147, 0, 206, 0, 0, 0, 0, 0, 187, 0, - 207, 208, 0, 0, 0, 0, 188, 0, 0, 189, - 190, 191, 0, 192, 193, 194, 195, 0, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 34, 35, 0, - 37, 0, 0, 16, 6, 41, 42, 43, 44, 0, - 0, 147, 0, 206, 0, 0, 0, 0, 0, 0, - 0, 207, 208, 34, 35, 0, 37, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, - 0, 0, 139, 0, 0, 0, 0, 304, 305, 0, - 0, 0, 0, 0, 16, 6, 0, 0, 0, 0, - 0, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 157, 0, 0, 0, 0, 158, 0, 0, - 16, 6, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 402, 0, 0, 0, - 0, 403, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, + 0, 47, 0, 280, 0, 0, -193, -193, 0, -193, + 0, 0, 0, -193, 0, 0, 0, 48, 49, 0, + 0, 33, -193, 0, 0, -193, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 46, 0, -193, -193, 47, 0, 0, 0, 0, + -194, -194, 0, -194, 0, 0, 0, -194, 0, 0, + 0, 48, 49, 0, 0, 33, -194, 0, 0, -194, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 34, + 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, + 44, 45, 0, 0, 0, 103, 0, -194, -194, 47, + 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, + 0, 0, 155, 0, 0, 48, 49, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 50, 0, 0, 51, 16, 6, 29, 52, + 53, 54, 55, 126, 127, 128, 129, 130, 131, 132, + 133, 399, 0, 0, 0, 0, 400, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 401, 0, 0, 0, 0, + 402, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 404, 0, 0, 0, 0, 405, 0, 0, 0, 0, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 406, 0, 0, 0, 0, 407, - 0, 0, 0, 0, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 371, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 373, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 377, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 403, + 0, 0, 0, 0, 404, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 368, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 370, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 389, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 401, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 436, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 374, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 386, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 410, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 433, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 255, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 258, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 314, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 317, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 320, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 257, 0, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 261, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 114, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 126, 127, + 128, 129, 130, 131, 132, 133, 326, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 317, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 320, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 323, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 324, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 260, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 117, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 329, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 343, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 0, 0, 0, 0, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 0, 0, 0, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 0, 0, - 125, 126, 127, 128, 0, 0, 0, 0, 130, 0, - 132, 133, 134, 135, 136, 0, 0, 0, 0, 0, - 132, 133, 134, 135, 136 + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 340, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 116, + 117, 0, 119, 120, 121, 122, 123, 124, 125, 116, + 117, 0, 0, 120, 121, 122, 123, 124, 125, 0, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 127, 128, 129, 130, 131, 132, + 133, 0, 0, 0, 127, 0, 129, 130, 131, 132, + 133, 116, 117, 0, 0, 120, 121, 122, 123, 124, + 125, 116, 117, 0, 0, 0, 0, 122, 123, 124, + 125, 0, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 274, 75, 8, 3, - 4, 20, 44, 48, 274, 22, 274, 147, 3, 4, - 5, 6, 7, 48, 44, 25, 0, 45, 32, 33, - 54, 35, 50, 54, 34, 35, 40, 41, 42, 43, - 34, 35, 91, 50, 48, 9, 10, 47, 12, 13, - 70, 44, 56, 57, 89, 90, 44, 187, 45, 52, - 90, 106, 192, 50, 89, 90, 54, 45, 32, 33, - 45, 35, 50, 90, 45, 75, 48, 207, 208, 50, - 46, 75, 212, 45, 48, 89, 90, 51, 50, 45, - 45, 45, 56, 57, 50, 50, 50, 97, 45, 89, - 90, 32, 33, 50, 35, 90, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 85, 52, - 51, 147, 45, 48, 91, 89, 90, 50, 95, 96, - 97, 98, 45, 45, 54, 147, 266, 50, 50, 139, - 86, 87, 88, 45, 274, 145, 414, 147, 50, 94, - 95, 44, 152, 147, 414, 155, 414, 52, 89, 90, - 48, 187, 32, 33, 44, 35, 192, 52, 50, 48, - 40, 41, 42, 43, 244, 187, 244, 49, 48, 44, - 192, 207, 208, 183, 52, 44, 212, 187, 197, 44, - 54, 44, 192, 187, 44, 207, 208, 44, 192, 44, - 212, 84, 85, 86, 87, 88, 54, 207, 208, 53, - 44, 54, 212, 207, 208, 54, 26, 44, 212, 89, - 90, 291, 292, 291, 292, 48, 54, 44, 54, 54, - 32, 33, 54, 35, 54, 45, 44, 39, 48, 49, - 266, 371, 49, 373, 244, 45, 48, 19, 274, 51, - 244, 44, 53, 95, 266, 53, 44, 44, 44, 49, - 49, 44, 274, 54, 49, 44, 266, 44, 338, 44, - 338, 44, 266, 17, 274, 275, 54, 22, 54, 45, - 274, 8, 412, 377, 414, 415, 54, 89, 90, 54, - 54, 291, 292, 54, 54, 54, 106, 291, 292, 45, - 54, 54, 45, 45, 54, 435, 436, 54, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 8, 138, 8, - 187, 414, -1, -1, 197, -1, -1, -1, 338, -1, - 150, -1, -1, 153, 338, 371, 156, 373, 158, -1, - 160, -1, -1, -1, -1, 192, -1, -1, 403, 371, - 405, 373, 407, -1, -1, -1, 147, 58, 59, -1, - -1, 371, -1, 373, -1, 212, 376, 371, 188, 373, - -1, -1, -1, -1, -1, -1, 412, -1, 414, 415, - -1, 201, 147, 84, 85, 86, 87, 88, -1, 147, - 412, -1, 414, 415, -1, -1, 187, -1, -1, 435, - 436, 192, 412, -1, 414, 415, -1, -1, 412, -1, - 414, 415, -1, 435, 436, -1, 207, 208, -1, 266, - -1, 212, 187, -1, -1, 435, 436, 192, -1, 187, - -1, 435, 436, -1, 192, -1, -1, 147, -1, -1, - 260, -1, 207, 208, -1, -1, -1, 212, -1, 207, - 208, 271, -1, 273, 212, -1, 276, 32, 33, 144, - 35, -1, -1, -1, 39, -1, 151, -1, 288, 154, - -1, -1, 147, 48, -1, 266, 51, 187, -1, -1, - -1, -1, 192, 274, -1, -1, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 207, 208, -1, - -1, 266, 212, -1, 324, -1, 147, -1, 266, 274, - -1, -1, 187, -1, 89, 90, 274, 192, -1, -1, - -1, -1, -1, -1, 371, -1, 373, 347, 348, 349, - 350, -1, 207, 208, -1, -1, -1, 212, -1, -1, - -1, -1, -1, -1, -1, -1, 187, -1, -1, -1, - -1, 192, 372, -1, 374, 375, 266, -1, -1, -1, - -1, -1, -1, -1, 274, 412, 207, 208, 415, -1, - -1, 212, -1, -1, 32, 33, -1, 35, -1, 264, - 371, 39, 373, -1, -1, -1, 44, -1, 435, 436, - 48, 266, -1, 51, 52, -1, 416, -1, -1, 274, - -1, 286, 287, -1, -1, -1, 371, -1, 373, -1, - -1, 32, 33, 371, 35, 373, -1, -1, 39, -1, - -1, 412, -1, 414, 415, 266, -1, 48, -1, -1, - 51, 89, 90, 274, 319, -1, -1, 322, -1, -1, - -1, -1, -1, -1, 435, 436, -1, 412, -1, 414, - 415, -1, -1, -1, 412, -1, 414, 415, -1, -1, - -1, 371, -1, 373, -1, -1, -1, -1, 89, 90, - 435, 436, -1, -1, -1, -1, -1, 435, 436, -1, - 58, 59, -1, 368, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, -1, -1, 371, -1, 373, 384, - -1, 386, 412, 388, 414, 415, 84, 85, 86, 87, - 88, -1, 32, 33, -1, 35, -1, -1, -1, 39, - -1, -1, 8, -1, -1, 435, 436, -1, 48, -1, - 371, 51, 373, -1, -1, -1, -1, 412, -1, 414, - 415, -1, -1, -1, -1, -1, 32, 33, 34, 35, - 36, 37, 38, -1, 40, 41, 42, 43, 44, -1, - 435, 436, 48, 49, -1, -1, 52, -1, -1, 89, - 90, 412, -1, 414, 415, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, -1, -1, -1, -1, 8, - -1, -1, -1, -1, 435, 436, -1, -1, -1, 85, - -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 32, 33, 34, 35, 36, 37, 38, - -1, 40, 41, 42, 43, 44, -1, -1, -1, 48, - -1, -1, -1, 52, -1, 54, 32, 33, -1, 35, - -1, 32, 33, 39, 35, -1, -1, -1, 39, 68, - 69, -1, 48, -1, -1, 51, 8, 48, -1, -1, - 51, -1, -1, -1, -1, -1, 85, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, 89, 90, -1, 48, -1, 89, 90, - 52, -1, -1, 32, 33, -1, 35, -1, 32, 33, - 39, 35, -1, -1, -1, 39, 68, 69, -1, 48, - -1, -1, 51, 8, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 32, 33, 34, - 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, - 89, 90, -1, 48, -1, 89, 90, 52, 58, 59, - -1, 61, 62, 63, 64, 65, 66, 67, -1, -1, - -1, -1, -1, 68, 69, -1, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, - 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 3, -1, -1, -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, -1, - -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, - -1, -1, -1, -1, -1, 3, 4, 56, 57, -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, - 89, 90, 40, 41, 42, 43, 32, 33, 46, 35, - 48, -1, -1, 39, -1, -1, 3, -1, 56, 57, - -1, -1, 48, -1, 11, 51, -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, 89, 90, 40, 41, 42, 43, -1, -1, 46, - 47, 48, -1, 89, 90, -1, -1, 3, 4, 56, - 57, -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, 89, 90, 40, 41, 42, 43, -1, -1, - 46, -1, 48, -1, -1, -1, -1, -1, 3, -1, - 56, 57, -1, -1, -1, -1, 11, -1, -1, 14, + 0, 46, 72, 3, 4, 93, 189, 72, 8, 3, + 4, 271, 48, 141, 271, 48, 22, 271, 89, 90, + 148, 44, 20, 151, 44, 25, 209, 3, 4, 5, + 6, 7, 85, 44, 34, 35, 94, 95, 91, 0, + 34, 35, 95, 54, 50, 32, 33, 47, 35, 54, + 70, 54, 44, 89, 90, 90, 89, 90, 103, 144, + 52, 48, 45, 45, 51, 91, 45, 50, 50, 56, + 57, 50, 72, 45, 45, 48, 45, 45, 72, 50, + 263, 50, 50, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 94, 45, 45, 90, 52, 184, + 50, 50, 89, 90, 189, 45, 32, 33, 54, 35, + 50, 58, 59, 39, 90, 46, 45, 44, 44, 204, + 205, 50, 48, 45, 209, 51, 52, 48, 50, 45, + 45, 48, 144, 261, 50, 50, 136, 84, 85, 86, + 87, 88, 142, 52, 144, 86, 87, 88, 44, 149, + 144, 411, 152, 52, 411, 283, 284, 411, 48, 32, + 33, 50, 35, 89, 90, 49, 44, 40, 41, 42, + 43, 241, 184, 52, 44, 48, 241, 189, 263, 54, + 180, 44, 44, 44, 184, 368, 271, 370, 316, 189, + 184, 319, 204, 205, 44, 189, 194, 209, 84, 85, + 86, 87, 88, 44, 204, 205, 53, 44, 54, 209, + 204, 205, 54, 26, 54, 209, 89, 90, 288, 289, + 44, 48, 54, 288, 289, 54, 409, 44, 54, 412, + 44, 49, 45, 54, 54, 48, 49, 365, 45, 19, + 95, 241, 32, 33, 53, 35, 44, 241, 53, 432, + 433, 263, 44, 381, 49, 383, 44, 385, 48, 271, + 44, 51, 49, 263, 49, 335, 44, 44, 54, 263, + 335, 271, 272, 54, 44, 44, 44, 271, 54, 54, + 17, 54, 22, 368, 184, 370, 374, 54, 288, 289, + 103, 54, 54, 54, 288, 289, 54, 45, 45, 89, + 90, 45, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 144, 135, 45, 409, 54, 411, 412, 54, 8, + 54, 8, 8, 411, 147, 335, 194, 150, -1, -1, + 153, 335, 155, -1, 157, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 400, 368, 402, 370, 404, + -1, 184, -1, -1, -1, -1, 189, -1, 368, -1, + 370, -1, 185, 373, 368, -1, 370, 32, 33, -1, + 35, 204, 205, -1, 39, 198, 209, -1, -1, -1, + -1, 144, -1, 48, -1, -1, 51, 409, -1, 411, + 412, 144, -1, -1, -1, -1, -1, -1, -1, 409, + -1, 411, 412, -1, -1, 409, -1, 411, 412, 144, + 432, 433, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 184, 432, 433, 89, 90, 189, -1, 432, 433, + 263, 184, -1, -1, 257, -1, 189, -1, 271, -1, + -1, 204, 205, -1, -1, 268, 209, 270, -1, 184, + 273, 204, 205, -1, 189, -1, 209, 32, 33, -1, + 35, -1, 285, -1, 39, -1, 144, -1, -1, 204, + 205, -1, -1, 48, 209, -1, 51, -1, -1, -1, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, -1, -1, 144, -1, -1, -1, -1, 321, 144, + 263, -1, -1, -1, -1, -1, 184, -1, 271, -1, + 263, 189, -1, -1, 89, 90, -1, -1, 271, -1, + -1, 344, 345, 346, 347, -1, 204, 205, 263, -1, + -1, 209, -1, 184, -1, 368, 271, 370, 189, 184, + -1, -1, -1, -1, 189, -1, 369, -1, 371, 372, + -1, -1, -1, 204, 205, -1, -1, -1, 209, 204, + 205, -1, -1, -1, 209, -1, -1, -1, -1, -1, + -1, -1, 32, 33, -1, 35, 409, -1, 411, 412, + 40, 41, 42, 43, -1, 263, -1, -1, 48, -1, + 413, -1, -1, 271, -1, -1, 56, 57, -1, 432, + 433, -1, -1, 32, 33, 368, 35, 370, -1, -1, + 39, -1, 263, -1, -1, 368, -1, 370, 263, 48, + 271, -1, 51, -1, -1, -1, 271, -1, -1, 89, + 90, 32, 33, 368, 35, 370, 32, 33, 39, 35, + -1, -1, -1, 39, -1, -1, 409, 48, 411, 412, + 51, -1, 48, -1, -1, 51, 409, -1, 411, 412, + 89, 90, -1, -1, -1, -1, -1, -1, -1, 432, + 433, -1, -1, -1, 409, -1, 411, 412, -1, 432, + 433, -1, 9, 10, -1, 12, 13, -1, 89, 90, + 368, -1, 370, 89, 90, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 48, -1, 368, 51, 370, -1, -1, -1, 56, + 57, 409, -1, 411, 412, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 432, 433, -1, -1, 409, -1, + 411, 412, 89, 90, 409, -1, 411, 412, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, + -1, 432, 433, -1, -1, -1, 11, 432, 433, 14, 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, 89, 90, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - -1, 56, 57, 32, 33, -1, 35, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, - -1, -1, 51, -1, -1, -1, -1, 56, 57, -1, - -1, -1, -1, -1, 89, 90, -1, -1, -1, -1, - -1, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 45, -1, -1, -1, -1, 50, -1, -1, - 89, 90, 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, -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, -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, - 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, + 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, + -1, 46, 47, 48, -1, -1, -1, -1, -1, 3, + 4, 56, 57, -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, 89, 90, 40, 41, 42, 43, + 32, 33, 46, 35, 48, -1, -1, 39, -1, -1, + 3, -1, 56, 57, -1, -1, 48, -1, 11, 51, + -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, 89, 90, 40, 41, 42, + 43, -1, -1, 46, 47, 48, -1, 89, 90, -1, + -1, 3, 4, 56, 57, -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, 89, 90, 40, 41, + 42, 43, 32, 33, 46, 35, 48, -1, -1, 39, + -1, -1, 3, -1, 56, 57, -1, -1, 48, -1, + 11, 51, -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, 89, 90, 40, + 41, 42, 43, -1, -1, 46, -1, 48, -1, 89, + 90, -1, -1, -1, -1, 56, 57, 32, 33, 34, + 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, + 50, -1, -1, 48, 49, 55, -1, 52, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 89, 90, + -1, -1, -1, 68, 69, -1, -1, 8, -1, -1, + -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, + 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 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, 32, 33, -1, 35, + -1, -1, -1, 39, -1, -1, -1, 68, 69, -1, + -1, 8, 48, -1, -1, 51, -1, -1, -1, -1, + -1, -1, -1, -1, 85, -1, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 32, 33, 34, 35, 36, + 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, + -1, 48, -1, 89, 90, 52, -1, -1, -1, -1, + 32, 33, -1, 35, -1, -1, -1, 39, -1, -1, + -1, 68, 69, -1, -1, 8, 48, -1, -1, 51, + -1, -1, -1, -1, -1, -1, -1, -1, 85, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 32, + 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, + 43, 44, -1, -1, -1, 48, -1, 89, 90, 52, + -1, -1, -1, -1, -1, -1, -1, 45, -1, -1, + -1, -1, 50, -1, -1, 68, 69, 55, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, 85, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 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, 54, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 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, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 54, 55, -1, -1, 58, 59, 60, 61, 62, 63, + -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, -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, 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, -1, 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, -1, 82, 83, 84, - 85, 86, 87, 88, 58, 59, -1, -1, 62, 63, - 64, 65, 66, 67, 58, 59, -1, -1, -1, -1, - 64, 65, 66, 67, -1, -1, -1, -1, 82, -1, - 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, - 84, 85, 86, 87, 88 + 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, 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, 53, -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, 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, -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, 58, 59, -1, -1, -1, -1, 64, 65, 66, + 67, -1, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 109, 110, 111, - 112, 113, 114, 115, 116, 179, 89, 179, 180, 180, - 44, 0, 111, 112, 113, 44, 70, 54, 54, 91, - 182, 161, 179, 8, 32, 33, 34, 35, 36, 37, + 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, + 109, 110, 111, 112, 113, 176, 89, 176, 177, 177, + 44, 0, 108, 109, 110, 44, 70, 54, 54, 91, + 179, 158, 176, 8, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 92, 93, 94, 95, 96, 97, 98, 146, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 85, 88, 92, 93, 94, 95, 143, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 161, 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, 187, 188, 45, 45, 50, 48, 179, - 180, 48, 179, 180, 48, 146, 48, 49, 146, 162, - 163, 179, 146, 146, 94, 95, 90, 54, 55, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 81, - 82, 83, 84, 85, 86, 87, 88, 39, 48, 51, - 158, 159, 179, 180, 44, 52, 54, 46, 119, 179, - 48, 44, 52, 48, 44, 52, 48, 45, 50, 146, - 50, 49, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 179, 52, 162, 163, 179, 3, 11, 14, - 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 47, 48, 56, 57, 117, - 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, + 184, 185, 45, 45, 50, 48, 176, 177, 48, 176, + 177, 48, 143, 48, 49, 143, 159, 160, 176, 143, + 143, 94, 95, 90, 54, 55, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, + 85, 86, 87, 88, 39, 48, 51, 155, 156, 176, + 177, 44, 52, 54, 46, 116, 176, 48, 44, 52, + 48, 44, 52, 48, 45, 50, 143, 50, 49, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 176, + 52, 159, 160, 176, 3, 11, 14, 15, 16, 18, + 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 47, 48, 56, 57, 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, 142, 143, 144, 145, 148, 149, 150, - 156, 157, 165, 166, 169, 173, 174, 175, 176, 179, - 146, 162, 179, 146, 162, 179, 146, 146, 49, 146, - 53, 49, 179, 45, 44, 4, 120, 146, 54, 44, - 54, 44, 117, 44, 44, 44, 44, 85, 182, 186, - 53, 54, 54, 54, 146, 54, 44, 44, 48, 156, - 157, 169, 169, 47, 117, 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, 146, 162, 4, 54, - 45, 146, 19, 146, 121, 148, 149, 150, 169, 179, - 146, 53, 53, 54, 162, 162, 146, 44, 44, 44, - 44, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 49, 162, 49, 162, 49, 146, 44, 45, - 54, 45, 44, 45, 54, 22, 50, 45, 45, 45, - 146, 146, 146, 146, 44, 45, 44, 45, 44, 45, - 162, 117, 146, 117, 146, 147, 146, 179, 119, 54, - 54, 45, 45, 50, 45, 50, 45, 50, 162, 162, - 162, 45, 17, 45, 54, 45, 22, 54, 54, 163, - 54, 163, 54, 163, 45, 45, 45, 117, 54, 121, - 117, 146, 45, 45, 45, 45, 45, 54, 54, 54, - 117, 117 + 139, 140, 141, 142, 145, 146, 147, 153, 154, 162, + 163, 166, 170, 171, 172, 173, 176, 143, 159, 176, + 143, 159, 176, 143, 143, 49, 143, 53, 49, 176, + 45, 44, 4, 117, 143, 54, 44, 54, 44, 114, + 44, 44, 44, 44, 85, 179, 183, 53, 54, 54, + 54, 143, 54, 44, 44, 48, 153, 154, 166, 166, + 47, 114, 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, 143, 159, 4, 54, 45, 143, 19, + 143, 118, 145, 146, 147, 166, 176, 143, 53, 53, + 54, 159, 159, 143, 44, 44, 44, 44, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 49, + 159, 49, 159, 49, 143, 44, 45, 54, 45, 44, + 45, 54, 22, 50, 45, 45, 45, 143, 143, 143, + 143, 44, 45, 44, 45, 44, 45, 159, 114, 143, + 114, 143, 144, 143, 176, 116, 54, 54, 45, 45, + 50, 45, 50, 45, 50, 159, 159, 159, 45, 17, + 45, 54, 45, 22, 54, 54, 160, 54, 160, 54, + 160, 45, 45, 45, 114, 54, 118, 114, 143, 45, + 45, 45, 45, 45, 54, 54, 54, 114, 114 }; 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, 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, 164, 165, 166, 167, 168, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 180, 181, 182, - 183, 184, 185, 185, 186, 186, 186, 186, 186, 187, - 188 + 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, 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, 127, 128, 129, 130, 131, 132, 133, 133, 134, + 135, 135, 136, 137, 138, 139, 139, 140, 141, 142, + 143, 143, 143, 144, 144, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 146, 146, 147, 147, + 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 151, 152, 153, + 153, 154, 154, 155, 155, 155, 155, 155, 155, 156, + 156, 156, 156, 157, 158, 158, 158, 159, 159, 160, + 160, 161, 161, 162, 163, 164, 165, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 177, 178, 179, + 180, 181, 182, 182, 183, 183, 184, 185 }; const signed char @@ -4486,8 +4436,7 @@ namespace xsk { namespace gsc { namespace h2 { 1, 2, 3, 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 7, 2, 1, 2, 1, 1, 1, 1, 1, - 1 + 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4497,29 +4446,28 @@ namespace xsk { namespace gsc { namespace h2 { const short parser::yyrline_[] = { - 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, 718, 723, 728, 729, 730, - 731, 732, 733, 734, 735, 736, 740, 745, 750, 755, - 760, 765, 770, 775, 780, 785, 790, 792, 797, 802, - 807, 812, 817, 819, 824, 826, 828, 830, 832, 837, - 842 + 0, 251, 251, 252, 256, 258, 260, 262, 264, 266, + 271, 275, 280, 281, 282, 283, 284, 288, 293, 298, + 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, 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, 414, 419, 424, 429, 434, 439, 444, 446, 451, + 456, 458, 463, 468, 473, 478, 480, 485, 490, 495, + 500, 501, 502, 506, 507, 511, 513, 515, 517, 519, + 521, 523, 525, 527, 529, 531, 536, 538, 543, 545, + 550, 555, 557, 559, 561, 563, 565, 567, 569, 571, + 573, 575, 577, 579, 581, 583, 585, 587, 589, 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, 625, 630, 635, + 636, 639, 640, 644, 646, 648, 650, 652, 654, 659, + 661, 663, 665, 670, 675, 677, 680, 684, 687, 691, + 693, 698, 700, 705, 710, 715, 720, 725, 726, 727, + 728, 729, 730, 731, 732, 733, 737, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 789, 794, 799, + 804, 809, 814, 816, 821, 823, 828, 833 }; void @@ -4552,9 +4500,9 @@ namespace xsk { namespace gsc { namespace h2 { #line 13 "parser.ypp" } } } // xsk::gsc::h2 -#line 4556 "parser.cpp" +#line 4504 "parser.cpp" -#line 846 "parser.ypp" +#line 837 "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 6a4d347..cdbf40e 100644 --- a/src/h2/xsk/parser.hpp +++ b/src/h2/xsk/parser.hpp @@ -624,10 +624,7 @@ namespace xsk { namespace gsc { namespace h2 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy67[sizeof (std::string)]; }; @@ -772,19 +769,16 @@ namespace xsk { namespace gsc { namespace h2 { ISTRING = 92, // "localized string" COLOR = 93, // "color" FLOAT = 94, // "float" - INT_DEC = 95, // "int" - INT_OCT = 96, // "octal int" - INT_BIN = 97, // "binary int" - INT_HEX = 98, // "hexadecimal int" - 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 + 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 }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -801,7 +795,7 @@ namespace xsk { namespace gsc { namespace h2 { { enum symbol_kind_type { - YYNTOKENS = 108, ///< Number of tokens. + YYNTOKENS = 105, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -898,100 +892,97 @@ namespace xsk { namespace gsc { namespace h2 { S_ISTRING = 92, // "localized string" S_COLOR = 93, // "color" S_FLOAT = 94, // "float" - S_INT_DEC = 95, // "int" - S_INT_OCT = 96, // "octal int" - S_INT_BIN = 97, // "binary int" - S_INT_HEX = 98, // "hexadecimal int" - 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_reference = 164, // expr_reference - S_expr_array = 165, // expr_array - S_expr_field = 166, // expr_field - S_expr_size = 167, // expr_size - S_expr_paren = 168, // expr_paren - S_expr_object = 169, // expr_object - S_expr_thisthread = 170, // expr_thisthread - S_expr_empty_array = 171, // expr_empty_array - S_expr_undefined = 172, // expr_undefined - S_expr_game = 173, // expr_game - S_expr_self = 174, // expr_self - S_expr_anim = 175, // expr_anim - S_expr_level = 176, // expr_level - S_expr_animation = 177, // expr_animation - S_expr_animtree = 178, // expr_animtree - S_expr_identifier = 179, // expr_identifier - S_expr_path = 180, // expr_path - S_expr_istring = 181, // expr_istring - S_expr_string = 182, // expr_string - S_expr_color = 183, // expr_color - S_expr_vector = 184, // expr_vector - S_expr_float = 185, // expr_float - S_expr_integer = 186, // expr_integer - S_expr_false = 187, // expr_false - S_expr_true = 188 // expr_true + 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_waitframe = 127, // stmt_waitframe + S_stmt_if = 128, // stmt_if + S_stmt_ifelse = 129, // stmt_ifelse + S_stmt_while = 130, // stmt_while + S_stmt_dowhile = 131, // stmt_dowhile + S_stmt_for = 132, // stmt_for + S_stmt_foreach = 133, // stmt_foreach + S_stmt_switch = 134, // stmt_switch + S_stmt_case = 135, // stmt_case + S_stmt_default = 136, // stmt_default + S_stmt_break = 137, // stmt_break + S_stmt_continue = 138, // stmt_continue + S_stmt_return = 139, // stmt_return + S_stmt_breakpoint = 140, // stmt_breakpoint + S_stmt_prof_begin = 141, // stmt_prof_begin + S_stmt_prof_end = 142, // stmt_prof_end + S_expr = 143, // expr + S_expr_or_empty = 144, // expr_or_empty + S_expr_assign = 145, // expr_assign + S_expr_increment = 146, // expr_increment + S_expr_decrement = 147, // expr_decrement + S_expr_ternary = 148, // expr_ternary + S_expr_binary = 149, // expr_binary + S_expr_primitive = 150, // expr_primitive + S_expr_complement = 151, // expr_complement + S_expr_not = 152, // expr_not + S_expr_call = 153, // expr_call + S_expr_method = 154, // expr_method + S_expr_function = 155, // expr_function + S_expr_pointer = 156, // expr_pointer + S_expr_add_array = 157, // expr_add_array + S_expr_parameters = 158, // expr_parameters + S_expr_arguments = 159, // expr_arguments + S_expr_arguments_no_empty = 160, // expr_arguments_no_empty + S_expr_reference = 161, // expr_reference + S_expr_array = 162, // expr_array + S_expr_field = 163, // expr_field + S_expr_size = 164, // expr_size + S_expr_paren = 165, // expr_paren + S_expr_object = 166, // expr_object + S_expr_thisthread = 167, // expr_thisthread + S_expr_empty_array = 168, // expr_empty_array + S_expr_undefined = 169, // expr_undefined + S_expr_game = 170, // expr_game + S_expr_self = 171, // expr_self + S_expr_anim = 172, // expr_anim + S_expr_level = 173, // expr_level + S_expr_animation = 174, // expr_animation + S_expr_animtree = 175, // expr_animtree + S_expr_identifier = 176, // expr_identifier + S_expr_path = 177, // expr_path + S_expr_istring = 178, // expr_istring + S_expr_string = 179, // expr_string + S_expr_color = 180, // expr_color + S_expr_vector = 181, // expr_vector + S_expr_float = 182, // expr_float + S_expr_integer = 183, // expr_integer + S_expr_false = 184, // expr_false + S_expr_true = 185 // expr_true }; }; @@ -1310,10 +1301,7 @@ namespace xsk { namespace gsc { namespace h2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2582,10 +2570,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2695,7 +2680,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - H2_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + H2_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4173,61 +4158,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4709,7 +4649,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2254, ///< Last index in yytable_. + yylast_ = 2191, ///< Last index in yytable_. yynnts_ = 81, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -5020,10 +4960,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5338,10 +5275,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5408,7 +5342,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::h2 -#line 5412 "parser.hpp" +#line 5346 "parser.hpp" diff --git a/src/h2/xsk/resolver.cpp b/src/h2/xsk/resolver.cpp index 78b54f3..50f6d2b 100644 --- a/src/h2/xsk/resolver.cpp +++ b/src/h2/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::h2 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,15 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); - return utils::string::va("_ID%i", id); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -111,14 +125,19 @@ auto resolver::file_name(std::uint16_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -135,14 +154,16 @@ auto resolver::token_name(std::uint16_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -155,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -165,165 +188,183 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 154> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, - { std::uint8_t(opcode::OP_waitFrame), "WAITFRAME" }, + { 0x17, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x18, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x19, "RETN" }, + { 0x1A, "CALL_BUILTIN_FUNC_0" }, + { 0x1B, "CALL_BUILTIN_FUNC_1" }, + { 0x1C, "CALL_BUILTIN_FUNC_2" }, + { 0x1D, "CALL_BUILTIN_FUNC_3" }, + { 0x1E, "CALL_BUILTIN_FUNC_4" }, + { 0x1F, "CALL_BUILTIN_FUNC_5" }, + { 0x20, "CALL_BUILTIN_FUNC" }, + { 0x21, "BOOL_NOT" }, + { 0x22, "CALL_FAR_METHOD_THEAD" }, + { 0x23, "JMP_EXPR_TRUE" }, + { 0x24, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x25, "CAST_BOOL" }, + { 0x26, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x27, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x28, "INEQUALITY" }, + { 0x29, "GET_THISTHREAD" }, + { 0x2A, "CLEAR_FIELD_VARIABLE" }, + { 0x2B, "GET_FLOAT" }, + { 0x2C, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x2D, "CALL_FAR_FUNC2" }, + { 0x2E, "CALL_FAR_FUNC" }, + { 0x2F, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x30, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x31, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x32, "CHECK_CLEAR_PARAMS" }, + { 0x33, "CAST_FIELD_OBJ" }, + { 0x34, "END" }, + { 0x35, "SIZE" }, + { 0x36, "EMPTY_ARRAY" }, + { 0x37, "BIT_AND" }, + { 0x38, "LESSEQUAL" }, + { 0x39, "VOIDCODEPOS" }, + { 0x3A, "CALL_METHOD_THREAD_POINTER" }, + { 0x3B, "ENDSWITCH" }, + { 0x3C, "CLEAR_VARIABLE_FIELD" }, + { 0x3D, "DIV" }, + { 0x3E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x3F, "GET_USHORT" }, + { 0x40, "JMP_TRUE" }, + { 0x41, "GET_SELF" }, + { 0x42, "CALL_FAR_FUNC_THREAD" }, + { 0x43, "CALL_LOCAL_FUNC_THREAD" }, + { 0x44, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x45, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x46, "PLUS" }, + { 0x47, "BOOL_COMPLEMENT" }, + { 0x48, "CALL_METHOD_POINTER" }, + { 0x49, "INC" }, + { 0x4A, "REMOVE_LOCAL_VARIABLES" }, + { 0x4B, "JMP_EXPR_FALSE" }, + { 0x4C, "SWITCH" }, + { 0x4D, "CLEAR_PARAMS" }, + { 0x4E, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x4F, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x50, "CALL_LOCAL_METHOD" }, + { 0x51, "EVAL_FIELD_VARIABLE" }, + { 0x52, "EVAL_FIELD_VARIABLE_REF" }, + { 0x53, "GET_STRING" }, + { 0x54, "CALL_FUNC_POINTER" }, + { 0x55, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x56, "GET_VECTOR" }, + { 0x57, "ENDON" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "GET_SELF_OBJ" }, + { 0x5A, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x5B, "SET_VARIABLE_FIELD" }, + { 0x5C, "CALL_LOCAL_FUNC2" }, + { 0x5D, "CALL_LOCAL_FUNC" }, + { 0x5E, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x5F, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x60, "GET_FAR_FUNC" }, + { 0x61, "LESS" }, + { 0x62, "GET_GAME_REF" }, + { 0x63, "WAITFRAME" }, + { 0x64, "WAITTILLFRAMEEND" }, + { 0x65, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x66, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x67, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x68, "GET_LEVEL" }, + { 0x69, "NOTIFY" }, + { 0x6A, "DEC_TOP" }, + { 0x6B, "SHIFT_LEFT" }, + { 0x6C, "CALL_LOCAL_METHOD_THREAD" }, + { 0x6D, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x6E, "GREATER" }, + { 0x6F, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x70, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x71, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x72, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x73, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x74, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x75, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x76, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x77, "JMP" }, + { 0x78, "CALL_FUNC_THREAD_POINTER" }, + { 0x79, "GET_ZERO" }, + { 0x7A, "WAIT" }, + { 0x7B, "MINUS" }, + { 0x7C, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7D, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x7E, "MULT" }, + { 0x7F, "CREATE_LOCAL_VARIABLE" }, + { 0x80, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x81, "GET_INT" }, + { 0x82, "MOD" }, + { 0x83, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x84, "GET_BUILTIN_FUNC" }, + { 0x85, "GET_GAME" }, + { 0x86, "WAITTILL" }, + { 0x87, "DEC" }, + { 0x88, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x89, "PRE_CALL" }, + { 0x8A, "GET_ANIM" }, + { 0x8B, "GET_UNDEFINED" }, + { 0x8C, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x8D, "GET_ANIM_OBJ" }, + { 0x8E, "GET_LEVEL_OBJ" }, + { 0x8F, "BIT_EXOR" }, + { 0x90, "EQUALITY" }, + { 0x91, "CLEAR_ARRAY" }, + { 0x92, "JMP_BACK" }, + { 0x93, "GET_ANIMATION" }, + { 0x94, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x95, "GET_ANIMTREE" }, + { 0x96, "GET_ISTRING" }, + { 0x97, "EVAL_ARRAY_REF" }, + { 0x98, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x99, "GET_NBYTE" }, + { 0x9A, "GET_BUILTIN_METHOD" }, + { 0x9B, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x9C, "EVAL_ARRAY" }, + { 0x9D, "VECTOR" }, + { 0x9E, "CALL_FAR_METHOD" }, + { 0x9F, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0xA0, "GET_BYTE" }, + { 0xA1, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0xA2, "BIT_OR" }, + { 0xA3, "ADD_ARRAY" }, + { 0xA4, "WAITTILLMATCH2" }, + { 0xA5, "WAITTILLMATCH" }, + { 0xA6, "GET_LOCAL_FUNC" }, + { 0xA7, "GET_NUSHORT" }, + { 0xA8, "SHIFT_RIGHT" }, + { 0xA9, "CALL_BUILTIN_METHOD_0" }, + { 0xAA, "CALL_BUILTIN_METHOD_1" }, + { 0xAB, "CALL_BUILTIN_METHOD_2" }, + { 0xAC, "CALL_BUILTIN_METHOD_3" }, + { 0xAD, "CALL_BUILTIN_METHOD_4" }, + { 0xAE, "CALL_BUILTIN_METHOD_5" }, + { 0xAF, "CALL_BUILTIN_METHOD" }, + { 0xB0, "JMP_FALSE" }, }}; -const std::array function_list +const std::array, 800> function_list {{ { 0x001, "_func_001" }, { 0x002, "_func_002" }, @@ -1127,7 +1168,7 @@ const std::array function_list { 0x320, "_func_320" }, }}; -const std::array method_list +const std::array, 1491> method_list {{ { 0x8000, "_meth_8000" }, { 0x8001, "_meth_8001" }, @@ -2622,14 +2663,18 @@ const std::array method_list { 0x85D2, "_meth_85D2" }, }}; -const std::array file_list +const std::array, 1> file_list {{ - { 0, "DUMMY" }, + { 0, "null" }, }}; -const std::array token_list +const std::array, 5> token_list {{ - { 0, "DUMMY" }, + { 0x0000, "" }, + { 0x0001, "pl#" }, + { 0x0002, "-" }, + { 0x0003, "radius`" }, + { 0x0004, "note:" }, }}; struct __init__ @@ -2653,32 +2698,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/h2/xsk/resolver.hpp b/src/h2/xsk/resolver.hpp index b46bf60..8ee107e 100644 --- a/src/h2/xsk/resolver.hpp +++ b/src/h2/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::h2 diff --git a/src/iw5/stdafx.hpp b/src/iw5/stdafx.hpp index f980207..748b660 100644 --- a/src/iw5/stdafx.hpp +++ b/src/iw5/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/iw5/xsk/assembler.cpp b/src/iw5/xsk/assembler.cpp index 11b2f8e..4e0add4 100644 --- a/src/iw5/xsk/assembler.cpp +++ b/src/iw5/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -127,11 +141,11 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); - + if (func->id == 0) { stack_->write_c_string(func->name); @@ -378,24 +392,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -404,9 +406,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -422,33 +423,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint16_t file_id = 0; - std::uint16_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -457,18 +450,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - if (!utils::string::is_number(inst->data[0])) - { - throw asm_error("invalid endswitch number!"); - } + const auto count = std::stoul(inst->data[0]); - std::uint16_t casenum = std::stoi(inst->data[0]); + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -482,25 +470,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -509,25 +498,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = (std::uint16_t)std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFF; - if (field_id == 0) - { - field_id = 0xFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 0x826A) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -538,7 +515,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -567,24 +544,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/iw5/xsk/assembler.hpp b/src/iw5/xsk/assembler.hpp index adb7e12..b39b5b7 100644 --- a/src/iw5/xsk/assembler.hpp +++ b/src/iw5/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::iw5 diff --git a/src/iw5/xsk/compiler.cpp b/src/iw5/xsk/compiler.cpp index 58b1f70..8b32b6e 100644 --- a/src/iw5/xsk/compiler.cpp +++ b/src/iw5/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = iw5__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -390,9 +390,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -526,7 +526,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -580,7 +580,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -726,7 +726,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -747,9 +747,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -839,7 +839,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -889,7 +889,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1047,7 +1047,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1101,7 +1101,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1364,10 +1364,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1384,7 +1384,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1400,7 +1400,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1482,10 +1482,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1502,7 +1502,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1518,7 +1518,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1540,7 +1540,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1616,7 +1616,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1783,7 +1783,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2074,7 +2074,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2086,7 +2086,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2099,7 +2099,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2215,7 +2215,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2252,7 +2252,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2295,7 +2295,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2425,7 +2425,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2697,7 +2697,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2726,7 +2726,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2897,9 +2897,9 @@ void compiler::insert_label(const std::string& name) } -gsc::include_t compiler::include_maps_mp_utility_ = +gsc::include_t compiler::include_maps_mp_utility_ = { - "maps/mp/_utility", + "maps/mp/_utility", { "exploder_sound", "_beginlocationselection", @@ -3223,9 +3223,9 @@ gsc::include_t compiler::include_common_scripts_createfx_ = } }; -gsc::include_t compiler::include_common_scripts_utility_ = +gsc::include_t compiler::include_common_scripts_utility_ = { - "common_scripts/utility", + "common_scripts/utility", { "scriptprintln", "debugprintln", @@ -3403,9 +3403,9 @@ gsc::include_t compiler::include_common_scripts_utility_ = } }; -gsc::include_t compiler::include_maps_mp_gametypes_hud_util_ = +gsc::include_t compiler::include_maps_mp_gametypes_hud_util_ = { - "maps/mp/gametypes/_hud_util", + "maps/mp/gametypes/_hud_util", { "setparent", "getparent", diff --git a/src/iw5/xsk/compiler.hpp b/src/iw5/xsk/compiler.hpp index 5bd4a3a..bd85f6d 100644 --- a/src/iw5/xsk/compiler.hpp +++ b/src/iw5/xsk/compiler.hpp @@ -87,7 +87,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/iw5/xsk/decompiler.cpp b/src/iw5/xsk/decompiler.cpp index f03c6e1..74d5f06 100644 --- a/src/iw5/xsk/decompiler.cpp +++ b/src/iw5/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1359,7 +1359,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1840,7 +1840,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1915,7 +1915,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2051,7 +2051,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2158,11 +2158,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2560,7 +2560,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2679,7 +2679,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3070,7 +3070,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/iw5/xsk/disassembler.cpp b/src/iw5/xsk/disassembler.cpp index 326c667..3d73fb6 100644 --- a/src/iw5/xsk/disassembler.cpp +++ b/src/iw5/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// IW5 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -70,7 +70,7 @@ void disassembler::dissasemble_function(const function::ptr& func) { func->instructions.push_back(std::make_unique()); - auto& inst = func->instructions.back(); + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); @@ -168,7 +168,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -310,19 +310,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -341,88 +336,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint16_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0x826A) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x10000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -430,24 +380,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -457,7 +447,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 10; @@ -466,9 +456,9 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { @@ -480,7 +470,7 @@ void disassembler::resolve_local_functions() case opcode::OP_ScriptLocalChildThreadCall: case opcode::OP_ScriptLocalMethodThreadCall: case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); + inst->data[0] = resolve_function(inst->data[0]); break; default: break; @@ -512,9 +502,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -531,41 +521,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } - output_->write_string("\n"); + output_->write_string("\n"); + } + } + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - - output_->write_string("\n"); - break; + output_->write_string("\n"); + break; } } diff --git a/src/iw5/xsk/disassembler.hpp b/src/iw5/xsk/disassembler.hpp index 361c524..0721165 100644 --- a/src/iw5/xsk/disassembler.hpp +++ b/src/iw5/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/iw5/xsk/iw5.hpp b/src/iw5/xsk/iw5.hpp index 3e321a7..7e38a31 100644 --- a/src/iw5/xsk/iw5.hpp +++ b/src/iw5/xsk/iw5.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::iw5 { +constexpr std::uint16_t max_string_id = 0x826A; + enum class opcode : std::uint8_t { OP_End = 0x0, diff --git a/src/iw5/xsk/lexer.cpp b/src/iw5/xsk/lexer.cpp index 2caeb70..d2b3be3 100644 --- a/src/iw5/xsk/lexer.cpp +++ b/src/iw5/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 110 -#define YY_END_OF_BUFFER 111 +#define YY_NUM_RULES 111 +#define YY_END_OF_BUFFER 112 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[328] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 109, - 1, 2, 94, 109, 109, 93, 97, 109, 54, 55, - 91, 89, 60, 90, 61, 92, 108, 108, 63, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, + 1, 2, 94, 110, 110, 93, 97, 110, 54, 55, + 91, 89, 60, 90, 61, 92, 109, 109, 63, 64, 78, 88, 79, 65, 100, 58, 59, 98, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 56, 96, 57, 95, 5, 6, - 5, 12, 13, 12, 109, 91, 92, 75, 0, 102, + 5, 12, 13, 12, 110, 91, 92, 75, 0, 102, 0, 15, 0, 0, 0, 0, 84, 0, 73, 0, - 86, 0, 0, 8, 82, 66, 80, 67, 81, 104, - 0, 11, 4, 3, 83, 104, 108, 105, 0, 0, + 86, 0, 0, 8, 82, 66, 80, 67, 81, 105, + 0, 11, 4, 3, 83, 105, 109, 106, 0, 0, 0, 0, 62, 70, 76, 74, 77, 71, 100, 87, 100, 100, 100, 100, 100, 100, 28, 100, 100, 100, 100, 100, 26, 32, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 85, 72, 7, 14, 10, 9, 0, 102, 0, 0, 0, 0, 0, 0, 101, - 0, 0, 0, 0, 102, 0, 104, 0, 3, 104, - 104, 105, 106, 107, 99, 68, 69, 100, 100, 100, + 0, 0, 0, 0, 102, 0, 105, 0, 3, 105, + 105, 106, 107, 108, 99, 68, 69, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 30, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 103, 0, 0, 0, 0, 0, 101, 0, 0, @@ -594,7 +594,7 @@ static const flex_int16_t yy_accept[328] = 0, 0, 49, 36, 100, 100, 100, 20, 47, 100, 53, 100, 100, 100, 100, 100, 100, 100, 100, 29, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, - 21, 100, 100, 38, 33, 100, 42, 100, 100, 103, + 21, 100, 100, 38, 33, 100, 42, 100, 100, 104, 0, 0, 16, 0, 100, 100, 100, 35, 31, 100, 100, 100, 100, 100, 0, 17, 0, 100, 100, 37, 100, 41, 100, 100, 23, 19, 0, 100, 100, 100, @@ -1188,11 +1188,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1251,577 +1251,582 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw iw5::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw iw5::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw iw5::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return iw5::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw iw5::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return iw5::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw iw5::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw iw5::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return iw5::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return iw5::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return iw5::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return iw5::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return iw5::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return iw5::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return iw5::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return iw5::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return iw5::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return iw5::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return iw5::parser::make_IF(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return iw5::parser::make_ELSE(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return iw5::parser::make_DO(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return iw5::parser::make_WHILE(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return iw5::parser::make_FOR(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return iw5::parser::make_FOREACH(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return iw5::parser::make_IN(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return iw5::parser::make_SWITCH(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return iw5::parser::make_CASE(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return iw5::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return iw5::parser::make_BREAK(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return iw5::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return iw5::parser::make_RETURN(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return iw5::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return iw5::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return iw5::parser::make_PROFEND(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return iw5::parser::make_THREAD(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return iw5::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return iw5::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return iw5::parser::make_CALL(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return iw5::parser::make_TRUE(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return iw5::parser::make_FALSE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return iw5::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return iw5::parser::make_SIZE(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return iw5::parser::make_GAME(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return iw5::parser::make_SELF(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return iw5::parser::make_ANIM(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return iw5::parser::make_LEVEL(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return iw5::parser::make_LPAREN(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return iw5::parser::make_RPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return iw5::parser::make_LBRACE(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return iw5::parser::make_RBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return iw5::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return iw5::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return iw5::parser::make_COMMA(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return iw5::parser::make_DOT(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return iw5::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return iw5::parser::make_COLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return iw5::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return iw5::parser::make_QMARK(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return iw5::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return iw5::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return iw5::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return iw5::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return iw5::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return iw5::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return iw5::parser::make_OR(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return iw5::parser::make_AND(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return iw5::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return iw5::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return iw5::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return iw5::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return iw5::parser::make_LESS(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return iw5::parser::make_GREATER(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return iw5::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return iw5::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return iw5::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return iw5::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return iw5::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return iw5::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return iw5::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return iw5::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return iw5::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return iw5::parser::make_ADD(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return iw5::parser::make_SUB(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return iw5::parser::make_MUL(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return iw5::parser::make_DIV(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return iw5::parser::make_MOD(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return iw5::parser::make_NOT(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return iw5::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return iw5::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return iw5::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return iw5::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" -{ return iw5::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 157 "lexer.lpp" +{ return iw5::parser::make_PATH(xsk::gsc::iw5::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return iw5::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return iw5::parser::make_IDENTIFIER(xsk::gsc::iw5::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: /* rule 101 can match eol */ YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return iw5::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 159 "lexer.lpp" +{ return iw5::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" +#line 160 "lexer.lpp" { return iw5::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 103: YY_RULE_SETUP -#line 160 "lexer.lpp" -{ return iw5::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 161 "lexer.lpp" +{ return iw5::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return iw5::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 162 "lexer.lpp" +{ return iw5::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return iw5::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return iw5::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return iw5::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return iw5::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return iw5::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return iw5::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return iw5::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 166 "lexer.lpp" -{ if(ctx->header_top > 0) iw5_pop_header(ctx); else return iw5::parser::make_IW5EOF(ctx->loc); } +{ return iw5::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 109: -/* rule 109 can match eol */ YY_RULE_SETUP #line 167 "lexer.lpp" -{ throw iw5::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return iw5::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 168 "lexer.lpp" +{ if(ctx->header_top > 0) iw5_pop_header(ctx); else return iw5::parser::make_IW5EOF(ctx->loc); } YY_BREAK case 110: +/* rule 110 can match eol */ YY_RULE_SETUP #line 169 "lexer.lpp" +{ throw iw5::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 171 "lexer.lpp" ECHO; YY_BREAK -#line 1824 "lexer.cpp" +#line 1829 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2951,65 +2956,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 169 "lexer.lpp" +#line 171 "lexer.lpp" void iw5_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3017,9 +3022,9 @@ void iw5_push_header(xsk::gsc::context* ctx, const std::string& file) void iw5_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/iw5/xsk/lexer.hpp b/src/iw5/xsk/lexer.hpp index c5c583e..a4e5d0a 100644 --- a/src/iw5/xsk/lexer.hpp +++ b/src/iw5/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 169 "lexer.lpp" +#line 171 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/iw5/xsk/parser.cpp b/src/iw5/xsk/parser.cpp index 54a2840..5cf79c4 100644 --- a/src/iw5/xsk/parser.cpp +++ b/src/iw5/xsk/parser.cpp @@ -494,10 +494,7 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -794,10 +791,7 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1094,10 +1088,7 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1393,10 +1384,7 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1947,10 +1935,7 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1975,1303 +1960,1285 @@ namespace xsk { namespace gsc { namespace iw5 { switch (yyn) { case 2: // root: program -#line 252 "parser.ypp" +#line 249 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 1981 "parser.cpp" +#line 1966 "parser.cpp" break; case 3: // root: %empty -#line 253 "parser.ypp" +#line 250 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 1987 "parser.cpp" +#line 1972 "parser.cpp" break; case 4: // program: program inline -#line 258 "parser.ypp" +#line 255 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 1993 "parser.cpp" +#line 1978 "parser.cpp" break; case 5: // program: program include -#line 260 "parser.ypp" +#line 257 "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 1999 "parser.cpp" +#line 1984 "parser.cpp" break; case 6: // program: program declaration -#line 262 "parser.ypp" +#line 259 "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 2005 "parser.cpp" +#line 1990 "parser.cpp" break; case 7: // program: inline -#line 264 "parser.ypp" +#line 261 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2011 "parser.cpp" +#line 1996 "parser.cpp" break; case 8: // program: include -#line 266 "parser.ypp" +#line 263 "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 2017 "parser.cpp" +#line 2002 "parser.cpp" break; case 9: // program: declaration -#line 268 "parser.ypp" +#line 265 "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 2023 "parser.cpp" +#line 2008 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 272 "parser.ypp" +#line 269 "parser.ypp" { iw5_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2029 "parser.cpp" +#line 2014 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 277 "parser.ypp" +#line 274 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2035 "parser.cpp" +#line 2020 "parser.cpp" break; case 12: // declaration: "/#" -#line 281 "parser.ypp" +#line 278 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2041 "parser.cpp" +#line 2026 "parser.cpp" break; case 13: // declaration: "#/" -#line 282 "parser.ypp" +#line 279 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2047 "parser.cpp" +#line 2032 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2053 "parser.cpp" +#line 2038 "parser.cpp" break; case 15: // declaration: decl_constant -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2059 "parser.cpp" +#line 2044 "parser.cpp" break; case 16: // declaration: decl_thread -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2065 "parser.cpp" +#line 2050 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 290 "parser.ypp" +#line 287 "parser.ypp" { ctx->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 2071 "parser.cpp" +#line 2056 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 295 "parser.ypp" +#line 292 "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 2077 "parser.cpp" +#line 2062 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 300 "parser.ypp" +#line 297 "parser.ypp" { ctx->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 2083 "parser.cpp" +#line 2068 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 304 "parser.ypp" +#line 301 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2089 "parser.cpp" +#line 2074 "parser.cpp" break; case 21: // stmt: stmt_block -#line 305 "parser.ypp" +#line 302 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2095 "parser.cpp" +#line 2080 "parser.cpp" break; case 22: // stmt: stmt_call -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2101 "parser.cpp" +#line 2086 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2107 "parser.cpp" +#line 2092 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2113 "parser.cpp" +#line 2098 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2119 "parser.cpp" +#line 2104 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2125 "parser.cpp" +#line 2110 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2131 "parser.cpp" +#line 2116 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2137 "parser.cpp" +#line 2122 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2143 "parser.cpp" +#line 2128 "parser.cpp" break; case 30: // stmt: stmt_if -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2149 "parser.cpp" +#line 2134 "parser.cpp" break; case 31: // stmt: stmt_ifelse -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2155 "parser.cpp" +#line 2140 "parser.cpp" break; case 32: // stmt: stmt_while -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2161 "parser.cpp" +#line 2146 "parser.cpp" break; case 33: // stmt: stmt_dowhile -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2167 "parser.cpp" +#line 2152 "parser.cpp" break; case 34: // stmt: stmt_for -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2173 "parser.cpp" +#line 2158 "parser.cpp" break; case 35: // stmt: stmt_foreach -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2179 "parser.cpp" +#line 2164 "parser.cpp" break; case 36: // stmt: stmt_switch -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2185 "parser.cpp" +#line 2170 "parser.cpp" break; case 37: // stmt: stmt_case -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2191 "parser.cpp" +#line 2176 "parser.cpp" break; case 38: // stmt: stmt_default -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2197 "parser.cpp" +#line 2182 "parser.cpp" break; case 39: // stmt: stmt_break -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2203 "parser.cpp" +#line 2188 "parser.cpp" break; case 40: // stmt: stmt_continue -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2209 "parser.cpp" +#line 2194 "parser.cpp" break; case 41: // stmt: stmt_return -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2215 "parser.cpp" +#line 2200 "parser.cpp" break; case 42: // stmt: stmt_breakpoint -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2221 "parser.cpp" +#line 2206 "parser.cpp" break; case 43: // stmt: stmt_prof_begin -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } -#line 2227 "parser.cpp" +#line 2212 "parser.cpp" break; case 44: // stmt: stmt_prof_end -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } -#line 2233 "parser.cpp" +#line 2218 "parser.cpp" break; case 45: // stmt_dev: "/#" stmt_list "#/" -#line 332 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2239 "parser.cpp" +#line 2224 "parser.cpp" break; case 46: // stmt_dev: "/#" "#/" -#line 333 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2245 "parser.cpp" +#line 2230 "parser.cpp" break; case 47: // stmt_block: "{" stmt_list "}" -#line 337 "parser.ypp" +#line 334 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2251 "parser.cpp" +#line 2236 "parser.cpp" break; case 48: // stmt_block: "{" "}" -#line 338 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2257 "parser.cpp" +#line 2242 "parser.cpp" break; case 49: // stmt_list: stmt_list stmt -#line 343 "parser.ypp" +#line 340 "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 2263 "parser.cpp" +#line 2248 "parser.cpp" break; case 50: // stmt_list: stmt -#line 345 "parser.ypp" +#line 342 "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 2269 "parser.cpp" +#line 2254 "parser.cpp" break; case 51: // stmt_expr: expr_assign -#line 350 "parser.ypp" +#line 347 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2275 "parser.cpp" +#line 2260 "parser.cpp" break; case 52: // stmt_expr: expr_increment -#line 352 "parser.ypp" +#line 349 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2281 "parser.cpp" +#line 2266 "parser.cpp" break; case 53: // stmt_expr: expr_decrement -#line 354 "parser.ypp" +#line 351 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2287 "parser.cpp" +#line 2272 "parser.cpp" break; case 54: // stmt_expr: %empty -#line 356 "parser.ypp" +#line 353 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2293 "parser.cpp" +#line 2278 "parser.cpp" break; case 55: // stmt_call: expr_call ";" -#line 361 "parser.ypp" +#line 358 "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 2299 "parser.cpp" +#line 2284 "parser.cpp" break; case 56: // stmt_call: expr_method ";" -#line 363 "parser.ypp" +#line 360 "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 2305 "parser.cpp" +#line 2290 "parser.cpp" break; case 57: // stmt_assign: expr_assign ";" -#line 368 "parser.ypp" +#line 365 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2311 "parser.cpp" +#line 2296 "parser.cpp" break; case 58: // stmt_assign: expr_increment ";" -#line 370 "parser.ypp" +#line 367 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2317 "parser.cpp" +#line 2302 "parser.cpp" break; case 59: // stmt_assign: expr_decrement ";" -#line 372 "parser.ypp" +#line 369 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2323 "parser.cpp" +#line 2308 "parser.cpp" break; case 60: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 377 "parser.ypp" +#line 374 "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 2329 "parser.cpp" +#line 2314 "parser.cpp" break; case 61: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 382 "parser.ypp" +#line 379 "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 2335 "parser.cpp" +#line 2320 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 384 "parser.ypp" +#line 381 "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 2341 "parser.cpp" +#line 2326 "parser.cpp" break; case 63: // stmt_wait: "wait" expr ";" -#line 389 "parser.ypp" +#line 386 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2347 "parser.cpp" +#line 2332 "parser.cpp" break; case 64: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 394 "parser.ypp" +#line 391 "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 2353 "parser.cpp" +#line 2338 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 396 "parser.ypp" +#line 393 "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 2359 "parser.cpp" +#line 2344 "parser.cpp" break; case 66: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 401 "parser.ypp" +#line 398 "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 2365 "parser.cpp" +#line 2350 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 403 "parser.ypp" +#line 400 "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 2371 "parser.cpp" +#line 2356 "parser.cpp" break; case 68: // stmt_waittillframeend: "waittillframeend" ";" -#line 408 "parser.ypp" +#line 405 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2377 "parser.cpp" +#line 2362 "parser.cpp" break; case 69: // stmt_if: "if" "(" expr ")" stmt -#line 413 "parser.ypp" +#line 410 "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 2383 "parser.cpp" +#line 2368 "parser.cpp" break; case 70: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 418 "parser.ypp" +#line 415 "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 2389 "parser.cpp" +#line 2374 "parser.cpp" break; case 71: // stmt_while: "while" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2395 "parser.cpp" +#line 2380 "parser.cpp" break; case 72: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 428 "parser.ypp" +#line 425 "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 2401 "parser.cpp" +#line 2386 "parser.cpp" break; case 73: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2407 "parser.cpp" +#line 2392 "parser.cpp" break; case 74: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 438 "parser.ypp" +#line 435 "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 2413 "parser.cpp" +#line 2398 "parser.cpp" break; case 75: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 440 "parser.ypp" +#line 437 "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 2419 "parser.cpp" +#line 2404 "parser.cpp" break; case 76: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 445 "parser.ypp" +#line 442 "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 2425 "parser.cpp" +#line 2410 "parser.cpp" break; case 77: // stmt_case: "case" expr_integer ":" -#line 450 "parser.ypp" +#line 447 "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 2431 "parser.cpp" +#line 2416 "parser.cpp" break; case 78: // stmt_case: "case" expr_string ":" -#line 452 "parser.ypp" +#line 449 "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 2437 "parser.cpp" +#line 2422 "parser.cpp" break; case 79: // stmt_default: "default" ":" -#line 457 "parser.ypp" +#line 454 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2443 "parser.cpp" +#line 2428 "parser.cpp" break; case 80: // stmt_break: "break" ";" -#line 462 "parser.ypp" +#line 459 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2449 "parser.cpp" +#line 2434 "parser.cpp" break; case 81: // stmt_continue: "continue" ";" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2455 "parser.cpp" +#line 2440 "parser.cpp" break; case 82: // stmt_return: "return" expr ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2461 "parser.cpp" +#line 2446 "parser.cpp" break; case 83: // stmt_return: "return" ";" -#line 474 "parser.ypp" +#line 471 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2467 "parser.cpp" +#line 2452 "parser.cpp" break; case 84: // stmt_breakpoint: "breakpoint" ";" -#line 479 "parser.ypp" +#line 476 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2473 "parser.cpp" +#line 2458 "parser.cpp" break; case 85: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 484 "parser.ypp" +#line 481 "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 2479 "parser.cpp" +#line 2464 "parser.cpp" break; case 86: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 489 "parser.ypp" +#line 486 "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 2485 "parser.cpp" +#line 2470 "parser.cpp" break; case 87: // expr: expr_ternary -#line 493 "parser.ypp" +#line 490 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2491 "parser.cpp" +#line 2476 "parser.cpp" break; case 88: // expr: expr_binary -#line 494 "parser.ypp" +#line 491 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2497 "parser.cpp" +#line 2482 "parser.cpp" break; case 89: // expr: expr_primitive -#line 495 "parser.ypp" +#line 492 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2503 "parser.cpp" +#line 2488 "parser.cpp" break; case 90: // expr_or_empty: expr -#line 499 "parser.ypp" +#line 496 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2509 "parser.cpp" +#line 2494 "parser.cpp" break; case 91: // expr_or_empty: %empty -#line 500 "parser.ypp" +#line 497 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2515 "parser.cpp" +#line 2500 "parser.cpp" break; case 92: // expr_assign: expr_object "=" expr -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2521 "parser.cpp" +#line 2506 "parser.cpp" break; case 93: // expr_assign: expr_object "|=" expr -#line 507 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2527 "parser.cpp" +#line 2512 "parser.cpp" break; case 94: // expr_assign: expr_object "&=" expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2533 "parser.cpp" +#line 2518 "parser.cpp" break; case 95: // expr_assign: expr_object "^=" expr -#line 511 "parser.ypp" +#line 508 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2539 "parser.cpp" +#line 2524 "parser.cpp" break; case 96: // expr_assign: expr_object "<<=" expr -#line 513 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2545 "parser.cpp" +#line 2530 "parser.cpp" break; case 97: // expr_assign: expr_object ">>=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2551 "parser.cpp" +#line 2536 "parser.cpp" break; case 98: // expr_assign: expr_object "+=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2557 "parser.cpp" +#line 2542 "parser.cpp" break; case 99: // expr_assign: expr_object "-=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2563 "parser.cpp" +#line 2548 "parser.cpp" break; case 100: // expr_assign: expr_object "*=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2569 "parser.cpp" +#line 2554 "parser.cpp" break; case 101: // expr_assign: expr_object "/=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2575 "parser.cpp" +#line 2560 "parser.cpp" break; case 102: // expr_assign: expr_object "%=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2581 "parser.cpp" +#line 2566 "parser.cpp" break; case 103: // expr_increment: "++" expr_object -#line 530 "parser.ypp" +#line 527 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2587 "parser.cpp" +#line 2572 "parser.cpp" break; case 104: // expr_increment: expr_object "++" -#line 532 "parser.ypp" +#line 529 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2593 "parser.cpp" +#line 2578 "parser.cpp" break; case 105: // expr_decrement: "--" expr_object -#line 537 "parser.ypp" +#line 534 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2599 "parser.cpp" +#line 2584 "parser.cpp" break; case 106: // expr_decrement: expr_object "--" -#line 539 "parser.ypp" +#line 536 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2605 "parser.cpp" +#line 2590 "parser.cpp" break; case 107: // expr_ternary: expr "?" expr ":" expr -#line 544 "parser.ypp" +#line 541 "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 2611 "parser.cpp" +#line 2596 "parser.cpp" break; case 108: // expr_binary: expr "||" expr -#line 549 "parser.ypp" +#line 546 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2617 "parser.cpp" +#line 2602 "parser.cpp" break; case 109: // expr_binary: expr "&&" expr -#line 551 "parser.ypp" +#line 548 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2623 "parser.cpp" +#line 2608 "parser.cpp" break; case 110: // expr_binary: expr "==" expr -#line 553 "parser.ypp" +#line 550 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2629 "parser.cpp" +#line 2614 "parser.cpp" break; case 111: // expr_binary: expr "!=" expr -#line 555 "parser.ypp" +#line 552 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2635 "parser.cpp" +#line 2620 "parser.cpp" break; case 112: // expr_binary: expr "<=" expr -#line 557 "parser.ypp" +#line 554 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2641 "parser.cpp" +#line 2626 "parser.cpp" break; case 113: // expr_binary: expr ">=" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2647 "parser.cpp" +#line 2632 "parser.cpp" break; case 114: // expr_binary: expr "<" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2653 "parser.cpp" +#line 2638 "parser.cpp" break; case 115: // expr_binary: expr ">" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2659 "parser.cpp" +#line 2644 "parser.cpp" break; case 116: // expr_binary: expr "|" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2665 "parser.cpp" +#line 2650 "parser.cpp" break; case 117: // expr_binary: expr "&" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2671 "parser.cpp" +#line 2656 "parser.cpp" break; case 118: // expr_binary: expr "^" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2677 "parser.cpp" +#line 2662 "parser.cpp" break; case 119: // expr_binary: expr "<<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2683 "parser.cpp" +#line 2668 "parser.cpp" break; case 120: // expr_binary: expr ">>" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2689 "parser.cpp" +#line 2674 "parser.cpp" break; case 121: // expr_binary: expr "+" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2695 "parser.cpp" +#line 2680 "parser.cpp" break; case 122: // expr_binary: expr "-" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2701 "parser.cpp" +#line 2686 "parser.cpp" break; case 123: // expr_binary: expr "*" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2707 "parser.cpp" +#line 2692 "parser.cpp" break; case 124: // expr_binary: expr "/" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2713 "parser.cpp" +#line 2698 "parser.cpp" break; case 125: // expr_binary: expr "%" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2719 "parser.cpp" +#line 2704 "parser.cpp" break; case 126: // expr_primitive: expr_complement -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2725 "parser.cpp" +#line 2710 "parser.cpp" break; case 127: // expr_primitive: expr_not -#line 588 "parser.ypp" +#line 585 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2731 "parser.cpp" +#line 2716 "parser.cpp" break; case 128: // expr_primitive: expr_call -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2737 "parser.cpp" +#line 2722 "parser.cpp" break; case 129: // expr_primitive: expr_method -#line 590 "parser.ypp" +#line 587 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2743 "parser.cpp" +#line 2728 "parser.cpp" break; case 130: // expr_primitive: expr_add_array -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2749 "parser.cpp" +#line 2734 "parser.cpp" break; case 131: // expr_primitive: expr_reference -#line 592 "parser.ypp" +#line 589 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2755 "parser.cpp" +#line 2740 "parser.cpp" break; case 132: // expr_primitive: expr_array -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2761 "parser.cpp" +#line 2746 "parser.cpp" break; case 133: // expr_primitive: expr_field -#line 594 "parser.ypp" +#line 591 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2767 "parser.cpp" +#line 2752 "parser.cpp" break; case 134: // expr_primitive: expr_size -#line 595 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2773 "parser.cpp" +#line 2758 "parser.cpp" break; case 135: // expr_primitive: expr_paren -#line 596 "parser.ypp" +#line 593 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2779 "parser.cpp" +#line 2764 "parser.cpp" break; case 136: // expr_primitive: expr_thisthread -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2785 "parser.cpp" +#line 2770 "parser.cpp" break; case 137: // expr_primitive: expr_empty_array -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2791 "parser.cpp" +#line 2776 "parser.cpp" break; case 138: // expr_primitive: expr_undefined -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2797 "parser.cpp" +#line 2782 "parser.cpp" break; case 139: // expr_primitive: expr_game -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2803 "parser.cpp" +#line 2788 "parser.cpp" break; case 140: // expr_primitive: expr_self -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2809 "parser.cpp" +#line 2794 "parser.cpp" break; case 141: // expr_primitive: expr_anim -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2815 "parser.cpp" +#line 2800 "parser.cpp" break; case 142: // expr_primitive: expr_level -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2821 "parser.cpp" +#line 2806 "parser.cpp" break; case 143: // expr_primitive: expr_animation -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2827 "parser.cpp" +#line 2812 "parser.cpp" break; case 144: // expr_primitive: expr_animtree -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2833 "parser.cpp" +#line 2818 "parser.cpp" break; case 145: // expr_primitive: expr_identifier -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2839 "parser.cpp" +#line 2824 "parser.cpp" break; case 146: // expr_primitive: expr_istring -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2845 "parser.cpp" +#line 2830 "parser.cpp" break; case 147: // expr_primitive: expr_string -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2851 "parser.cpp" +#line 2836 "parser.cpp" break; case 148: // expr_primitive: expr_color -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2857 "parser.cpp" +#line 2842 "parser.cpp" break; case 149: // expr_primitive: expr_vector -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2863 "parser.cpp" +#line 2848 "parser.cpp" break; case 150: // expr_primitive: expr_float -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2869 "parser.cpp" +#line 2854 "parser.cpp" break; case 151: // expr_primitive: expr_integer -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2875 "parser.cpp" +#line 2860 "parser.cpp" break; case 152: // expr_primitive: expr_false -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2881 "parser.cpp" +#line 2866 "parser.cpp" break; case 153: // expr_primitive: expr_true -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2887 "parser.cpp" +#line 2872 "parser.cpp" break; case 154: // expr_complement: "~" expr -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2893 "parser.cpp" +#line 2878 "parser.cpp" break; case 155: // expr_not: "!" expr -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2899 "parser.cpp" +#line 2884 "parser.cpp" break; case 156: // expr_call: expr_function -#line 628 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2905 "parser.cpp" +#line 2890 "parser.cpp" break; case 157: // expr_call: expr_pointer -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2911 "parser.cpp" +#line 2896 "parser.cpp" break; case 158: // expr_method: expr_object expr_function -#line 632 "parser.ypp" +#line 629 "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 2917 "parser.cpp" +#line 2902 "parser.cpp" break; case 159: // expr_method: expr_object expr_pointer -#line 633 "parser.ypp" +#line 630 "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 2923 "parser.cpp" +#line 2908 "parser.cpp" break; case 160: // expr_function: expr_identifier "(" expr_arguments ")" -#line 638 "parser.ypp" +#line 635 "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 2929 "parser.cpp" +#line 2914 "parser.cpp" break; case 161: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 637 "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 2935 "parser.cpp" +#line 2920 "parser.cpp" break; case 162: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 639 "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 2941 "parser.cpp" +#line 2926 "parser.cpp" break; case 163: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 641 "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 2947 "parser.cpp" +#line 2932 "parser.cpp" break; case 164: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 643 "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 2953 "parser.cpp" +#line 2938 "parser.cpp" break; case 165: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2959 "parser.cpp" +#line 2944 "parser.cpp" break; case 166: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 653 "parser.ypp" +#line 650 "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 2965 "parser.cpp" +#line 2950 "parser.cpp" break; case 167: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 655 "parser.ypp" +#line 652 "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 2971 "parser.cpp" +#line 2956 "parser.cpp" break; case 168: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 654 "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 2977 "parser.cpp" +#line 2962 "parser.cpp" break; case 169: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 656 "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 2983 "parser.cpp" +#line 2968 "parser.cpp" break; case 170: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 664 "parser.ypp" +#line 661 "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 2989 "parser.cpp" +#line 2974 "parser.cpp" break; case 171: // expr_parameters: expr_parameters "," expr_identifier -#line 669 "parser.ypp" +#line 666 "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 2995 "parser.cpp" +#line 2980 "parser.cpp" break; case 172: // expr_parameters: expr_identifier -#line 671 "parser.ypp" +#line 668 "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 3001 "parser.cpp" +#line 2986 "parser.cpp" break; case 173: // expr_parameters: %empty -#line 673 "parser.ypp" +#line 670 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3007 "parser.cpp" +#line 2992 "parser.cpp" break; case 174: // expr_arguments: expr_arguments_no_empty -#line 678 "parser.ypp" +#line 675 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3013 "parser.cpp" +#line 2998 "parser.cpp" break; case 175: // expr_arguments: %empty -#line 680 "parser.ypp" +#line 677 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3019 "parser.cpp" +#line 3004 "parser.cpp" break; case 176: // expr_arguments_no_empty: expr_arguments "," expr -#line 685 "parser.ypp" +#line 682 "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 3025 "parser.cpp" +#line 3010 "parser.cpp" break; case 177: // expr_arguments_no_empty: expr -#line 687 "parser.ypp" +#line 684 "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 3031 "parser.cpp" +#line 3016 "parser.cpp" break; case 178: // expr_reference: "::" expr_identifier -#line 692 "parser.ypp" +#line 689 "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 3037 "parser.cpp" +#line 3022 "parser.cpp" break; case 179: // expr_reference: expr_path "::" expr_identifier -#line 694 "parser.ypp" +#line 691 "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 3043 "parser.cpp" +#line 3028 "parser.cpp" break; case 180: // expr_array: expr_object "[" expr "]" -#line 699 "parser.ypp" +#line 696 "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 3049 "parser.cpp" +#line 3034 "parser.cpp" break; case 181: // expr_field: expr_object "." expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3055 "parser.cpp" +#line 3040 "parser.cpp" break; case 182: // expr_size: expr_object ".size" -#line 709 "parser.ypp" +#line 706 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3061 "parser.cpp" +#line 3046 "parser.cpp" break; case 183: // expr_paren: "(" expr ")" -#line 714 "parser.ypp" +#line 711 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3067 "parser.cpp" +#line 3052 "parser.cpp" break; case 184: // expr_object: expr_call -#line 718 "parser.ypp" +#line 715 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3073 "parser.cpp" +#line 3058 "parser.cpp" break; case 185: // expr_object: expr_method -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3079 "parser.cpp" +#line 3064 "parser.cpp" break; case 186: // expr_object: expr_array -#line 720 "parser.ypp" +#line 717 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3085 "parser.cpp" +#line 3070 "parser.cpp" break; case 187: // expr_object: expr_field -#line 721 "parser.ypp" +#line 718 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3091 "parser.cpp" +#line 3076 "parser.cpp" break; case 188: // expr_object: expr_game -#line 722 "parser.ypp" +#line 719 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3097 "parser.cpp" +#line 3082 "parser.cpp" break; case 189: // expr_object: expr_self -#line 723 "parser.ypp" +#line 720 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3103 "parser.cpp" +#line 3088 "parser.cpp" break; case 190: // expr_object: expr_anim -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3109 "parser.cpp" +#line 3094 "parser.cpp" break; case 191: // expr_object: expr_level -#line 725 "parser.ypp" +#line 722 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3115 "parser.cpp" +#line 3100 "parser.cpp" break; case 192: // expr_object: expr_identifier -#line 726 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3121 "parser.cpp" +#line 3106 "parser.cpp" break; case 193: // expr_thisthread: "thisthread" -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3127 "parser.cpp" +#line 3112 "parser.cpp" break; case 194: // expr_empty_array: "[" "]" -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3133 "parser.cpp" +#line 3118 "parser.cpp" break; case 195: // expr_undefined: "undefined" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3139 "parser.cpp" +#line 3124 "parser.cpp" break; case 196: // expr_game: "game" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3145 "parser.cpp" +#line 3130 "parser.cpp" break; case 197: // expr_self: "self" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3151 "parser.cpp" +#line 3136 "parser.cpp" break; case 198: // expr_anim: "anim" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3157 "parser.cpp" +#line 3142 "parser.cpp" break; case 199: // expr_level: "level" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3163 "parser.cpp" +#line 3148 "parser.cpp" break; case 200: // expr_animation: "%" "identifier" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3169 "parser.cpp" +#line 3154 "parser.cpp" break; case 201: // expr_animtree: "#animtree" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3175 "parser.cpp" +#line 3160 "parser.cpp" break; case 202: // expr_identifier: "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3181 "parser.cpp" +#line 3166 "parser.cpp" break; case 203: // expr_path: "path" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3187 "parser.cpp" +#line 3172 "parser.cpp" break; case 204: // expr_path: expr_identifier -#line 783 "parser.ypp" +#line 780 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3193 "parser.cpp" +#line 3178 "parser.cpp" break; case 205: // expr_istring: "localized string" -#line 788 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3199 "parser.cpp" +#line 3184 "parser.cpp" break; case 206: // expr_string: "string literal" -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3205 "parser.cpp" +#line 3190 "parser.cpp" break; case 207: // expr_color: "color" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3211 "parser.cpp" +#line 3196 "parser.cpp" break; case 208: // expr_vector: "(" expr "," expr "," expr ")" -#line 803 "parser.ypp" +#line 800 "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 3217 "parser.cpp" +#line 3202 "parser.cpp" break; case 209: // expr_float: "-" "float" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3223 "parser.cpp" +#line 3208 "parser.cpp" break; case 210: // expr_float: "float" -#line 810 "parser.ypp" +#line 807 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3229 "parser.cpp" +#line 3214 "parser.cpp" break; - case 211: // expr_integer: "-" "int" -#line 815 "parser.ypp" + case 211: // expr_integer: "-" "integer" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3235 "parser.cpp" +#line 3220 "parser.cpp" break; - case 212: // expr_integer: "int" -#line 817 "parser.ypp" + case 212: // expr_integer: "integer" +#line 814 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3241 "parser.cpp" +#line 3226 "parser.cpp" break; - case 213: // expr_integer: "octal int" + case 213: // expr_false: "false" #line 819 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3247 "parser.cpp" - break; - - case 214: // expr_integer: "binary int" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3253 "parser.cpp" - break; - - case 215: // expr_integer: "hexadecimal int" -#line 823 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3259 "parser.cpp" - break; - - case 216: // expr_false: "false" -#line 828 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3265 "parser.cpp" +#line 3232 "parser.cpp" break; - case 217: // expr_true: "true" -#line 833 "parser.ypp" + case 214: // expr_true: "true" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3271 "parser.cpp" +#line 3238 "parser.cpp" break; -#line 3275 "parser.cpp" +#line 3242 "parser.cpp" default: break; @@ -3466,27 +3433,27 @@ namespace xsk { namespace gsc { namespace iw5 { "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", "localized string", "color", - "float", "int", "octal int", "binary int", "hexadecimal int", - "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", - "POSTINC", "POSTDEC", "$accept", "root", "program", "inline", "include", - "declaration", "decl_usingtree", "decl_constant", "decl_thread", "stmt", - "stmt_dev", "stmt_block", "stmt_list", "stmt_expr", "stmt_call", - "stmt_assign", "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", - "stmt_waittillmatch", "stmt_waittillframeend", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier", "expr_path", "expr_istring", - "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", - "expr_false", "expr_true", YY_NULLPTR + "float", "integer", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", + "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", + "inline", "include", "declaration", "decl_usingtree", "decl_constant", + "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", + "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", + "stmt_wait", "stmt_waittill", "stmt_waittillmatch", + "stmt_waittillframeend", "stmt_if", "stmt_ifelse", "stmt_while", + "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", "stmt_case", + "stmt_default", "stmt_break", "stmt_continue", "stmt_return", + "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", "expr", + "expr_or_empty", "expr_assign", "expr_increment", "expr_decrement", + "expr_ternary", "expr_binary", "expr_primitive", "expr_complement", + "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", + "expr_add_array", "expr_parameters", "expr_arguments", + "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_size", "expr_paren", "expr_object", "expr_thisthread", + "expr_empty_array", "expr_undefined", "expr_game", "expr_self", + "expr_anim", "expr_level", "expr_animation", "expr_animtree", + "expr_identifier", "expr_path", "expr_istring", "expr_string", + "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", + "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3751,57 +3718,57 @@ namespace xsk { namespace gsc { namespace iw5 { } - const short parser::yypact_ninf_ = -261; + const short parser::yypact_ninf_ = -263; const short parser::yytable_ninf_ = -205; const short parser::yypact_[] = { - 17, -261, -261, -61, -61, -12, -261, 42, 17, -261, - -261, -261, -261, -261, -261, -17, -261, -261, -36, 15, - -16, -261, -261, -261, -261, -8, 911, -261, -261, -261, - 38, 18, -261, -261, -40, -33, -261, 41, -261, -261, - -261, -261, -261, -261, -261, 911, 777, -8, 911, 911, - -43, 1, -261, -261, -261, -261, -261, -261, -261, 2063, - -261, -261, -261, -261, -261, 69, 347, -261, -261, -261, - -261, 507, 710, -261, -261, 734, -261, -261, -261, 742, - 801, 867, 875, -261, -261, 26, 45, -261, -261, -261, - -261, -261, -261, -261, -261, 49, 53, -8, 58, 66, - 60, 70, 77, 89, 90, 1389, 777, -261, 2146, 95, - 103, -261, -261, -261, -261, -261, -261, -261, 911, 911, - 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, - 911, 911, 911, 911, 911, 911, 911, -261, 978, -8, - -261, -261, 117, 112, 911, -8, -261, 1073, -261, -261, - 911, 911, -8, 911, 911, -8, 911, -261, 911, 974, - 911, -261, 2028, 162, 162, 2177, 2187, 1059, 1059, 8, - 8, 8, 8, 2218, 2259, 2228, -15, -15, -261, -261, - -261, 1833, -261, -8, 36, -261, 123, 1149, 911, 120, - 125, 1327, 128, 132, 134, 135, 28, 127, 131, 133, - 844, 136, 145, 150, -261, 147, 570, 570, -261, -261, - -261, 1200, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, 142, 144, 146, 148, 149, - -261, -261, 642, -261, -261, -261, -261, -10, 1873, 55, - 155, 1913, 64, 160, 1953, 1992, 156, 2146, 911, -261, - 123, -261, 911, -261, 1276, 2098, -261, 911, 190, 911, - -2, -8, 911, 111, 158, 167, -261, -261, -261, -261, - 2133, -261, 911, 911, 911, -261, -261, 438, 438, -261, - -261, -261, -261, -261, -261, -261, 166, 169, 171, 180, - -261, -261, 911, 911, 911, 911, 911, 911, 911, 911, - 911, 911, 911, 176, -261, 911, 177, -261, 911, 178, - 911, 185, 2146, 82, -261, -261, 1555, 186, 1589, 188, - -261, -261, -261, 1353, -3, 1623, -261, -261, -261, 83, - 84, 974, 911, 911, 911, 911, 2146, 2146, 2146, 2146, - 2146, 2146, 2146, 2146, 2146, 2146, 2146, 197, 85, 200, - 86, 207, 1657, 911, -261, 1327, 911, 1327, 911, 911, - -8, 53, 199, 203, 1691, 1433, 1477, 1521, 911, -261, - 911, -261, 911, -261, 94, 214, 1725, -261, 2146, 204, - 1759, 232, -261, -261, -261, 205, 206, 911, 208, 911, - 209, 911, 97, 115, 118, -261, 1327, 212, -2, 1327, - 911, -261, -261, 216, -261, 222, -261, 224, -261, -261, - -261, -261, -261, 225, -261, 1793, 219, 221, 223, 1327, - 1327, -261, -261, -261, -261, -261 + 34, -263, -263, -22, -22, -28, -263, 19, 34, -263, + -263, -263, -263, -263, -263, -17, -263, -263, -4, 4, + -48, -263, -263, -263, -263, -38, 1180, -263, -263, -263, + 15, 33, -263, -263, -33, -24, -263, 6, -263, -263, + -263, -263, -263, -263, -263, 1180, 630, -38, 1180, 1180, + -15, -16, -263, -263, -263, -263, 2051, -263, -263, -263, + -263, -263, -14, 78, -263, -263, -263, -263, 532, 652, + -263, -263, 678, -263, -263, -263, 713, 727, 756, 866, + -263, -263, 57, 32, -263, -263, -263, -263, -263, -263, + -263, -263, 37, 54, -38, 56, 71, 62, 73, 88, + 90, 93, 1377, 630, -263, 2134, 98, 116, -263, -263, + -263, -263, -263, -263, -263, 1180, 1180, 1180, 1180, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 1180, 1180, 1180, 1180, -263, 1244, -38, -263, -263, 94, + 110, 1180, -38, -263, 835, -263, -263, 1180, 1180, -38, + 1180, 1180, -38, 1180, -263, 1180, 1176, 1180, -263, 2016, + 115, 115, 2165, 1321, 948, 948, 271, 271, 271, 271, + 747, 2206, 2175, 84, 84, -263, -263, -263, 1821, -263, + -38, 48, -263, 122, 911, 1180, 119, 125, 1089, 131, + 132, 133, 134, 21, 135, 136, 137, 1116, 138, 143, + 151, -263, 149, 605, 605, -263, -263, -263, 962, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, 152, 153, 154, 156, 157, -263, -263, 1292, + -263, -263, -263, -263, 3, 1861, 49, 172, 1901, 52, + 173, 1941, 1980, 178, 2134, 1180, -263, 122, -263, 1180, + -263, 1038, 2086, -263, 1180, 202, 1180, 29, -38, 1180, + 127, 175, 176, -263, -263, -263, -263, 2121, -263, 1180, + 1180, 1180, -263, -263, -2, -2, -263, -263, -263, -263, + -263, -263, -263, 186, 188, 189, 193, -263, -263, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 187, -263, 1180, 190, -263, 1180, 194, 1180, 198, 2134, + 75, -263, -263, 1543, 200, 1577, 184, -263, -263, -263, + 1341, 1, 1611, -263, -263, -263, 83, 85, 1176, 1180, + 1180, 1180, 1180, 2134, 2134, 2134, 2134, 2134, 2134, 2134, + 2134, 2134, 2134, 2134, 201, 86, 204, 89, 206, 1645, + 1180, -263, 1089, 1180, 1089, 1180, 1180, -38, 54, 197, + 199, 1679, 1421, 1465, 1509, 1180, -263, 1180, -263, 1180, + -263, 106, 235, 1713, -263, 2134, 203, 1747, 232, -263, + -263, -263, 207, 209, 1180, 210, 1180, 212, 1180, 107, + 113, 114, -263, 1089, 213, 29, 1089, 1180, -263, -263, + 227, -263, 228, -263, 231, -263, -263, -263, -263, -263, + 237, -263, 1781, 226, 230, 233, 1089, 1089, -263, -263, + -263, -263, -263 }; const unsigned char @@ -3810,483 +3777,470 @@ namespace xsk { namespace gsc { namespace iw5 { 3, 12, 13, 0, 0, 0, 202, 0, 2, 7, 8, 9, 14, 15, 16, 0, 203, 204, 0, 0, 0, 1, 4, 5, 6, 173, 0, 10, 11, 206, - 0, 0, 172, 201, 0, 0, 193, 0, 217, 216, + 0, 0, 172, 201, 0, 0, 193, 0, 214, 213, 195, 196, 197, 198, 199, 0, 175, 0, 0, 0, - 0, 0, 205, 207, 210, 212, 213, 214, 215, 0, - 87, 88, 89, 126, 127, 128, 129, 156, 157, 130, - 131, 132, 133, 134, 135, 0, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 0, 146, 147, 148, - 149, 150, 151, 152, 153, 0, 0, 0, 0, 204, - 0, 0, 204, 0, 0, 0, 175, 194, 177, 0, - 174, 178, 155, 154, 209, 211, 200, 18, 0, 0, + 0, 0, 205, 207, 210, 212, 0, 87, 88, 89, + 126, 127, 128, 129, 156, 157, 130, 131, 132, 133, + 134, 135, 0, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 152, 153, 0, 0, 0, 0, 204, 0, 0, 204, + 0, 0, 0, 175, 194, 177, 0, 174, 178, 155, + 154, 209, 211, 200, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 182, 0, 0, - 158, 159, 204, 0, 175, 0, 17, 0, 19, 171, - 0, 175, 0, 0, 175, 0, 0, 183, 0, 177, - 0, 170, 0, 119, 120, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, - 125, 0, 181, 0, 0, 174, 179, 0, 0, 0, + 0, 0, 0, 0, 182, 0, 0, 158, 159, 204, + 0, 175, 0, 17, 0, 19, 171, 0, 175, 0, + 0, 175, 0, 0, 183, 0, 177, 0, 170, 0, + 119, 120, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 121, 122, 123, 124, 125, 0, 181, + 0, 0, 174, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 0, 0, 0, 50, 20, - 21, 0, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 0, 0, 0, 184, 185, - 186, 187, 0, 188, 189, 190, 191, 192, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 176, 0, 180, - 0, 160, 175, 46, 0, 0, 68, 0, 0, 0, - 54, 0, 0, 0, 0, 0, 79, 80, 81, 83, - 0, 84, 175, 175, 0, 184, 185, 103, 105, 47, - 49, 57, 58, 59, 55, 56, 0, 0, 0, 0, - 104, 106, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 162, 175, 0, 164, 175, 0, - 0, 0, 107, 0, 45, 63, 0, 0, 0, 0, - 51, 52, 53, 0, 0, 0, 78, 77, 82, 0, - 0, 0, 0, 0, 0, 0, 92, 98, 99, 100, - 101, 102, 93, 94, 95, 97, 96, 0, 0, 0, - 0, 0, 0, 175, 161, 0, 0, 0, 91, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 175, 163, - 175, 165, 175, 208, 0, 69, 0, 71, 90, 0, - 0, 0, 76, 85, 86, 0, 0, 175, 0, 175, - 0, 175, 0, 0, 0, 166, 0, 0, 54, 0, - 0, 60, 62, 174, 65, 174, 67, 174, 167, 168, - 169, 70, 72, 0, 74, 0, 0, 0, 0, 0, - 0, 61, 64, 66, 73, 75 + 0, 48, 0, 0, 0, 50, 20, 21, 0, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 0, 0, 0, 184, 185, 186, 187, 0, + 188, 189, 190, 191, 192, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 0, 180, 0, 160, 175, + 46, 0, 0, 68, 0, 0, 0, 54, 0, 0, + 0, 0, 0, 79, 80, 81, 83, 0, 84, 175, + 175, 0, 184, 185, 103, 105, 47, 49, 57, 58, + 59, 55, 56, 0, 0, 0, 0, 104, 106, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 162, 175, 0, 164, 175, 0, 0, 0, 107, + 0, 45, 63, 0, 0, 0, 0, 51, 52, 53, + 0, 0, 0, 78, 77, 82, 0, 0, 0, 0, + 0, 0, 0, 92, 98, 99, 100, 101, 102, 93, + 94, 95, 97, 96, 0, 0, 0, 0, 0, 0, + 175, 161, 0, 0, 0, 91, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 175, 163, 175, 165, 175, + 208, 0, 69, 0, 71, 90, 0, 0, 0, 76, + 85, 86, 0, 0, 175, 0, 175, 0, 175, 0, + 0, 0, 166, 0, 0, 54, 0, 0, 60, 62, + 174, 65, 174, 67, 174, 167, 168, 169, 70, 72, + 0, 74, 0, 0, 0, 0, 0, 0, 61, 64, + 66, 73, 75 }; const short parser::yypgoto_[] = { - -261, -261, -261, 267, 274, 275, -261, -261, -261, -175, - -261, -94, 98, -124, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, 187, -261, -260, - -259, -255, -261, -261, -261, -261, -261, -128, -37, -70, - -66, -261, -261, 425, -45, -261, -26, 157, -261, -261, - 241, -261, -261, -261, 255, 273, 329, 361, -261, -261, - 0, 9, -261, -14, -261, -261, -261, 93, -261, -261 + -263, -263, -263, 279, 281, 282, -263, -263, -263, -181, + -263, -91, 108, -114, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, 185, -263, -262, + -257, -251, -263, -263, -263, -263, -263, -82, 70, -66, + -61, -263, -263, -120, -45, -263, 181, 192, -263, -263, + 253, -263, -263, -263, 327, 365, 373, 421, -263, -263, + 0, 9, -263, -11, -263, -263, -263, 102, -263, -263 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 208, - 209, 210, 211, 329, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 108, 389, 235, - 236, 237, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 31, 109, 185, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 205, + 206, 207, 208, 326, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 105, 386, 232, + 233, 234, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 31, 106, 182, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 30, 98, 15, 141, - 330, 331, 18, 19, 101, 332, 268, 27, 369, 238, - 1, 2, 3, 4, 5, 32, 25, 16, 6, 34, - 35, 20, 37, 144, 99, 102, 290, 41, 42, 43, - 44, -204, 21, 100, 103, 205, 370, 111, 16, 6, - 114, 115, 26, 206, 207, 16, 6, -192, -192, 238, - -192, 110, 96, 238, -192, 119, 120, 97, 28, 144, - 134, 135, 136, -192, 29, 142, -192, -204, 285, 285, - 261, 6, 95, 238, 143, 160, 16, 6, 104, 290, - 116, 132, 133, 134, 135, 136, 145, 149, 147, 314, - -184, -184, 146, -184, 160, 150, 6, -184, 317, 151, - 239, 152, 273, 160, -192, -192, -184, 153, 29, -184, - 154, 240, 55, 56, 57, 58, 364, 372, 373, 379, - 381, 160, 160, 160, 160, 160, 238, 156, 405, 182, - 155, 418, 285, 160, 160, 186, 160, 247, 330, 331, - 239, 161, 250, 332, 239, 253, 143, -184, -184, 419, - 144, 240, 420, 183, 160, 240, 262, 160, 267, 286, - 286, 269, 140, 266, 239, 270, 141, 271, 272, 276, - 240, 240, 274, 260, 277, 240, 278, 247, 282, 281, - 385, 247, 387, 283, 284, 291, 143, 292, 315, 293, - 143, 294, 295, 318, 321, 115, 247, 247, 327, 342, - 336, 247, 343, 59, 344, 143, 143, 140, 140, 337, - 143, 141, 141, 345, 357, 359, 361, 239, 363, 366, - 406, 421, 105, 286, 424, 112, 113, 238, 240, 238, - 378, 368, 142, 380, 240, 132, 133, 134, 135, 136, - 382, 143, 393, 410, 434, 435, 394, 408, 411, 412, - 426, 414, 416, 140, 247, 422, 427, 141, 428, 429, - 247, 334, 431, 143, 432, 22, 433, 392, 238, 143, - 285, 238, 23, 24, 423, 264, 0, 142, 142, 275, - 0, 0, 0, 159, 0, 0, 143, 143, 0, 0, - 0, 238, 238, 0, 241, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 0, 181, 0, 0, 239, 0, - 239, 0, 0, 142, 0, 0, 0, 248, 0, 240, - 251, 240, 143, 254, 241, 255, 0, 257, 241, 0, - 0, 0, 413, 0, 415, 0, 417, 0, 0, 0, - 0, 0, 0, 241, 241, 247, 0, 247, 241, 239, - 391, 286, 239, 0, 143, 265, 143, 0, -185, -185, - 240, -185, 240, 240, 0, -185, 0, 280, 242, 0, - 0, 0, 239, 239, -185, 0, 0, -185, 0, 0, - 0, 0, 243, 240, 240, 0, 247, 0, 247, 247, - 0, 0, 0, 0, 0, 143, 0, 143, 143, 0, - 244, 241, 0, 0, 0, 0, 0, 241, 242, 247, - 247, 0, 242, 0, 0, -185, -185, 0, 143, 143, - 0, 0, 243, 0, 0, 322, 243, 287, 288, 0, - 0, 0, 242, 0, 326, 0, 328, 0, 0, 335, - 244, 243, 243, 0, 244, 0, 243, 0, 0, 34, - 35, 341, 37, 0, 0, 0, 245, 0, 0, 244, - 244, 0, 0, 0, 244, 138, 0, 0, 139, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 0, 0, 0, 0, 0, 242, 0, 362, 246, 0, - 0, 333, 0, 0, 0, 0, 245, 0, 0, 243, - 245, 0, 241, 0, 241, 243, 16, 6, 0, 374, - 375, 376, 377, 0, 0, 245, 245, 244, -186, -186, - 245, -186, 0, 244, 0, -186, 0, 0, 246, 0, - 0, 0, 246, 386, -186, 388, 390, -186, 0, 0, - 0, 0, 0, 241, 0, 241, 241, 246, 246, 184, - 0, 0, 246, 0, 0, 0, 249, 0, 0, 252, - 0, 0, 0, 0, 0, 0, 241, 241, 0, 0, - 0, 0, 0, 245, 0, -186, -186, 425, 0, 245, - 0, 34, 35, 0, 37, 0, 242, 0, 242, 41, - 42, 43, 44, 0, 0, 0, 0, 205, 0, 0, - 243, 0, 243, 0, 0, 246, 0, 0, 0, 0, - 0, 246, 0, 0, 0, 0, 0, 0, 244, 0, - 244, 0, 0, 0, 0, 0, 0, 242, 0, 333, - 242, 296, 297, 0, 298, 299, 0, 0, 16, 6, - 0, 243, 0, 243, 243, 0, 0, 0, 0, 0, - 242, 242, 0, 34, 35, 0, 37, 0, 0, 244, - 0, 244, 244, 0, 243, 243, 0, 323, 0, 138, - 0, 0, 139, 0, 245, 0, 245, 300, 301, 0, - 0, 0, 244, 244, 0, 0, 0, 339, 340, 0, - 0, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 0, 0, 0, 0, 246, 0, 246, 0, - 16, 6, 0, 0, 0, 245, 0, 245, 245, 0, - 358, -187, -187, 360, -187, 0, 0, 0, -187, 0, - 0, 0, 0, 0, 0, 0, 0, -187, 245, 245, - -187, 0, 0, 0, 0, 34, 35, 246, 37, 246, - 246, 0, 137, -188, -188, 0, -188, 0, 0, 0, - -188, 138, 0, 0, 139, 33, 0, 0, 384, -188, - 246, 246, -188, 0, 0, 0, 0, 0, -187, -187, - 0, 0, 0, 402, 0, 403, 0, 404, 34, 35, - 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, - 45, 0, 16, 6, 106, 107, 0, 0, 47, 0, - -188, -188, -189, -189, 0, -189, 0, 0, 0, -189, - 0, 0, 0, 0, 48, 49, 0, 0, -189, 0, - 0, -189, 33, 0, 0, 0, 0, 0, 0, 0, - 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, - 54, 55, 56, 57, 58, 34, 35, 36, 37, 38, - 39, 40, 0, 41, 42, 43, 44, 45, 0, -189, - -189, 46, 0, 0, 0, 47, 0, 279, -190, -190, - 0, -190, 0, 0, 0, -190, -191, -191, 0, -191, - 0, 48, 49, -191, -190, 0, 0, -190, 0, 33, - 0, 0, -191, 0, 0, -191, 0, 0, 50, 0, - 0, 51, 16, 6, 29, 52, 53, 54, 55, 56, - 57, 58, 34, 35, 36, 37, 38, 39, 40, 0, - 41, 42, 43, 44, 45, -190, -190, 0, 46, 0, - 0, 0, 47, -191, -191, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, - 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, - 0, 0, 0, 0, 0, 50, 0, 0, 51, 16, - 6, 29, 52, 53, 54, 55, 56, 57, 58, 34, - 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 44, 45, 256, 0, 0, 106, 0, 0, 118, 47, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 48, 49, 0, 0, 0, - 0, 0, 0, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 50, 0, 0, 51, 16, 6, 29, 52, - 53, 54, 55, 56, 57, 58, 187, 0, 0, 0, - 0, 0, 0, 0, 188, 0, 0, 189, 190, 0, - 191, 192, 193, 194, 0, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 34, 35, 0, 37, 0, 0, - 0, 0, 41, 42, 43, 44, 119, 120, 147, 204, - 205, 0, 125, 126, 127, 128, 0, 0, 206, 207, + 15, 107, 145, 17, 17, 327, 137, 265, 15, 30, + 328, 138, 18, 19, 95, 20, 329, -184, -184, 21, + -184, 181, 366, 98, -184, 32, 25, 287, 246, 34, + 35, 249, 37, -184, 96, 99, -184, 1, 2, 3, + 4, 5, 29, 97, 100, 135, 141, 108, 136, 27, + 367, 6, 26, 101, -204, 16, 6, 28, 107, 92, + 34, 35, 235, 37, 16, 6, 16, 6, 41, 42, + 43, 44, 139, 113, -184, -184, 202, 93, 111, 112, + 287, 140, 94, 142, 203, 204, 16, 6, -192, -192, + 143, -192, 258, 311, 146, -192, 314, 157, 157, 144, + 141, 157, 235, 147, -192, 270, 235, -192, -204, -185, + -185, 29, -185, 149, 148, 55, -185, 16, 6, 361, + 150, 282, 282, 6, 157, -185, 235, 369, -185, 370, + 376, 151, 157, 378, 157, 157, 179, 141, 157, 320, + 153, 152, 183, 327, 244, -192, -192, 157, 328, 247, + 402, 415, 250, 140, 329, 157, 157, 416, 417, 336, + 337, 180, 157, 157, 158, 259, -185, -185, 264, 131, + 132, 133, 263, 137, 266, 267, 268, 269, 138, 235, + 257, 382, 271, 384, 244, 282, 279, 273, 244, 274, + 275, 278, 355, 140, 280, 357, 281, 140, 129, 130, + 131, 132, 133, 244, 244, 288, 289, 290, 244, 291, + 292, 56, 140, 140, 236, 312, 315, 140, 137, 137, + 324, 112, 418, 138, 138, 421, 318, 333, 334, 339, + 102, 340, 341, 109, 110, 354, 342, 365, 356, 139, + 381, 360, 358, 363, 375, 431, 432, 377, 140, 379, + 390, 403, 391, 407, 236, 399, 405, 400, 236, 401, + 408, 244, 409, 411, 137, 413, 419, 244, 331, 138, + 140, 423, 424, 283, 283, 425, 140, 389, 236, 428, + 235, 426, 235, 429, 139, 139, 430, 22, 156, 23, + 24, 420, 261, 140, 140, 272, 0, 0, 0, 0, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 0, + 178, 235, 0, 282, 235, 237, 0, 0, 116, 117, + 139, 236, 245, 0, 0, 248, 238, 283, 251, 140, + 252, 0, 254, 0, 235, 235, 0, 0, 0, 410, + 0, 412, 0, 414, 129, 130, 131, 132, 133, 0, + 0, 0, 244, 0, 244, 237, 0, 388, 0, 237, + 262, 140, 0, 140, 0, 0, 238, 0, 0, 0, + 238, 0, 277, 0, 237, 237, 0, 0, 0, 237, + 0, 0, 0, 0, 0, 238, 238, 239, 0, 0, + 238, 0, 0, 244, 0, 244, 244, 0, 0, 0, + 0, 0, 140, 0, 140, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 244, 244, 0, 0, + 0, 0, 236, 0, 236, 140, 140, 239, 0, 0, + 319, 239, 237, 0, 0, 0, 0, 0, 237, 323, + 0, 325, 0, 238, 332, 0, 284, 285, 0, 238, + 0, 239, 0, 0, 0, 0, 338, 0, 0, 0, + 0, 240, 0, 236, 0, 283, 236, 0, 0, 0, + 0, 0, 0, 0, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 0, 236, 236, 0, 0, + 0, 0, 359, 0, 0, 0, 0, 0, 0, 241, + 0, 240, 0, 0, 239, 240, 0, 242, 0, 0, + 330, 0, 0, 0, 371, 372, 373, 374, 0, 0, + 240, 240, 0, 0, 0, 240, 0, 0, 0, 0, + 0, 0, 0, 237, 0, 237, 0, 0, 383, 241, + 385, 387, 0, 241, 238, 0, 238, 242, 0, 0, + 0, 242, 0, -186, -186, 243, -186, 0, 241, 241, + -186, 0, 0, 241, 0, 0, 242, 242, 0, -186, + 0, 242, -186, 0, 237, 0, 237, 237, 240, 0, + 0, 0, 422, 0, 240, 238, 0, 238, 238, 0, + 0, 0, 0, 0, 0, 243, 0, 237, 237, 243, + 0, 0, 0, 0, 0, 239, 0, 239, 238, 238, + -186, -186, 0, 0, 243, 243, 241, 0, 0, 243, + 0, 0, 241, 0, 242, 0, 34, 35, 33, 37, + 242, 0, 0, 0, 41, 42, 43, 44, 0, 0, + 0, 0, 202, 0, 0, 0, 239, 0, 330, 239, + 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 103, 104, 239, + 239, 47, 243, -187, -187, 0, -187, 0, 243, 240, + -187, 240, 0, 16, 6, 0, 0, 48, 49, -187, + 0, 0, -187, 0, 0, 0, 0, 0, 0, 34, + 35, 0, 37, 0, 50, 0, 134, 51, 16, 6, + 29, 52, 53, 54, 55, 135, 0, 241, 136, 241, + 240, 0, 240, 240, 0, 242, 0, 242, 0, 0, + -187, -187, 0, 0, -188, -188, 0, -188, 0, 0, + 0, -188, 0, 240, 240, 0, 0, 0, -189, -189, + -188, -189, 0, -188, 0, -189, 16, 6, 241, 0, + 241, 241, 0, 0, -189, 0, 242, -189, 242, 242, + 0, 0, 0, 243, 0, 243, 0, -190, -190, 0, + -190, 241, 241, 0, -190, 0, 0, 0, 0, 242, + 242, -188, -188, -190, 116, 117, -190, 0, 120, 121, + 122, 123, 124, 125, 0, -189, -189, 0, 0, 0, + 0, 0, 0, 0, 243, 0, 243, 243, 127, 128, + 129, 130, 131, 132, 133, 0, 0, 0, 184, 0, + 0, 0, 0, 0, -190, -190, 185, 243, 243, 186, + 187, 0, 188, 189, 190, 191, 0, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 34, 35, 0, 37, + 0, 0, 0, 0, 41, 42, 43, 44, 0, 0, + 144, 201, 202, 0, 0, 0, 0, 0, 0, 0, + 203, 204, 0, 0, 0, 0, 0, -191, -191, 0, + -191, 0, 0, 0, -191, 0, 0, 0, 0, 0, + 0, 0, 0, -191, 184, 260, -191, 0, 0, 0, + 0, 0, 185, 16, 6, 186, 187, 0, 188, 189, + 190, 191, 0, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 34, 35, 0, 37, 0, 0, 0, 0, + 41, 42, 43, 44, -191, -191, 144, 0, 202, 0, + 0, 0, 0, 0, 0, 184, 203, 204, 0, 0, + 0, 0, 0, 185, 0, 0, 186, 187, 0, 188, + 189, 190, 191, 0, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 34, 35, 0, 37, 0, 0, 16, + 6, 41, 42, 43, 44, 116, 117, 144, 286, 202, + 0, 122, 123, 124, 125, 0, 0, 203, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136, 0, 0, 0, - 0, 0, 187, 263, 0, 0, 0, 0, 0, 0, - 188, 16, 6, 189, 190, 0, 191, 192, 193, 194, - 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 34, 35, 0, 37, 0, 0, 0, 0, 41, 42, - 43, 44, 0, 0, 147, 0, 205, 0, 0, 0, - 0, 0, 0, 187, 206, 207, 0, 0, 0, 0, - 0, 188, 0, 0, 189, 190, 0, 191, 192, 193, - 194, 0, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 34, 35, 0, 37, 0, 0, 16, 6, 41, - 42, 43, 44, 0, 0, 147, 289, 205, 0, 0, - 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, + 0, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 184, 321, 0, 0, 0, 0, 0, 0, 185, + 16, 6, 186, 187, 0, 188, 189, 190, 191, 0, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 34, + 35, 0, 37, 0, 0, 0, 0, 41, 42, 43, + 44, 0, 0, 144, 0, 202, 0, 0, 0, 0, + 0, 0, 184, 203, 204, 0, 0, 0, 0, 0, + 185, 0, 0, 186, 187, 0, 188, 189, 190, 191, + 0, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 34, 35, 0, 37, 33, 0, 16, 6, 41, 42, + 43, 44, 0, 0, 144, 0, 202, 0, 0, 0, + 0, 0, 0, 0, 203, 204, 0, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, + 0, 0, 0, 46, 0, 0, 0, 47, 0, 276, + 0, 0, 0, 0, 0, 0, 0, 16, 6, 0, + 0, 0, 0, 48, 49, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, - 324, 0, 0, 0, 0, 0, 0, 188, 16, 6, - 189, 190, 0, 191, 192, 193, 194, 0, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 34, 35, 0, - 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, - 0, 147, 0, 205, 0, 0, 0, 0, 0, 0, - 187, 206, 207, 0, 0, 0, 0, 0, 188, 0, - 0, 189, 190, 0, 191, 192, 193, 194, 0, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 34, 35, - 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, - 0, 0, 147, 0, 205, 0, 0, 0, 0, 0, - 0, 0, 206, 207, 34, 35, 0, 37, 0, 0, + 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 253, 0, 0, 46, 0, 0, + 115, 47, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 48, 49, 0, + 0, 0, 33, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 103, 0, 0, 0, 47, 0, 0, 0, 0, + 0, 293, 294, 0, 295, 296, 0, 0, 0, 0, + 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 34, 35, 0, 37, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 135, + 0, 0, 136, 0, 0, 0, 0, 297, 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 138, 0, 0, 139, 0, 0, 0, 0, 300, 301, - 0, 0, 0, 0, 0, 16, 6, 0, 0, 0, - 0, 0, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 157, 0, 0, 0, 0, 158, 0, - 0, 16, 6, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, + 0, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 34, 35, 0, 37, 0, 0, 116, 117, + 16, 6, 120, 121, 122, 123, 124, 125, 135, 0, + 0, 136, 0, 0, 0, 0, 297, 298, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 154, 0, 0, 0, 0, 155, 0, 0, 16, + 6, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 393, 0, 0, 0, 0, + 394, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 395, + 0, 0, 0, 0, 396, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 397, 0, 0, 0, 0, 398, 0, + 0, 0, 0, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 362, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 364, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 368, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 392, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 404, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 406, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 427, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 256, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 310, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 313, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 316, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 317, + 0, 0, 0, 0, 115, 0, 0, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 126, 127, 128, 129, 130, 131, 132, 133, 255, 0, + 115, 0, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 114, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 322, + 115, 0, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 335, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 115, 0, + 0, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 0, 0, 126, 127, 128, 129, 130, 131, + 132, 133, 116, 117, 0, 119, 120, 121, 122, 123, + 124, 125, 116, 117, 0, 0, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 0, 0, 0, 127, 0, 129, 130, + 131, 132, 133, 116, 117, 0, 0, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 396, 0, 0, - 0, 0, 397, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 398, 0, 0, 0, 0, 399, 0, 0, 0, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 400, 0, 0, 0, 0, - 401, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 367, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 371, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 383, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 395, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 407, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 409, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 430, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 259, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 313, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 316, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 319, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 320, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 117, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 325, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 338, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 122, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 119, 120, 0, 0, 123, - 124, 125, 126, 127, 128, 119, 120, 0, 0, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 130, - 131, 132, 133, 134, 135, 136, 0, 0, 0, 130, - 0, 132, 133, 134, 135, 136, 119, 120, 0, 0, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136 + 130, 131, 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 20, 47, 8, 75, - 270, 270, 3, 4, 47, 270, 191, 53, 21, 147, - 3, 4, 5, 6, 7, 25, 43, 88, 89, 31, - 32, 43, 34, 43, 34, 35, 211, 39, 40, 41, - 42, 51, 0, 34, 35, 47, 49, 47, 88, 89, - 93, 94, 69, 55, 56, 88, 89, 31, 32, 187, - 34, 106, 44, 191, 38, 57, 58, 49, 53, 43, - 85, 86, 87, 47, 90, 75, 50, 51, 206, 207, - 44, 89, 44, 211, 75, 49, 88, 89, 47, 264, - 89, 83, 84, 85, 86, 87, 51, 97, 45, 44, - 31, 32, 53, 34, 49, 47, 89, 38, 44, 43, - 147, 51, 84, 49, 88, 89, 47, 47, 90, 50, - 43, 147, 94, 95, 96, 97, 44, 44, 44, 44, - 44, 49, 49, 49, 49, 49, 264, 47, 44, 139, - 51, 44, 270, 49, 49, 145, 49, 147, 408, 408, - 187, 48, 152, 408, 191, 155, 147, 88, 89, 44, - 43, 187, 44, 51, 49, 191, 43, 49, 43, 206, - 207, 43, 242, 53, 211, 43, 242, 43, 43, 52, - 206, 207, 196, 183, 53, 211, 53, 187, 43, 53, - 365, 191, 367, 43, 47, 53, 187, 53, 43, 53, - 191, 53, 53, 43, 48, 94, 206, 207, 18, 43, - 52, 211, 43, 26, 43, 206, 207, 287, 288, 52, - 211, 287, 288, 43, 48, 48, 48, 264, 43, 43, - 16, 406, 45, 270, 409, 48, 49, 365, 264, 367, - 43, 53, 242, 43, 270, 83, 84, 85, 86, 87, - 43, 242, 53, 21, 429, 430, 53, 53, 53, 53, - 44, 53, 53, 333, 264, 53, 44, 333, 44, 44, - 270, 271, 53, 264, 53, 8, 53, 371, 406, 270, - 408, 409, 8, 8, 408, 187, -1, 287, 288, 196, - -1, -1, -1, 106, -1, -1, 287, 288, -1, -1, - -1, 429, 430, -1, 147, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, -1, 138, -1, -1, 365, -1, - 367, -1, -1, 333, -1, -1, -1, 150, -1, 365, - 153, 367, 333, 156, 187, 158, -1, 160, 191, -1, - -1, -1, 397, -1, 399, -1, 401, -1, -1, -1, - -1, -1, -1, 206, 207, 365, -1, 367, 211, 406, - 370, 408, 409, -1, 365, 188, 367, -1, 31, 32, - 406, 34, 408, 409, -1, 38, -1, 200, 147, -1, - -1, -1, 429, 430, 47, -1, -1, 50, -1, -1, - -1, -1, 147, 429, 430, -1, 406, -1, 408, 409, - -1, -1, -1, -1, -1, 406, -1, 408, 409, -1, - 147, 264, -1, -1, -1, -1, -1, 270, 187, 429, - 430, -1, 191, -1, -1, 88, 89, -1, 429, 430, - -1, -1, 187, -1, -1, 258, 191, 206, 207, -1, - -1, -1, 211, -1, 267, -1, 269, -1, -1, 272, - 187, 206, 207, -1, 191, -1, 211, -1, -1, 31, - 32, 284, 34, -1, -1, -1, 147, -1, -1, 206, - 207, -1, -1, -1, 211, 47, -1, -1, 50, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - -1, -1, -1, -1, -1, 264, -1, 320, 147, -1, - -1, 270, -1, -1, -1, -1, 187, -1, -1, 264, - 191, -1, 365, -1, 367, 270, 88, 89, -1, 342, - 343, 344, 345, -1, -1, 206, 207, 264, 31, 32, - 211, 34, -1, 270, -1, 38, -1, -1, 187, -1, - -1, -1, 191, 366, 47, 368, 369, 50, -1, -1, - -1, -1, -1, 406, -1, 408, 409, 206, 207, 144, - -1, -1, 211, -1, -1, -1, 151, -1, -1, 154, - -1, -1, -1, -1, -1, -1, 429, 430, -1, -1, - -1, -1, -1, 264, -1, 88, 89, 410, -1, 270, - -1, 31, 32, -1, 34, -1, 365, -1, 367, 39, - 40, 41, 42, -1, -1, -1, -1, 47, -1, -1, - 365, -1, 367, -1, -1, 264, -1, -1, -1, -1, - -1, 270, -1, -1, -1, -1, -1, -1, 365, -1, - 367, -1, -1, -1, -1, -1, -1, 406, -1, 408, - 409, 9, 10, -1, 12, 13, -1, -1, 88, 89, - -1, 406, -1, 408, 409, -1, -1, -1, -1, -1, - 429, 430, -1, 31, 32, -1, 34, -1, -1, 406, - -1, 408, 409, -1, 429, 430, -1, 262, -1, 47, - -1, -1, 50, -1, 365, -1, 367, 55, 56, -1, - -1, -1, 429, 430, -1, -1, -1, 282, 283, -1, - -1, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, -1, -1, -1, -1, 365, -1, 367, -1, - 88, 89, -1, -1, -1, 406, -1, 408, 409, -1, - 315, 31, 32, 318, 34, -1, -1, -1, 38, -1, - -1, -1, -1, -1, -1, -1, -1, 47, 429, 430, - 50, -1, -1, -1, -1, 31, 32, 406, 34, 408, - 409, -1, 38, 31, 32, -1, 34, -1, -1, -1, - 38, 47, -1, -1, 50, 8, -1, -1, 363, 47, - 429, 430, 50, -1, -1, -1, -1, -1, 88, 89, - -1, -1, -1, 378, -1, 380, -1, 382, 31, 32, - 33, 34, 35, 36, 37, -1, 39, 40, 41, 42, - 43, -1, 88, 89, 47, 48, -1, -1, 51, -1, - 88, 89, 31, 32, -1, 34, -1, -1, -1, 38, - -1, -1, -1, -1, 67, 68, -1, -1, 47, -1, - -1, 50, 8, -1, -1, -1, -1, -1, -1, -1, - -1, 84, -1, -1, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, 88, - 89, 47, -1, -1, -1, 51, -1, 53, 31, 32, - -1, 34, -1, -1, -1, 38, 31, 32, -1, 34, - -1, 67, 68, 38, 47, -1, -1, 50, -1, 8, - -1, -1, 47, -1, -1, 50, -1, -1, 84, -1, - -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 31, 32, 33, 34, 35, 36, 37, -1, - 39, 40, 41, 42, 43, 88, 89, -1, 47, -1, - -1, -1, 51, 88, 89, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, - -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, - -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 31, - 32, 33, 34, 35, 36, 37, -1, 39, 40, 41, - 42, 43, 48, -1, -1, 47, -1, -1, 54, 51, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, 67, 68, -1, -1, -1, - -1, -1, -1, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 84, -1, -1, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 3, -1, -1, -1, - -1, -1, -1, -1, 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, 57, 58, 45, 46, - 47, -1, 63, 64, 65, 66, -1, -1, 55, 56, + 0, 46, 93, 3, 4, 267, 72, 188, 8, 20, + 267, 72, 3, 4, 47, 43, 267, 31, 32, 0, + 34, 141, 21, 47, 38, 25, 43, 208, 148, 31, + 32, 151, 34, 47, 34, 35, 50, 3, 4, 5, + 6, 7, 90, 34, 35, 47, 43, 47, 50, 53, + 49, 89, 69, 47, 51, 88, 89, 53, 103, 44, + 31, 32, 144, 34, 88, 89, 88, 89, 39, 40, + 41, 42, 72, 89, 88, 89, 47, 44, 93, 94, + 261, 72, 49, 51, 55, 56, 88, 89, 31, 32, + 53, 34, 44, 44, 94, 38, 44, 49, 49, 45, + 43, 49, 184, 47, 47, 84, 188, 50, 51, 31, + 32, 90, 34, 51, 43, 94, 38, 88, 89, 44, + 47, 203, 204, 89, 49, 47, 208, 44, 50, 44, + 44, 43, 49, 44, 49, 49, 136, 43, 49, 259, + 47, 51, 142, 405, 144, 88, 89, 49, 405, 149, + 44, 44, 152, 144, 405, 49, 49, 44, 44, 279, + 280, 51, 49, 49, 48, 43, 88, 89, 43, 85, + 86, 87, 53, 239, 43, 43, 43, 43, 239, 261, + 180, 362, 193, 364, 184, 267, 43, 52, 188, 53, + 53, 53, 312, 184, 43, 315, 47, 188, 83, 84, + 85, 86, 87, 203, 204, 53, 53, 53, 208, 53, + 53, 26, 203, 204, 144, 43, 43, 208, 284, 285, + 18, 94, 403, 284, 285, 406, 48, 52, 52, 43, + 45, 43, 43, 48, 49, 48, 43, 53, 48, 239, + 360, 43, 48, 43, 43, 426, 427, 43, 239, 43, + 53, 16, 53, 21, 184, 375, 53, 377, 188, 379, + 53, 261, 53, 53, 330, 53, 53, 267, 268, 330, + 261, 44, 44, 203, 204, 44, 267, 368, 208, 53, + 362, 44, 364, 53, 284, 285, 53, 8, 103, 8, + 8, 405, 184, 284, 285, 193, -1, -1, -1, -1, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, + 135, 403, -1, 405, 406, 144, -1, -1, 57, 58, + 330, 261, 147, -1, -1, 150, 144, 267, 153, 330, + 155, -1, 157, -1, 426, 427, -1, -1, -1, 394, + -1, 396, -1, 398, 83, 84, 85, 86, 87, -1, + -1, -1, 362, -1, 364, 184, -1, 367, -1, 188, + 185, 362, -1, 364, -1, -1, 184, -1, -1, -1, + 188, -1, 197, -1, 203, 204, -1, -1, -1, 208, + -1, -1, -1, -1, -1, 203, 204, 144, -1, -1, + 208, -1, -1, 403, -1, 405, 406, -1, -1, -1, + -1, -1, 403, -1, 405, 406, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 426, 427, -1, -1, + -1, -1, 362, -1, 364, 426, 427, 184, -1, -1, + 255, 188, 261, -1, -1, -1, -1, -1, 267, 264, + -1, 266, -1, 261, 269, -1, 203, 204, -1, 267, + -1, 208, -1, -1, -1, -1, 281, -1, -1, -1, + -1, 144, -1, 403, -1, 405, 406, -1, -1, -1, + -1, -1, -1, -1, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, -1, 426, 427, -1, -1, + -1, -1, 317, -1, -1, -1, -1, -1, -1, 144, + -1, 184, -1, -1, 261, 188, -1, 144, -1, -1, + 267, -1, -1, -1, 339, 340, 341, 342, -1, -1, + 203, 204, -1, -1, -1, 208, -1, -1, -1, -1, + -1, -1, -1, 362, -1, 364, -1, -1, 363, 184, + 365, 366, -1, 188, 362, -1, 364, 184, -1, -1, + -1, 188, -1, 31, 32, 144, 34, -1, 203, 204, + 38, -1, -1, 208, -1, -1, 203, 204, -1, 47, + -1, 208, 50, -1, 403, -1, 405, 406, 261, -1, + -1, -1, 407, -1, 267, 403, -1, 405, 406, -1, + -1, -1, -1, -1, -1, 184, -1, 426, 427, 188, + -1, -1, -1, -1, -1, 362, -1, 364, 426, 427, + 88, 89, -1, -1, 203, 204, 261, -1, -1, 208, + -1, -1, 267, -1, 261, -1, 31, 32, 8, 34, + 267, -1, -1, -1, 39, 40, 41, 42, -1, -1, + -1, -1, 47, -1, -1, -1, 403, -1, 405, 406, + -1, 31, 32, 33, 34, 35, 36, 37, -1, 39, + 40, 41, 42, 43, -1, -1, -1, 47, 48, 426, + 427, 51, 261, 31, 32, -1, 34, -1, 267, 362, + 38, 364, -1, 88, 89, -1, -1, 67, 68, 47, + -1, -1, 50, -1, -1, -1, -1, -1, -1, 31, + 32, -1, 34, -1, 84, -1, 38, 87, 88, 89, + 90, 91, 92, 93, 94, 47, -1, 362, 50, 364, + 403, -1, 405, 406, -1, 362, -1, 364, -1, -1, + 88, 89, -1, -1, 31, 32, -1, 34, -1, -1, + -1, 38, -1, 426, 427, -1, -1, -1, 31, 32, + 47, 34, -1, 50, -1, 38, 88, 89, 403, -1, + 405, 406, -1, -1, 47, -1, 403, 50, 405, 406, + -1, -1, -1, 362, -1, 364, -1, 31, 32, -1, + 34, 426, 427, -1, 38, -1, -1, -1, -1, 426, + 427, 88, 89, 47, 57, 58, 50, -1, 61, 62, + 63, 64, 65, 66, -1, 88, 89, -1, -1, -1, + -1, -1, -1, -1, 403, -1, 405, 406, 81, 82, + 83, 84, 85, 86, 87, -1, -1, -1, 3, -1, + -1, -1, -1, -1, 88, 89, 11, 426, 427, 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, -1, -1, -1, -1, -1, -1, + 55, 56, -1, -1, -1, -1, -1, 31, 32, -1, + 34, -1, -1, -1, 38, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 3, 4, 50, -1, -1, -1, + -1, -1, 11, 88, 89, 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, 88, 89, 45, -1, 47, -1, + -1, -1, -1, -1, -1, 3, 55, 56, -1, -1, + -1, -1, -1, 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, 88, + 89, 39, 40, 41, 42, 57, 58, 45, 46, 47, + -1, 63, 64, 65, 66, -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 83, 84, 85, 86, 87, -1, -1, -1, - -1, -1, 3, 4, -1, -1, -1, -1, -1, -1, - 11, 88, 89, 14, 15, -1, 17, 18, 19, 20, + -1, 83, 84, 85, 86, 87, -1, -1, -1, -1, + -1, 3, 4, -1, -1, -1, -1, -1, -1, 11, + 88, 89, 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, -1, 47, -1, -1, -1, -1, + -1, -1, 3, 55, 56, -1, -1, -1, -1, -1, + 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, + 31, 32, -1, 34, 8, -1, 88, 89, 39, 40, 41, 42, -1, -1, 45, -1, 47, -1, -1, -1, - -1, -1, -1, 3, 55, 56, -1, -1, -1, -1, - -1, 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, 88, 89, 39, - 40, 41, 42, -1, -1, 45, 46, 47, -1, -1, - -1, -1, -1, -1, -1, 55, 56, -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, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, 88, 89, -1, + -1, -1, -1, 67, 68, -1, -1, -1, 8, -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, 88, 89, - 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, -1, 47, -1, -1, -1, -1, -1, -1, - 3, 55, 56, -1, -1, -1, -1, -1, 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, 88, 89, 39, 40, 41, 42, - -1, -1, 45, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, 56, 31, 32, -1, 34, -1, -1, + 84, -1, -1, 87, 88, 89, 90, 91, 92, 93, + 94, 31, 32, 33, 34, 35, 36, 37, -1, 39, + 40, 41, 42, 43, 48, -1, -1, 47, -1, -1, + 54, 51, -1, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, -1, -1, -1, -1, 67, 68, -1, + -1, -1, 8, -1, -1, -1, 80, 81, 82, 83, + 84, 85, 86, 87, 84, -1, -1, 87, 88, 89, + 90, 91, 92, 93, 94, 31, 32, 33, 34, 35, + 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, + -1, 47, -1, -1, -1, 51, -1, -1, -1, -1, + -1, 9, 10, -1, 12, 13, -1, -1, -1, -1, + -1, 67, 68, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 31, 32, -1, 34, -1, 84, -1, + -1, 87, 88, 89, 90, 91, 92, 93, 94, 47, + -1, -1, 50, -1, -1, -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 47, -1, -1, 50, -1, -1, -1, -1, 55, 56, - -1, -1, -1, -1, -1, 88, 89, -1, -1, -1, - -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 44, -1, -1, -1, -1, 49, -1, - -1, 88, 89, 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, + -1, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 31, 32, -1, 34, -1, -1, 57, 58, + 88, 89, 61, 62, 63, 64, 65, 66, 47, -1, + -1, 50, -1, -1, -1, -1, 55, 56, -1, -1, + -1, 80, 81, 82, 83, 84, 85, 86, 87, -1, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 44, -1, -1, -1, -1, 49, -1, -1, 88, + 89, 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, 44, - -1, 80, 81, 82, 83, 84, 85, 86, 87, 54, + -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, + -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, @@ -4309,130 +4263,133 @@ namespace xsk { namespace gsc { namespace iw5 { 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, 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, -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, 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, -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, 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, -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, 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, -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, 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, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 52, -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, 53, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + -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, - -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, + 80, 81, 82, 83, 84, 85, 86, 87, 52, -1, 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, 80, 81, 82, - 83, 84, 85, 86, 87, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 66, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, 81, - -1, 83, 84, 85, 86, 87, 57, 58, -1, -1, - 61, 62, 63, 64, 65, 66, -1, -1, -1, -1, + 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, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 83, 84, 85, 86, 87 + -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, 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, -1, 83, 84, + 85, 86, 87, 57, 58, -1, -1, 61, 62, 63, + 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, + 84, 85, 86, 87 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 89, 108, 109, 110, - 111, 112, 113, 114, 115, 177, 88, 177, 178, 178, - 43, 0, 110, 111, 112, 43, 69, 53, 53, 90, - 180, 159, 177, 8, 31, 32, 33, 34, 35, 36, + 0, 3, 4, 5, 6, 7, 89, 105, 106, 107, + 108, 109, 110, 111, 112, 174, 88, 174, 175, 175, + 43, 0, 107, 108, 109, 43, 69, 53, 53, 90, + 177, 156, 174, 8, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 47, 51, 67, 68, - 84, 87, 91, 92, 93, 94, 95, 96, 97, 144, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 84, 87, 91, 92, 93, 94, 141, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 159, 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, 185, 186, 44, 44, 49, 47, 177, - 178, 47, 177, 178, 47, 144, 47, 48, 144, 160, - 161, 177, 144, 144, 93, 94, 89, 53, 54, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 80, - 81, 82, 83, 84, 85, 86, 87, 38, 47, 50, - 156, 157, 177, 178, 43, 51, 53, 45, 118, 177, - 47, 43, 51, 47, 43, 51, 47, 44, 49, 144, - 49, 48, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 177, 51, 160, 161, 177, 3, 11, 14, - 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 46, 47, 55, 56, 116, 117, - 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, + 182, 183, 44, 44, 49, 47, 174, 175, 47, 174, + 175, 47, 141, 47, 48, 141, 157, 158, 174, 141, + 141, 93, 94, 89, 53, 54, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, + 84, 85, 86, 87, 38, 47, 50, 153, 154, 174, + 175, 43, 51, 53, 45, 115, 174, 47, 43, 51, + 47, 43, 51, 47, 44, 49, 141, 49, 48, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 174, + 51, 157, 158, 174, 3, 11, 14, 15, 17, 18, + 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 46, 47, 55, 56, 113, 114, 115, 116, 118, + 119, 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, 48, 144, 52, 48, - 177, 44, 43, 4, 119, 144, 53, 43, 116, 43, - 43, 43, 43, 84, 180, 184, 52, 53, 53, 53, - 144, 53, 43, 43, 47, 154, 155, 167, 167, 46, - 116, 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, 144, 160, 4, 53, 144, 18, 144, 120, - 146, 147, 148, 167, 177, 144, 52, 52, 53, 160, - 160, 144, 43, 43, 43, 43, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 48, 160, 48, - 160, 48, 144, 43, 44, 44, 43, 44, 53, 21, - 49, 44, 44, 44, 144, 144, 144, 144, 43, 44, - 43, 44, 43, 44, 160, 116, 144, 116, 144, 145, - 144, 177, 118, 53, 53, 44, 44, 49, 44, 49, - 44, 49, 160, 160, 160, 44, 16, 44, 53, 44, - 21, 53, 53, 161, 53, 161, 53, 161, 44, 44, - 44, 116, 53, 120, 116, 144, 44, 44, 44, 44, - 44, 53, 53, 53, 116, 116 + 139, 140, 143, 144, 145, 151, 152, 160, 161, 164, + 168, 169, 170, 171, 174, 141, 157, 174, 141, 157, + 174, 141, 141, 48, 141, 52, 48, 174, 44, 43, + 4, 116, 141, 53, 43, 113, 43, 43, 43, 43, + 84, 177, 181, 52, 53, 53, 53, 141, 53, 43, + 43, 47, 151, 152, 164, 164, 46, 113, 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, 141, + 157, 4, 53, 141, 18, 141, 117, 143, 144, 145, + 164, 174, 141, 52, 52, 53, 157, 157, 141, 43, + 43, 43, 43, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 48, 157, 48, 157, 48, 141, + 43, 44, 44, 43, 44, 53, 21, 49, 44, 44, + 44, 141, 141, 141, 141, 43, 44, 43, 44, 43, + 44, 157, 113, 141, 113, 141, 142, 141, 174, 115, + 53, 53, 44, 44, 49, 44, 49, 44, 49, 157, + 157, 157, 44, 16, 44, 53, 44, 21, 53, 53, + 158, 53, 158, 53, 158, 44, 44, 44, 113, 53, + 117, 113, 141, 44, 44, 44, 44, 44, 53, 53, + 53, 113, 113 }; const unsigned char parser::yyr1_[] = { - 0, 107, 108, 108, 109, 109, 109, 109, 109, 109, - 110, 111, 112, 112, 112, 112, 112, 113, 114, 115, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 117, 117, 118, 118, 119, - 119, 120, 120, 120, 120, 121, 121, 122, 122, 122, - 123, 124, 124, 125, 126, 126, 127, 127, 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, 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, 184, 184, 184, 185, 186 + 0, 104, 105, 105, 106, 106, 106, 106, 106, 106, + 107, 108, 109, 109, 109, 109, 109, 110, 111, 112, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 114, 114, 115, 115, 116, + 116, 117, 117, 117, 117, 118, 118, 119, 119, 119, + 120, 121, 121, 122, 123, 123, 124, 124, 125, 126, + 127, 128, 129, 130, 131, 131, 132, 133, 133, 134, + 135, 136, 137, 137, 138, 139, 140, 141, 141, 141, + 142, 142, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 144, 144, 145, 145, 146, 147, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 149, 150, 151, 151, 152, 152, + 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, + 155, 156, 156, 156, 157, 157, 158, 158, 159, 159, + 160, 161, 162, 163, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 175, 176, 177, 178, 179, 180, + 180, 181, 181, 182, 183 }; const signed char @@ -4459,7 +4416,7 @@ namespace xsk { namespace gsc { namespace iw5 { 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 7, 2, - 1, 2, 1, 1, 1, 1, 1, 1 + 1, 2, 1, 1, 1 }; @@ -4469,28 +4426,28 @@ namespace xsk { namespace gsc { namespace iw5 { const short parser::yyrline_[] = { - 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, 708, 713, 718, 719, 720, 721, 722, 723, - 724, 725, 726, 730, 735, 740, 745, 750, 755, 760, - 765, 770, 775, 780, 782, 787, 792, 797, 802, 807, - 809, 814, 816, 818, 820, 822, 827, 832 + 0, 249, 249, 250, 254, 256, 258, 260, 262, 264, + 269, 273, 278, 279, 280, 281, 282, 286, 291, 296, + 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, + 414, 419, 424, 429, 434, 436, 441, 446, 448, 453, + 458, 463, 468, 470, 475, 480, 485, 490, 491, 492, + 496, 497, 501, 503, 505, 507, 509, 511, 513, 515, + 517, 519, 521, 526, 528, 533, 535, 540, 545, 547, + 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, + 569, 571, 573, 575, 577, 579, 584, 585, 586, 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, 615, 620, 625, 626, 629, 630, + 634, 636, 638, 640, 642, 644, 649, 651, 653, 655, + 660, 665, 667, 670, 674, 677, 681, 683, 688, 690, + 695, 700, 705, 710, 715, 716, 717, 718, 719, 720, + 721, 722, 723, 727, 732, 737, 742, 747, 752, 757, + 762, 767, 772, 777, 779, 784, 789, 794, 799, 804, + 806, 811, 813, 818, 823 }; void @@ -4523,9 +4480,9 @@ namespace xsk { namespace gsc { namespace iw5 { #line 13 "parser.ypp" } } } // xsk::gsc::iw5 -#line 4527 "parser.cpp" +#line 4484 "parser.cpp" -#line 836 "parser.ypp" +#line 827 "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 499c30c..11f0806 100644 --- a/src/iw5/xsk/parser.hpp +++ b/src/iw5/xsk/parser.hpp @@ -621,10 +621,7 @@ namespace xsk { namespace gsc { namespace iw5 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy66[sizeof (std::string)]; }; @@ -768,19 +765,16 @@ namespace xsk { namespace gsc { namespace iw5 { ISTRING = 91, // "localized string" COLOR = 92, // "color" FLOAT = 93, // "float" - INT_DEC = 94, // "int" - INT_OCT = 95, // "octal int" - INT_BIN = 96, // "binary int" - INT_HEX = 97, // "hexadecimal int" - ADD_ARRAY = 98, // ADD_ARRAY - THEN = 99, // THEN - TERN = 100, // TERN - NEG = 101, // NEG - ANIMREF = 102, // ANIMREF - PREINC = 103, // PREINC - PREDEC = 104, // PREDEC - POSTINC = 105, // POSTINC - POSTDEC = 106 // POSTDEC + INTEGER = 94, // "integer" + ADD_ARRAY = 95, // ADD_ARRAY + THEN = 96, // THEN + TERN = 97, // TERN + NEG = 98, // NEG + ANIMREF = 99, // ANIMREF + PREINC = 100, // PREINC + PREDEC = 101, // PREDEC + POSTINC = 102, // POSTINC + POSTDEC = 103 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -797,7 +791,7 @@ namespace xsk { namespace gsc { namespace iw5 { { enum symbol_kind_type { - YYNTOKENS = 107, ///< Number of tokens. + YYNTOKENS = 104, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -893,99 +887,96 @@ namespace xsk { namespace gsc { namespace iw5 { S_ISTRING = 91, // "localized string" S_COLOR = 92, // "color" S_FLOAT = 93, // "float" - S_INT_DEC = 94, // "int" - S_INT_OCT = 95, // "octal int" - S_INT_BIN = 96, // "binary int" - S_INT_HEX = 97, // "hexadecimal int" - S_ADD_ARRAY = 98, // ADD_ARRAY - S_THEN = 99, // THEN - S_TERN = 100, // TERN - S_NEG = 101, // NEG - S_ANIMREF = 102, // ANIMREF - S_PREINC = 103, // PREINC - S_PREDEC = 104, // PREDEC - S_POSTINC = 105, // POSTINC - S_POSTDEC = 106, // POSTDEC - S_YYACCEPT = 107, // $accept - S_root = 108, // root - S_program = 109, // program - S_inline = 110, // inline - S_include = 111, // include - S_declaration = 112, // declaration - S_decl_usingtree = 113, // decl_usingtree - S_decl_constant = 114, // decl_constant - S_decl_thread = 115, // decl_thread - S_stmt = 116, // stmt - S_stmt_dev = 117, // stmt_dev - S_stmt_block = 118, // stmt_block - S_stmt_list = 119, // stmt_list - S_stmt_expr = 120, // stmt_expr - S_stmt_call = 121, // stmt_call - S_stmt_assign = 122, // stmt_assign - S_stmt_endon = 123, // stmt_endon - S_stmt_notify = 124, // stmt_notify - S_stmt_wait = 125, // stmt_wait - S_stmt_waittill = 126, // stmt_waittill - S_stmt_waittillmatch = 127, // stmt_waittillmatch - S_stmt_waittillframeend = 128, // stmt_waittillframeend - 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_INTEGER = 94, // "integer" + S_ADD_ARRAY = 95, // ADD_ARRAY + S_THEN = 96, // THEN + S_TERN = 97, // TERN + S_NEG = 98, // NEG + S_ANIMREF = 99, // ANIMREF + S_PREINC = 100, // PREINC + S_PREDEC = 101, // PREDEC + S_POSTINC = 102, // POSTINC + S_POSTDEC = 103, // POSTDEC + S_YYACCEPT = 104, // $accept + S_root = 105, // root + S_program = 106, // program + S_inline = 107, // inline + S_include = 108, // include + S_declaration = 109, // declaration + S_decl_usingtree = 110, // decl_usingtree + S_decl_constant = 111, // decl_constant + S_decl_thread = 112, // decl_thread + S_stmt = 113, // stmt + S_stmt_dev = 114, // stmt_dev + S_stmt_block = 115, // stmt_block + S_stmt_list = 116, // stmt_list + S_stmt_expr = 117, // stmt_expr + S_stmt_call = 118, // stmt_call + S_stmt_assign = 119, // stmt_assign + S_stmt_endon = 120, // stmt_endon + S_stmt_notify = 121, // stmt_notify + S_stmt_wait = 122, // stmt_wait + S_stmt_waittill = 123, // stmt_waittill + S_stmt_waittillmatch = 124, // stmt_waittillmatch + S_stmt_waittillframeend = 125, // stmt_waittillframeend + S_stmt_if = 126, // stmt_if + S_stmt_ifelse = 127, // stmt_ifelse + S_stmt_while = 128, // stmt_while + S_stmt_dowhile = 129, // stmt_dowhile + S_stmt_for = 130, // stmt_for + S_stmt_foreach = 131, // stmt_foreach + S_stmt_switch = 132, // stmt_switch + S_stmt_case = 133, // stmt_case + S_stmt_default = 134, // stmt_default + S_stmt_break = 135, // stmt_break + S_stmt_continue = 136, // stmt_continue + S_stmt_return = 137, // stmt_return + S_stmt_breakpoint = 138, // stmt_breakpoint + S_stmt_prof_begin = 139, // stmt_prof_begin + S_stmt_prof_end = 140, // stmt_prof_end + S_expr = 141, // expr + S_expr_or_empty = 142, // expr_or_empty + S_expr_assign = 143, // expr_assign + S_expr_increment = 144, // expr_increment + S_expr_decrement = 145, // expr_decrement + S_expr_ternary = 146, // expr_ternary + S_expr_binary = 147, // expr_binary + S_expr_primitive = 148, // expr_primitive + S_expr_complement = 149, // expr_complement + S_expr_not = 150, // expr_not + S_expr_call = 151, // expr_call + S_expr_method = 152, // expr_method + S_expr_function = 153, // expr_function + S_expr_pointer = 154, // expr_pointer + S_expr_add_array = 155, // expr_add_array + S_expr_parameters = 156, // expr_parameters + S_expr_arguments = 157, // expr_arguments + S_expr_arguments_no_empty = 158, // expr_arguments_no_empty + S_expr_reference = 159, // expr_reference + S_expr_array = 160, // expr_array + S_expr_field = 161, // expr_field + S_expr_size = 162, // expr_size + S_expr_paren = 163, // expr_paren + S_expr_object = 164, // expr_object + S_expr_thisthread = 165, // expr_thisthread + S_expr_empty_array = 166, // expr_empty_array + S_expr_undefined = 167, // expr_undefined + S_expr_game = 168, // expr_game + S_expr_self = 169, // expr_self + S_expr_anim = 170, // expr_anim + S_expr_level = 171, // expr_level + S_expr_animation = 172, // expr_animation + S_expr_animtree = 173, // expr_animtree + S_expr_identifier = 174, // expr_identifier + S_expr_path = 175, // expr_path + S_expr_istring = 176, // expr_istring + S_expr_string = 177, // expr_string + S_expr_color = 178, // expr_color + S_expr_vector = 179, // expr_vector + S_expr_float = 180, // expr_float + S_expr_integer = 181, // expr_integer + S_expr_false = 182, // expr_false + S_expr_true = 183 // expr_true }; }; @@ -1300,10 +1291,7 @@ namespace xsk { namespace gsc { namespace iw5 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2554,10 +2542,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2667,7 +2652,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - IW5_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + IW5_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4130,61 +4115,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4666,7 +4606,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2346, ///< Last index in yytable_. + yylast_ = 2293, ///< Last index in yytable_. yynnts_ = 80, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -4973,10 +4913,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5287,10 +5224,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5357,7 +5291,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw5 -#line 5361 "parser.hpp" +#line 5295 "parser.hpp" diff --git a/src/iw5/xsk/resolver.cpp b/src/iw5/xsk/resolver.cpp index a7cb35c..a1eb021 100644 --- a/src/iw5/xsk/resolver.cpp +++ b/src/iw5/xsk/resolver.cpp @@ -9,17 +9,19 @@ namespace xsk::gsc::iw5 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; std::unordered_map token_map_rev; +std::set string_map; + auto resolver::opcode_id(const std::string& name) -> std::uint8_t { const auto itr = opcode_map_rev.find(name); @@ -38,7 +40,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +48,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +69,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +98,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +127,19 @@ auto resolver::file_name(std::uint16_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +156,16 @@ auto resolver::token_name(std::uint16_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +178,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -170,12 +196,26 @@ void resolver::add_function(const std::string& name, std::uint16_t id) if (itr != function_map_rev.end()) { - throw error("builtin function '" + name + "' already defined."); + throw error(utils::string::va("builtin function '%s' already defined.", name.data())); } - function_map.insert({ id, name }); - function_map_rev.insert({ name, id }); + const auto str = string_map.find(name); + if (str != string_map.end()) + { + function_map.insert({ id, *str }); + function_map_rev.insert({ *str, id }); + } + else + { + auto ins = string_map.insert(name); + + if(ins.second) + { + function_map.insert({ id, *ins.first }); + function_map_rev.insert({ *ins.first, id }); + } + } } void resolver::add_method(const std::string& name, std::uint16_t id) @@ -184,171 +224,204 @@ void resolver::add_method(const std::string& name, std::uint16_t id) if (itr != method_map_rev.end()) { - throw error("builtin method '" + name + "' already defined."); + throw error(utils::string::va("builtin method '%s' already defined.", name.data())); } - method_map.insert({ id, name }); - method_map_rev.insert({ name, id }); + const auto str = string_map.find(name); + + if (str != string_map.end()) + { + method_map.insert({ id, *str }); + method_map_rev.insert({ *str, id }); + } + else + { + auto ins = string_map.insert(name); + + if(ins.second) + { + method_map.insert({ id, *ins.first }); + method_map_rev.insert({ *ins.first, id }); + } + } } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 153> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, + { 0x00, "END" }, + { 0x01, "RETN" }, + { 0x02, "GET_BYTE" }, + { 0x03, "GET_NBYTE" }, + { 0x04, "GET_USHORT" }, + { 0x05, "GET_NUSHORT" }, + { 0x06, "GET_INT" }, + { 0x07, "GET_BUILTIN_FUNC" }, + { 0x08, "GET_BUILTIN_METHOD" }, + { 0x09, "GET_FLOAT" }, + { 0x0A, "GET_STRING" }, + { 0x0B, "GET_UNDEFINED" }, + { 0x0C, "GET_ZERO" }, + { 0x0D, "WAITTILLFRAMEEND" }, + { 0x0E, "CREATE_LOCAL_VARIABLE" }, + { 0x0F, "REMOVE_LOCAL_VARIABLES" }, + { 0x10, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x11, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x12, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x13, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x14, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x15, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x16, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x17, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0x18, "EVAL_ARRAY" }, + { 0x1A, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x19, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x1B, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x1C, "EVAL_ARRAY_REF" }, + { 0x1D, "CLEAR_ARRAY" }, + { 0x1E, "EMPTY_ARRAY" }, + { 0x1F, "ADD_ARRAY" }, + { 0x20, "PRE_CALL" }, + { 0x21, "CALL_LOCAL_FUNC2" }, + { 0x22, "CALL_LOCAL_FUNC" }, + { 0x23, "CALL_LOCAL_METHOD" }, + { 0x24, "CALL_LOCAL_FUNC_THREAD" }, + { 0x25, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x26, "CALL_LOCAL_METHOD_THREAD" }, + { 0x27, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x28, "CALL_FAR_FUNC2" }, + { 0x29, "CALL_FAR_FUNC" }, + { 0x2A, "CALL_FAR_METHOD" }, + { 0x2B, "CALL_FAR_FUNC_THREAD" }, + { 0x2C, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x2D, "CALL_FAR_METHOD_THEAD" }, + { 0x2E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x2F, "CALL_FUNC_POINTER" }, + { 0x30, "CALL_METHOD_POINTER" }, + { 0x31, "CALL_FUNC_THREAD_POINTER" }, + { 0x32, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0x33, "CALL_METHOD_THREAD_POINTER" }, + { 0x34, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x35, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x36, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x37, "GET_ISTRING" }, + { 0x38, "GET_VECTOR" }, + { 0x39, "GET_LEVEL_OBJ" }, + { 0x3A, "GET_ANIM_OBJ" }, + { 0x3B, "GET_SELF" }, + { 0x3C, "GET_THISTHREAD" }, + { 0x3D, "GET_LEVEL" }, + { 0x3E, "GET_GAME" }, + { 0x3F, "GET_ANIM" }, + { 0x40, "GET_ANIMATION" }, + { 0x41, "GET_GAME_REF" }, + { 0x42, "INC" }, + { 0x43, "DEC" }, + { 0x44, "BIT_OR" }, + { 0x45, "JMP_EXPR_FALSE" }, + { 0x46, "BIT_EXOR" }, + { 0x47, "BIT_AND" }, + { 0x48, "EQUALITY" }, + { 0x49, "INEQUALITY" }, + { 0x4A, "LESS" }, + { 0x4B, "GREATER" }, + { 0x4C, "JMP_EXPR_TRUE" }, + { 0x4D, "LESSEQUAL" }, + { 0x4E, "JMP_BACK" }, + { 0x4F, "WAITTILLMATCH2" }, + { 0x50, "WAITTILL" }, + { 0x51, "NOTIFY" }, + { 0x52, "ENDON" }, + { 0x53, "VOIDCODEPOS" }, + { 0x54, "SWITCH" }, + { 0x55, "ENDSWITCH" }, + { 0x56, "VECTOR" }, + { 0x57, "JMP_FALSE" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "SHIFT_LEFT" }, + { 0x5A, "SHIFT_RIGHT" }, + { 0x5B, "PLUS" }, + { 0x5C, "JMP" }, + { 0x5D, "MINUS" }, + { 0x5E, "MULT" }, + { 0x5F, "DIV" }, + { 0x60, "MOD" }, + { 0x61, "JMP_TRUE" }, + { 0x62, "SIZE" }, + { 0x63, "WAITTILLMATCH" }, + { 0x64, "GET_LOCAL_FUNC" }, + { 0x65, "GET_FAR_FUNC" }, + { 0x66, "GET_SELF_OBJ" }, + { 0x67, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x68, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x69, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x6A, "EVAL_FIELD_VARIABLE" }, + { 0x6B, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x6C, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x6D, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x6E, "EVAL_FIELD_VARIABLE_REF" }, + { 0x6F, "CLEAR_FIELD_VARIABLE" }, + { 0x70, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x71, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x72, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x73, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x74, "GET_ANIMTREE" }, + { 0x75, "CLEAR_PARAMS" }, + { 0x76, "CHECK_CLEAR_PARAMS" }, + { 0x77, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x78, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x79, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x7A, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x7B, "SET_VARIABLE_FIELD" }, + { 0x7C, "CLEAR_VARIABLE_FIELD" }, + { 0x7D, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x7E, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7F, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x80, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x81, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x82, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x83, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x84, "CALL_BUILTIN_FUNC_0" }, + { 0x85, "CALL_BUILTIN_FUNC_1" }, + { 0x86, "CALL_BUILTIN_FUNC_2" }, + { 0x87, "CALL_BUILTIN_FUNC_3" }, + { 0x88, "CALL_BUILTIN_FUNC_4" }, + { 0x89, "CALL_BUILTIN_FUNC_5" }, + { 0x8A, "CALL_BUILTIN_FUNC" }, + { 0x8B, "CALL_BUILTIN_METHOD_0" }, + { 0x8C, "CALL_BUILTIN_METHOD_1" }, + { 0x8D, "CALL_BUILTIN_METHOD_2" }, + { 0x8E, "CALL_BUILTIN_METHOD_3" }, + { 0x8F, "CALL_BUILTIN_METHOD_4" }, + { 0x90, "CALL_BUILTIN_METHOD_5" }, + { 0x91, "CALL_BUILTIN_METHOD" }, + { 0x92, "WAIT" }, + { 0x93, "DEC_TOP" }, + { 0x94, "CAST_FIELD_OBJ" }, + { 0x95, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x96, "CAST_BOOL" }, + { 0x97, "BOOL_NOT" }, + { 0x98, "BOOL_COMPLEMENT" }, }}; -const std::array function_list +const std::array, 455> function_list {{ { 0x001, "precacheturret" }, { 0x002, "getweaponarray" }, @@ -807,7 +880,7 @@ const std::array function_list { 0x1C7, "precachesound" }, }}; -const std::array method_list +const std::array, 780> method_list {{ { 0x8000, "thermaldrawdisable" }, { 0x8001, "setturretdismountorg" }, @@ -1553,7 +1626,7 @@ const std::array method_list { 0x82E5, "closepopupmenu" }, { 0x82E6, "openmenu" }, { 0x82E7, "closemenu" }, -// { 0x82E8, "__builtin_func_82E8" }, +// { 0x82E8, "_meth_82E8" }, { 0x82E9, "freezecontrols" }, { 0x82EA, "disableusability" }, { 0x82EB, "enableusability" }, @@ -1592,7 +1665,7 @@ const std::array method_list { 0x830C, "setgametypestring" }, }}; -const std::array file_list +const std::array, 592> file_list {{ { 29, "maps/mp/gametypes/_tweakables" }, { 30, "common_scripts/utility" }, @@ -1765,13 +1838,13 @@ const std::array file_list { 654, "character/mp_character_opforce_woods_sniper" }, { 655, "xmodelalias/alias_africa_militia_heads_mp" }, { 656, "character/mp_character_africa_militia_assault_a" }, -// { +// { { 660, "character/mp_character_africa_militia_lmg_b" }, -// { +// { { 662, "character/mp_character_africa_militia_shotgun_b" }, -// { +// { { 664, "character/mp_character_africa_militia_smg_b" }, -// { +// { { 666, "character/mp_character_africa_militia_sniper" }, { 667, "xmodelalias/alias_henchmen_heads_mp" }, { 668, "character/mp_character_opforce_hench_assault_a" }, @@ -2250,7 +2323,7 @@ const std::array file_list { 33386, "maps/so_survival_mp_park_precache" }, }}; -const std::array token_list +const std::array, 5534> token_list {{ { 1, "pl#" }, { 17, "teamHasRemoteUAV" }, // was introduced in an IW patch, made up name @@ -2292,7 +2365,7 @@ const std::array token_list { 440, "isKillstreakChallenge" }, { 441, "getKillstreakFromChallenge" }, { 442, "cac_getCustomClassLoc" }, - { 443, "reInitializeMatchRulesOnMigration" }, + { 443, "reInitializeMatchRulesOnMigration" }, { 444, "initializeMatchRules" }, { 445, "matchRules_oneShotKill" }, { 447, "matchRules_randomize" }, @@ -3136,7 +3209,7 @@ const std::array token_list // { 2833, "" }, // { 2834, "" }, // { 2835, "" }, - { 2836, "contrastGain" }, // MAYBE + { 2836, "contrastGain" }, // MAYBE // ... { 2944, "isTeamSpeaking" }, // animscripts/battlechater_ai @@ -7844,35 +7917,35 @@ struct __init__ file_map_rev.reserve(file_list.size()); token_map.reserve(token_list.size()); token_map_rev.reserve(token_list.size()); - + for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ utils::string::to_lower(entry.second), entry.first }); } } }; @@ -8262,4 +8335,4 @@ __init__ _; // "vehicle_scripts\\_russian_torpedo" // "maps\\_credits" // "maps\\createart\\paris_a_art" -// +// diff --git a/src/iw5/xsk/resolver.hpp b/src/iw5/xsk/resolver.hpp index 669e10e..2a95e72 100644 --- a/src/iw5/xsk/resolver.hpp +++ b/src/iw5/xsk/resolver.hpp @@ -31,6 +31,8 @@ public: static void add_function(const std::string& name, std::uint16_t id); static void add_method(const std::string& name, std::uint16_t id); + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::iw5 diff --git a/src/iw6/stdafx.hpp b/src/iw6/stdafx.hpp index 0a73772..5c43f9d 100644 --- a/src/iw6/stdafx.hpp +++ b/src/iw6/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/iw6/xsk/assembler.cpp b/src/iw6/xsk/assembler.cpp index 7a51d2a..f23ee46 100644 --- a/src/iw6/xsk/assembler.cpp +++ b/src/iw6/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -378,24 +392,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -404,9 +406,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -422,33 +423,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint16_t file_id = 0; - std::uint16_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -457,22 +450,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -486,25 +470,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -513,25 +498,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = (std::uint16_t)std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFF; - if (field_id == 0) - { - field_id = 0xFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 38305) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -542,7 +515,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -571,24 +544,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/iw6/xsk/assembler.hpp b/src/iw6/xsk/assembler.hpp index 228c7d2..d08fd93 100644 --- a/src/iw6/xsk/assembler.hpp +++ b/src/iw6/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::iw6 diff --git a/src/iw6/xsk/compiler.cpp b/src/iw6/xsk/compiler.cpp index 0ebb65d..a0cd173 100644 --- a/src/iw6/xsk/compiler.cpp +++ b/src/iw6/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = iw6__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -390,9 +390,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -526,7 +526,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -580,7 +580,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -726,7 +726,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -747,9 +747,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -839,7 +839,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -889,7 +889,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1047,7 +1047,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1101,7 +1101,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1364,10 +1364,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1384,7 +1384,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1400,7 +1400,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1482,10 +1482,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1502,7 +1502,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1518,7 +1518,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1540,7 +1540,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1616,7 +1616,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1783,7 +1783,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2074,7 +2074,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2086,7 +2086,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2099,7 +2099,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2215,7 +2215,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2252,7 +2252,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2295,7 +2295,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2425,7 +2425,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2697,7 +2697,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2726,7 +2726,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/iw6/xsk/compiler.hpp b/src/iw6/xsk/compiler.hpp index db8c9c2..d790682 100644 --- a/src/iw6/xsk/compiler.hpp +++ b/src/iw6/xsk/compiler.hpp @@ -87,7 +87,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/iw6/xsk/decompiler.cpp b/src/iw6/xsk/decompiler.cpp index 9fc86f0..325eb4a 100644 --- a/src/iw6/xsk/decompiler.cpp +++ b/src/iw6/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1359,7 +1359,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1840,7 +1840,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1915,7 +1915,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2051,7 +2051,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2158,11 +2158,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2560,7 +2560,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2679,7 +2679,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3070,7 +3070,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/iw6/xsk/disassembler.cpp b/src/iw6/xsk/disassembler.cpp index e670410..ab6a787 100644 --- a/src/iw6/xsk/disassembler.cpp +++ b/src/iw6/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// IW6 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,14 +69,14 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); - + dissasemble_instruction(inst); - + size -= inst->size; } } @@ -168,7 +168,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -310,19 +310,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -341,88 +336,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint16_t field_id = script_->read(); - std::string field_name; - - if (field_id > 38305) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x40000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -430,24 +380,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -457,7 +447,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 10; @@ -466,24 +456,24 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { - case opcode::OP_GetLocalFunction: - case opcode::OP_ScriptLocalFunctionCall: - case opcode::OP_ScriptLocalFunctionCall2: - case opcode::OP_ScriptLocalMethodCall: - case opcode::OP_ScriptLocalThreadCall: - case opcode::OP_ScriptLocalChildThreadCall: - case opcode::OP_ScriptLocalMethodThreadCall: - case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); - break; - default: - break; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = resolve_function(inst->data[0]); + break; + default: + break; } } } @@ -512,9 +502,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -532,40 +522,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/iw6/xsk/disassembler.hpp b/src/iw6/xsk/disassembler.hpp index f915e5f..80b126f 100644 --- a/src/iw6/xsk/disassembler.hpp +++ b/src/iw6/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/iw6/xsk/iw6.hpp b/src/iw6/xsk/iw6.hpp index ba98f55..e27e12d 100644 --- a/src/iw6/xsk/iw6.hpp +++ b/src/iw6/xsk/iw6.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::iw6 { +constexpr std::uint16_t max_string_id = 0x95A1; + enum class opcode : std::uint8_t { OP_SetNewLocalVariableFieldCached0 = 0x17, diff --git a/src/iw6/xsk/lexer.cpp b/src/iw6/xsk/lexer.cpp index 54cb7a5..f262e5d 100644 --- a/src/iw6/xsk/lexer.cpp +++ b/src/iw6/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 110 -#define YY_END_OF_BUFFER 111 +#define YY_NUM_RULES 111 +#define YY_END_OF_BUFFER 112 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[328] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 109, - 1, 2, 94, 109, 109, 93, 97, 109, 54, 55, - 91, 89, 60, 90, 61, 92, 108, 108, 63, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, + 1, 2, 94, 110, 110, 93, 97, 110, 54, 55, + 91, 89, 60, 90, 61, 92, 109, 109, 63, 64, 78, 88, 79, 65, 100, 58, 59, 98, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 56, 96, 57, 95, 5, 6, - 5, 12, 13, 12, 109, 91, 92, 75, 0, 102, + 5, 12, 13, 12, 110, 91, 92, 75, 0, 102, 0, 15, 0, 0, 0, 0, 84, 0, 73, 0, - 86, 0, 0, 8, 82, 66, 80, 67, 81, 104, - 0, 11, 4, 3, 83, 104, 108, 105, 0, 0, + 86, 0, 0, 8, 82, 66, 80, 67, 81, 105, + 0, 11, 4, 3, 83, 105, 109, 106, 0, 0, 0, 0, 62, 70, 76, 74, 77, 71, 100, 87, 100, 100, 100, 100, 100, 100, 28, 100, 100, 100, 100, 100, 26, 32, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 85, 72, 7, 14, 10, 9, 0, 102, 0, 0, 0, 0, 0, 0, 101, - 0, 0, 0, 0, 102, 0, 104, 0, 3, 104, - 104, 105, 106, 107, 99, 68, 69, 100, 100, 100, + 0, 0, 0, 0, 102, 0, 105, 0, 3, 105, + 105, 106, 107, 108, 99, 68, 69, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 30, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 103, 0, 0, 0, 0, 0, 101, 0, 0, @@ -594,7 +594,7 @@ static const flex_int16_t yy_accept[328] = 0, 0, 49, 36, 100, 100, 100, 20, 47, 100, 53, 100, 100, 100, 100, 100, 100, 100, 100, 29, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, - 21, 100, 100, 38, 33, 100, 42, 100, 100, 103, + 21, 100, 100, 38, 33, 100, 42, 100, 100, 104, 0, 0, 16, 0, 100, 100, 100, 35, 31, 100, 100, 100, 100, 100, 0, 17, 0, 100, 100, 37, 100, 41, 100, 100, 23, 19, 0, 100, 100, 100, @@ -1188,11 +1188,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1251,577 +1251,582 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw iw6::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw iw6::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw iw6::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return iw6::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw iw6::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return iw6::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw iw6::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw iw6::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return iw6::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return iw6::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return iw6::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return iw6::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return iw6::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return iw6::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return iw6::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return iw6::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return iw6::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return iw6::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return iw6::parser::make_IF(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return iw6::parser::make_ELSE(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return iw6::parser::make_DO(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return iw6::parser::make_WHILE(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return iw6::parser::make_FOR(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return iw6::parser::make_FOREACH(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return iw6::parser::make_IN(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return iw6::parser::make_SWITCH(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return iw6::parser::make_CASE(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return iw6::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return iw6::parser::make_BREAK(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return iw6::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return iw6::parser::make_RETURN(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return iw6::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return iw6::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return iw6::parser::make_PROFEND(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return iw6::parser::make_THREAD(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return iw6::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return iw6::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return iw6::parser::make_CALL(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return iw6::parser::make_TRUE(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return iw6::parser::make_FALSE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return iw6::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return iw6::parser::make_SIZE(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return iw6::parser::make_GAME(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return iw6::parser::make_SELF(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return iw6::parser::make_ANIM(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return iw6::parser::make_LEVEL(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return iw6::parser::make_LPAREN(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return iw6::parser::make_RPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return iw6::parser::make_LBRACE(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return iw6::parser::make_RBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return iw6::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return iw6::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return iw6::parser::make_COMMA(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return iw6::parser::make_DOT(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return iw6::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return iw6::parser::make_COLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return iw6::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return iw6::parser::make_QMARK(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return iw6::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return iw6::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return iw6::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return iw6::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return iw6::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return iw6::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return iw6::parser::make_OR(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return iw6::parser::make_AND(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return iw6::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return iw6::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return iw6::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return iw6::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return iw6::parser::make_LESS(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return iw6::parser::make_GREATER(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return iw6::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return iw6::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return iw6::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return iw6::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return iw6::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return iw6::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return iw6::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return iw6::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return iw6::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return iw6::parser::make_ADD(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return iw6::parser::make_SUB(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return iw6::parser::make_MUL(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return iw6::parser::make_DIV(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return iw6::parser::make_MOD(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return iw6::parser::make_NOT(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return iw6::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return iw6::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return iw6::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return iw6::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" -{ return iw6::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 157 "lexer.lpp" +{ return iw6::parser::make_PATH(xsk::gsc::iw6::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return iw6::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return iw6::parser::make_IDENTIFIER(xsk::gsc::iw6::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: /* rule 101 can match eol */ YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return iw6::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 159 "lexer.lpp" +{ return iw6::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" +#line 160 "lexer.lpp" { return iw6::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 103: YY_RULE_SETUP -#line 160 "lexer.lpp" -{ return iw6::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 161 "lexer.lpp" +{ return iw6::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return iw6::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 162 "lexer.lpp" +{ return iw6::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return iw6::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return iw6::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return iw6::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return iw6::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return iw6::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return iw6::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return iw6::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 166 "lexer.lpp" -{ if(ctx->header_top > 0) iw6_pop_header(ctx); else return iw6::parser::make_IW6EOF(ctx->loc); } +{ return iw6::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 109: -/* rule 109 can match eol */ YY_RULE_SETUP #line 167 "lexer.lpp" -{ throw iw6::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return iw6::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 168 "lexer.lpp" +{ if(ctx->header_top > 0) iw6_pop_header(ctx); else return iw6::parser::make_IW6EOF(ctx->loc); } YY_BREAK case 110: +/* rule 110 can match eol */ YY_RULE_SETUP #line 169 "lexer.lpp" +{ throw iw6::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 171 "lexer.lpp" ECHO; YY_BREAK -#line 1824 "lexer.cpp" +#line 1829 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2951,65 +2956,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 169 "lexer.lpp" +#line 171 "lexer.lpp" void iw6_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3017,9 +3022,9 @@ void iw6_push_header(xsk::gsc::context* ctx, const std::string& file) void iw6_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/iw6/xsk/lexer.hpp b/src/iw6/xsk/lexer.hpp index 7310509..ecca4ad 100644 --- a/src/iw6/xsk/lexer.hpp +++ b/src/iw6/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 169 "lexer.lpp" +#line 171 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/iw6/xsk/parser.cpp b/src/iw6/xsk/parser.cpp index 883bdb1..ca284c8 100644 --- a/src/iw6/xsk/parser.cpp +++ b/src/iw6/xsk/parser.cpp @@ -494,10 +494,7 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -794,10 +791,7 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1094,10 +1088,7 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1393,10 +1384,7 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1947,10 +1935,7 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1975,1303 +1960,1285 @@ namespace xsk { namespace gsc { namespace iw6 { switch (yyn) { case 2: // root: program -#line 252 "parser.ypp" +#line 249 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 1981 "parser.cpp" +#line 1966 "parser.cpp" break; case 3: // root: %empty -#line 253 "parser.ypp" +#line 250 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 1987 "parser.cpp" +#line 1972 "parser.cpp" break; case 4: // program: program inline -#line 258 "parser.ypp" +#line 255 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 1993 "parser.cpp" +#line 1978 "parser.cpp" break; case 5: // program: program include -#line 260 "parser.ypp" +#line 257 "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 1999 "parser.cpp" +#line 1984 "parser.cpp" break; case 6: // program: program declaration -#line 262 "parser.ypp" +#line 259 "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 2005 "parser.cpp" +#line 1990 "parser.cpp" break; case 7: // program: inline -#line 264 "parser.ypp" +#line 261 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2011 "parser.cpp" +#line 1996 "parser.cpp" break; case 8: // program: include -#line 266 "parser.ypp" +#line 263 "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 2017 "parser.cpp" +#line 2002 "parser.cpp" break; case 9: // program: declaration -#line 268 "parser.ypp" +#line 265 "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 2023 "parser.cpp" +#line 2008 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 272 "parser.ypp" +#line 269 "parser.ypp" { iw6_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2029 "parser.cpp" +#line 2014 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 277 "parser.ypp" +#line 274 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2035 "parser.cpp" +#line 2020 "parser.cpp" break; case 12: // declaration: "/#" -#line 281 "parser.ypp" +#line 278 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2041 "parser.cpp" +#line 2026 "parser.cpp" break; case 13: // declaration: "#/" -#line 282 "parser.ypp" +#line 279 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2047 "parser.cpp" +#line 2032 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2053 "parser.cpp" +#line 2038 "parser.cpp" break; case 15: // declaration: decl_constant -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2059 "parser.cpp" +#line 2044 "parser.cpp" break; case 16: // declaration: decl_thread -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2065 "parser.cpp" +#line 2050 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 290 "parser.ypp" +#line 287 "parser.ypp" { ctx->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 2071 "parser.cpp" +#line 2056 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 295 "parser.ypp" +#line 292 "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 2077 "parser.cpp" +#line 2062 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 300 "parser.ypp" +#line 297 "parser.ypp" { ctx->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 2083 "parser.cpp" +#line 2068 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 304 "parser.ypp" +#line 301 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2089 "parser.cpp" +#line 2074 "parser.cpp" break; case 21: // stmt: stmt_block -#line 305 "parser.ypp" +#line 302 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2095 "parser.cpp" +#line 2080 "parser.cpp" break; case 22: // stmt: stmt_call -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2101 "parser.cpp" +#line 2086 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2107 "parser.cpp" +#line 2092 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2113 "parser.cpp" +#line 2098 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2119 "parser.cpp" +#line 2104 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2125 "parser.cpp" +#line 2110 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2131 "parser.cpp" +#line 2116 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2137 "parser.cpp" +#line 2122 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2143 "parser.cpp" +#line 2128 "parser.cpp" break; case 30: // stmt: stmt_if -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2149 "parser.cpp" +#line 2134 "parser.cpp" break; case 31: // stmt: stmt_ifelse -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2155 "parser.cpp" +#line 2140 "parser.cpp" break; case 32: // stmt: stmt_while -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2161 "parser.cpp" +#line 2146 "parser.cpp" break; case 33: // stmt: stmt_dowhile -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2167 "parser.cpp" +#line 2152 "parser.cpp" break; case 34: // stmt: stmt_for -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2173 "parser.cpp" +#line 2158 "parser.cpp" break; case 35: // stmt: stmt_foreach -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2179 "parser.cpp" +#line 2164 "parser.cpp" break; case 36: // stmt: stmt_switch -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2185 "parser.cpp" +#line 2170 "parser.cpp" break; case 37: // stmt: stmt_case -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2191 "parser.cpp" +#line 2176 "parser.cpp" break; case 38: // stmt: stmt_default -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2197 "parser.cpp" +#line 2182 "parser.cpp" break; case 39: // stmt: stmt_break -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2203 "parser.cpp" +#line 2188 "parser.cpp" break; case 40: // stmt: stmt_continue -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2209 "parser.cpp" +#line 2194 "parser.cpp" break; case 41: // stmt: stmt_return -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2215 "parser.cpp" +#line 2200 "parser.cpp" break; case 42: // stmt: stmt_breakpoint -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2221 "parser.cpp" +#line 2206 "parser.cpp" break; case 43: // stmt: stmt_prof_begin -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } -#line 2227 "parser.cpp" +#line 2212 "parser.cpp" break; case 44: // stmt: stmt_prof_end -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } -#line 2233 "parser.cpp" +#line 2218 "parser.cpp" break; case 45: // stmt_dev: "/#" stmt_list "#/" -#line 332 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2239 "parser.cpp" +#line 2224 "parser.cpp" break; case 46: // stmt_dev: "/#" "#/" -#line 333 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2245 "parser.cpp" +#line 2230 "parser.cpp" break; case 47: // stmt_block: "{" stmt_list "}" -#line 337 "parser.ypp" +#line 334 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2251 "parser.cpp" +#line 2236 "parser.cpp" break; case 48: // stmt_block: "{" "}" -#line 338 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2257 "parser.cpp" +#line 2242 "parser.cpp" break; case 49: // stmt_list: stmt_list stmt -#line 343 "parser.ypp" +#line 340 "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 2263 "parser.cpp" +#line 2248 "parser.cpp" break; case 50: // stmt_list: stmt -#line 345 "parser.ypp" +#line 342 "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 2269 "parser.cpp" +#line 2254 "parser.cpp" break; case 51: // stmt_expr: expr_assign -#line 350 "parser.ypp" +#line 347 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2275 "parser.cpp" +#line 2260 "parser.cpp" break; case 52: // stmt_expr: expr_increment -#line 352 "parser.ypp" +#line 349 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2281 "parser.cpp" +#line 2266 "parser.cpp" break; case 53: // stmt_expr: expr_decrement -#line 354 "parser.ypp" +#line 351 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2287 "parser.cpp" +#line 2272 "parser.cpp" break; case 54: // stmt_expr: %empty -#line 356 "parser.ypp" +#line 353 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2293 "parser.cpp" +#line 2278 "parser.cpp" break; case 55: // stmt_call: expr_call ";" -#line 361 "parser.ypp" +#line 358 "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 2299 "parser.cpp" +#line 2284 "parser.cpp" break; case 56: // stmt_call: expr_method ";" -#line 363 "parser.ypp" +#line 360 "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 2305 "parser.cpp" +#line 2290 "parser.cpp" break; case 57: // stmt_assign: expr_assign ";" -#line 368 "parser.ypp" +#line 365 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2311 "parser.cpp" +#line 2296 "parser.cpp" break; case 58: // stmt_assign: expr_increment ";" -#line 370 "parser.ypp" +#line 367 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2317 "parser.cpp" +#line 2302 "parser.cpp" break; case 59: // stmt_assign: expr_decrement ";" -#line 372 "parser.ypp" +#line 369 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2323 "parser.cpp" +#line 2308 "parser.cpp" break; case 60: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 377 "parser.ypp" +#line 374 "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 2329 "parser.cpp" +#line 2314 "parser.cpp" break; case 61: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 382 "parser.ypp" +#line 379 "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 2335 "parser.cpp" +#line 2320 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 384 "parser.ypp" +#line 381 "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 2341 "parser.cpp" +#line 2326 "parser.cpp" break; case 63: // stmt_wait: "wait" expr ";" -#line 389 "parser.ypp" +#line 386 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2347 "parser.cpp" +#line 2332 "parser.cpp" break; case 64: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 394 "parser.ypp" +#line 391 "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 2353 "parser.cpp" +#line 2338 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 396 "parser.ypp" +#line 393 "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 2359 "parser.cpp" +#line 2344 "parser.cpp" break; case 66: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 401 "parser.ypp" +#line 398 "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 2365 "parser.cpp" +#line 2350 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 403 "parser.ypp" +#line 400 "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 2371 "parser.cpp" +#line 2356 "parser.cpp" break; case 68: // stmt_waittillframeend: "waittillframeend" ";" -#line 408 "parser.ypp" +#line 405 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2377 "parser.cpp" +#line 2362 "parser.cpp" break; case 69: // stmt_if: "if" "(" expr ")" stmt -#line 413 "parser.ypp" +#line 410 "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 2383 "parser.cpp" +#line 2368 "parser.cpp" break; case 70: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 418 "parser.ypp" +#line 415 "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 2389 "parser.cpp" +#line 2374 "parser.cpp" break; case 71: // stmt_while: "while" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2395 "parser.cpp" +#line 2380 "parser.cpp" break; case 72: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 428 "parser.ypp" +#line 425 "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 2401 "parser.cpp" +#line 2386 "parser.cpp" break; case 73: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2407 "parser.cpp" +#line 2392 "parser.cpp" break; case 74: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 438 "parser.ypp" +#line 435 "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 2413 "parser.cpp" +#line 2398 "parser.cpp" break; case 75: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 440 "parser.ypp" +#line 437 "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 2419 "parser.cpp" +#line 2404 "parser.cpp" break; case 76: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 445 "parser.ypp" +#line 442 "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 2425 "parser.cpp" +#line 2410 "parser.cpp" break; case 77: // stmt_case: "case" expr_integer ":" -#line 450 "parser.ypp" +#line 447 "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 2431 "parser.cpp" +#line 2416 "parser.cpp" break; case 78: // stmt_case: "case" expr_string ":" -#line 452 "parser.ypp" +#line 449 "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 2437 "parser.cpp" +#line 2422 "parser.cpp" break; case 79: // stmt_default: "default" ":" -#line 457 "parser.ypp" +#line 454 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2443 "parser.cpp" +#line 2428 "parser.cpp" break; case 80: // stmt_break: "break" ";" -#line 462 "parser.ypp" +#line 459 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2449 "parser.cpp" +#line 2434 "parser.cpp" break; case 81: // stmt_continue: "continue" ";" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2455 "parser.cpp" +#line 2440 "parser.cpp" break; case 82: // stmt_return: "return" expr ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2461 "parser.cpp" +#line 2446 "parser.cpp" break; case 83: // stmt_return: "return" ";" -#line 474 "parser.ypp" +#line 471 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2467 "parser.cpp" +#line 2452 "parser.cpp" break; case 84: // stmt_breakpoint: "breakpoint" ";" -#line 479 "parser.ypp" +#line 476 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2473 "parser.cpp" +#line 2458 "parser.cpp" break; case 85: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 484 "parser.ypp" +#line 481 "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 2479 "parser.cpp" +#line 2464 "parser.cpp" break; case 86: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 489 "parser.ypp" +#line 486 "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 2485 "parser.cpp" +#line 2470 "parser.cpp" break; case 87: // expr: expr_ternary -#line 493 "parser.ypp" +#line 490 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2491 "parser.cpp" +#line 2476 "parser.cpp" break; case 88: // expr: expr_binary -#line 494 "parser.ypp" +#line 491 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2497 "parser.cpp" +#line 2482 "parser.cpp" break; case 89: // expr: expr_primitive -#line 495 "parser.ypp" +#line 492 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2503 "parser.cpp" +#line 2488 "parser.cpp" break; case 90: // expr_or_empty: expr -#line 499 "parser.ypp" +#line 496 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2509 "parser.cpp" +#line 2494 "parser.cpp" break; case 91: // expr_or_empty: %empty -#line 500 "parser.ypp" +#line 497 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2515 "parser.cpp" +#line 2500 "parser.cpp" break; case 92: // expr_assign: expr_object "=" expr -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2521 "parser.cpp" +#line 2506 "parser.cpp" break; case 93: // expr_assign: expr_object "|=" expr -#line 507 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2527 "parser.cpp" +#line 2512 "parser.cpp" break; case 94: // expr_assign: expr_object "&=" expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2533 "parser.cpp" +#line 2518 "parser.cpp" break; case 95: // expr_assign: expr_object "^=" expr -#line 511 "parser.ypp" +#line 508 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2539 "parser.cpp" +#line 2524 "parser.cpp" break; case 96: // expr_assign: expr_object "<<=" expr -#line 513 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2545 "parser.cpp" +#line 2530 "parser.cpp" break; case 97: // expr_assign: expr_object ">>=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2551 "parser.cpp" +#line 2536 "parser.cpp" break; case 98: // expr_assign: expr_object "+=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2557 "parser.cpp" +#line 2542 "parser.cpp" break; case 99: // expr_assign: expr_object "-=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2563 "parser.cpp" +#line 2548 "parser.cpp" break; case 100: // expr_assign: expr_object "*=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2569 "parser.cpp" +#line 2554 "parser.cpp" break; case 101: // expr_assign: expr_object "/=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2575 "parser.cpp" +#line 2560 "parser.cpp" break; case 102: // expr_assign: expr_object "%=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2581 "parser.cpp" +#line 2566 "parser.cpp" break; case 103: // expr_increment: "++" expr_object -#line 530 "parser.ypp" +#line 527 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2587 "parser.cpp" +#line 2572 "parser.cpp" break; case 104: // expr_increment: expr_object "++" -#line 532 "parser.ypp" +#line 529 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2593 "parser.cpp" +#line 2578 "parser.cpp" break; case 105: // expr_decrement: "--" expr_object -#line 537 "parser.ypp" +#line 534 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2599 "parser.cpp" +#line 2584 "parser.cpp" break; case 106: // expr_decrement: expr_object "--" -#line 539 "parser.ypp" +#line 536 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2605 "parser.cpp" +#line 2590 "parser.cpp" break; case 107: // expr_ternary: expr "?" expr ":" expr -#line 544 "parser.ypp" +#line 541 "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 2611 "parser.cpp" +#line 2596 "parser.cpp" break; case 108: // expr_binary: expr "||" expr -#line 549 "parser.ypp" +#line 546 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2617 "parser.cpp" +#line 2602 "parser.cpp" break; case 109: // expr_binary: expr "&&" expr -#line 551 "parser.ypp" +#line 548 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2623 "parser.cpp" +#line 2608 "parser.cpp" break; case 110: // expr_binary: expr "==" expr -#line 553 "parser.ypp" +#line 550 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2629 "parser.cpp" +#line 2614 "parser.cpp" break; case 111: // expr_binary: expr "!=" expr -#line 555 "parser.ypp" +#line 552 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2635 "parser.cpp" +#line 2620 "parser.cpp" break; case 112: // expr_binary: expr "<=" expr -#line 557 "parser.ypp" +#line 554 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2641 "parser.cpp" +#line 2626 "parser.cpp" break; case 113: // expr_binary: expr ">=" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2647 "parser.cpp" +#line 2632 "parser.cpp" break; case 114: // expr_binary: expr "<" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2653 "parser.cpp" +#line 2638 "parser.cpp" break; case 115: // expr_binary: expr ">" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2659 "parser.cpp" +#line 2644 "parser.cpp" break; case 116: // expr_binary: expr "|" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2665 "parser.cpp" +#line 2650 "parser.cpp" break; case 117: // expr_binary: expr "&" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2671 "parser.cpp" +#line 2656 "parser.cpp" break; case 118: // expr_binary: expr "^" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2677 "parser.cpp" +#line 2662 "parser.cpp" break; case 119: // expr_binary: expr "<<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2683 "parser.cpp" +#line 2668 "parser.cpp" break; case 120: // expr_binary: expr ">>" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2689 "parser.cpp" +#line 2674 "parser.cpp" break; case 121: // expr_binary: expr "+" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2695 "parser.cpp" +#line 2680 "parser.cpp" break; case 122: // expr_binary: expr "-" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2701 "parser.cpp" +#line 2686 "parser.cpp" break; case 123: // expr_binary: expr "*" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2707 "parser.cpp" +#line 2692 "parser.cpp" break; case 124: // expr_binary: expr "/" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2713 "parser.cpp" +#line 2698 "parser.cpp" break; case 125: // expr_binary: expr "%" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2719 "parser.cpp" +#line 2704 "parser.cpp" break; case 126: // expr_primitive: expr_complement -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2725 "parser.cpp" +#line 2710 "parser.cpp" break; case 127: // expr_primitive: expr_not -#line 588 "parser.ypp" +#line 585 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2731 "parser.cpp" +#line 2716 "parser.cpp" break; case 128: // expr_primitive: expr_call -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2737 "parser.cpp" +#line 2722 "parser.cpp" break; case 129: // expr_primitive: expr_method -#line 590 "parser.ypp" +#line 587 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2743 "parser.cpp" +#line 2728 "parser.cpp" break; case 130: // expr_primitive: expr_add_array -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2749 "parser.cpp" +#line 2734 "parser.cpp" break; case 131: // expr_primitive: expr_reference -#line 592 "parser.ypp" +#line 589 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2755 "parser.cpp" +#line 2740 "parser.cpp" break; case 132: // expr_primitive: expr_array -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2761 "parser.cpp" +#line 2746 "parser.cpp" break; case 133: // expr_primitive: expr_field -#line 594 "parser.ypp" +#line 591 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2767 "parser.cpp" +#line 2752 "parser.cpp" break; case 134: // expr_primitive: expr_size -#line 595 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2773 "parser.cpp" +#line 2758 "parser.cpp" break; case 135: // expr_primitive: expr_paren -#line 596 "parser.ypp" +#line 593 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2779 "parser.cpp" +#line 2764 "parser.cpp" break; case 136: // expr_primitive: expr_thisthread -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2785 "parser.cpp" +#line 2770 "parser.cpp" break; case 137: // expr_primitive: expr_empty_array -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2791 "parser.cpp" +#line 2776 "parser.cpp" break; case 138: // expr_primitive: expr_undefined -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2797 "parser.cpp" +#line 2782 "parser.cpp" break; case 139: // expr_primitive: expr_game -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2803 "parser.cpp" +#line 2788 "parser.cpp" break; case 140: // expr_primitive: expr_self -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2809 "parser.cpp" +#line 2794 "parser.cpp" break; case 141: // expr_primitive: expr_anim -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2815 "parser.cpp" +#line 2800 "parser.cpp" break; case 142: // expr_primitive: expr_level -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2821 "parser.cpp" +#line 2806 "parser.cpp" break; case 143: // expr_primitive: expr_animation -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2827 "parser.cpp" +#line 2812 "parser.cpp" break; case 144: // expr_primitive: expr_animtree -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2833 "parser.cpp" +#line 2818 "parser.cpp" break; case 145: // expr_primitive: expr_identifier -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2839 "parser.cpp" +#line 2824 "parser.cpp" break; case 146: // expr_primitive: expr_istring -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2845 "parser.cpp" +#line 2830 "parser.cpp" break; case 147: // expr_primitive: expr_string -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2851 "parser.cpp" +#line 2836 "parser.cpp" break; case 148: // expr_primitive: expr_color -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2857 "parser.cpp" +#line 2842 "parser.cpp" break; case 149: // expr_primitive: expr_vector -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2863 "parser.cpp" +#line 2848 "parser.cpp" break; case 150: // expr_primitive: expr_float -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2869 "parser.cpp" +#line 2854 "parser.cpp" break; case 151: // expr_primitive: expr_integer -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2875 "parser.cpp" +#line 2860 "parser.cpp" break; case 152: // expr_primitive: expr_false -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2881 "parser.cpp" +#line 2866 "parser.cpp" break; case 153: // expr_primitive: expr_true -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2887 "parser.cpp" +#line 2872 "parser.cpp" break; case 154: // expr_complement: "~" expr -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2893 "parser.cpp" +#line 2878 "parser.cpp" break; case 155: // expr_not: "!" expr -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2899 "parser.cpp" +#line 2884 "parser.cpp" break; case 156: // expr_call: expr_function -#line 628 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2905 "parser.cpp" +#line 2890 "parser.cpp" break; case 157: // expr_call: expr_pointer -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2911 "parser.cpp" +#line 2896 "parser.cpp" break; case 158: // expr_method: expr_object expr_function -#line 632 "parser.ypp" +#line 629 "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 2917 "parser.cpp" +#line 2902 "parser.cpp" break; case 159: // expr_method: expr_object expr_pointer -#line 633 "parser.ypp" +#line 630 "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 2923 "parser.cpp" +#line 2908 "parser.cpp" break; case 160: // expr_function: expr_identifier "(" expr_arguments ")" -#line 638 "parser.ypp" +#line 635 "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 2929 "parser.cpp" +#line 2914 "parser.cpp" break; case 161: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 637 "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 2935 "parser.cpp" +#line 2920 "parser.cpp" break; case 162: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 639 "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 2941 "parser.cpp" +#line 2926 "parser.cpp" break; case 163: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 641 "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 2947 "parser.cpp" +#line 2932 "parser.cpp" break; case 164: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 643 "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 2953 "parser.cpp" +#line 2938 "parser.cpp" break; case 165: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2959 "parser.cpp" +#line 2944 "parser.cpp" break; case 166: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 653 "parser.ypp" +#line 650 "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 2965 "parser.cpp" +#line 2950 "parser.cpp" break; case 167: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 655 "parser.ypp" +#line 652 "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 2971 "parser.cpp" +#line 2956 "parser.cpp" break; case 168: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 654 "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 2977 "parser.cpp" +#line 2962 "parser.cpp" break; case 169: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 656 "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 2983 "parser.cpp" +#line 2968 "parser.cpp" break; case 170: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 664 "parser.ypp" +#line 661 "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 2989 "parser.cpp" +#line 2974 "parser.cpp" break; case 171: // expr_parameters: expr_parameters "," expr_identifier -#line 669 "parser.ypp" +#line 666 "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 2995 "parser.cpp" +#line 2980 "parser.cpp" break; case 172: // expr_parameters: expr_identifier -#line 671 "parser.ypp" +#line 668 "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 3001 "parser.cpp" +#line 2986 "parser.cpp" break; case 173: // expr_parameters: %empty -#line 673 "parser.ypp" +#line 670 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3007 "parser.cpp" +#line 2992 "parser.cpp" break; case 174: // expr_arguments: expr_arguments_no_empty -#line 678 "parser.ypp" +#line 675 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3013 "parser.cpp" +#line 2998 "parser.cpp" break; case 175: // expr_arguments: %empty -#line 680 "parser.ypp" +#line 677 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3019 "parser.cpp" +#line 3004 "parser.cpp" break; case 176: // expr_arguments_no_empty: expr_arguments "," expr -#line 685 "parser.ypp" +#line 682 "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 3025 "parser.cpp" +#line 3010 "parser.cpp" break; case 177: // expr_arguments_no_empty: expr -#line 687 "parser.ypp" +#line 684 "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 3031 "parser.cpp" +#line 3016 "parser.cpp" break; case 178: // expr_reference: "::" expr_identifier -#line 692 "parser.ypp" +#line 689 "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 3037 "parser.cpp" +#line 3022 "parser.cpp" break; case 179: // expr_reference: expr_path "::" expr_identifier -#line 694 "parser.ypp" +#line 691 "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 3043 "parser.cpp" +#line 3028 "parser.cpp" break; case 180: // expr_array: expr_object "[" expr "]" -#line 699 "parser.ypp" +#line 696 "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 3049 "parser.cpp" +#line 3034 "parser.cpp" break; case 181: // expr_field: expr_object "." expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3055 "parser.cpp" +#line 3040 "parser.cpp" break; case 182: // expr_size: expr_object ".size" -#line 709 "parser.ypp" +#line 706 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3061 "parser.cpp" +#line 3046 "parser.cpp" break; case 183: // expr_paren: "(" expr ")" -#line 714 "parser.ypp" +#line 711 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3067 "parser.cpp" +#line 3052 "parser.cpp" break; case 184: // expr_object: expr_call -#line 718 "parser.ypp" +#line 715 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3073 "parser.cpp" +#line 3058 "parser.cpp" break; case 185: // expr_object: expr_method -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3079 "parser.cpp" +#line 3064 "parser.cpp" break; case 186: // expr_object: expr_array -#line 720 "parser.ypp" +#line 717 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3085 "parser.cpp" +#line 3070 "parser.cpp" break; case 187: // expr_object: expr_field -#line 721 "parser.ypp" +#line 718 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3091 "parser.cpp" +#line 3076 "parser.cpp" break; case 188: // expr_object: expr_game -#line 722 "parser.ypp" +#line 719 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3097 "parser.cpp" +#line 3082 "parser.cpp" break; case 189: // expr_object: expr_self -#line 723 "parser.ypp" +#line 720 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3103 "parser.cpp" +#line 3088 "parser.cpp" break; case 190: // expr_object: expr_anim -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3109 "parser.cpp" +#line 3094 "parser.cpp" break; case 191: // expr_object: expr_level -#line 725 "parser.ypp" +#line 722 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3115 "parser.cpp" +#line 3100 "parser.cpp" break; case 192: // expr_object: expr_identifier -#line 726 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3121 "parser.cpp" +#line 3106 "parser.cpp" break; case 193: // expr_thisthread: "thisthread" -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3127 "parser.cpp" +#line 3112 "parser.cpp" break; case 194: // expr_empty_array: "[" "]" -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3133 "parser.cpp" +#line 3118 "parser.cpp" break; case 195: // expr_undefined: "undefined" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3139 "parser.cpp" +#line 3124 "parser.cpp" break; case 196: // expr_game: "game" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3145 "parser.cpp" +#line 3130 "parser.cpp" break; case 197: // expr_self: "self" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3151 "parser.cpp" +#line 3136 "parser.cpp" break; case 198: // expr_anim: "anim" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3157 "parser.cpp" +#line 3142 "parser.cpp" break; case 199: // expr_level: "level" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3163 "parser.cpp" +#line 3148 "parser.cpp" break; case 200: // expr_animation: "%" "identifier" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3169 "parser.cpp" +#line 3154 "parser.cpp" break; case 201: // expr_animtree: "#animtree" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3175 "parser.cpp" +#line 3160 "parser.cpp" break; case 202: // expr_identifier: "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3181 "parser.cpp" +#line 3166 "parser.cpp" break; case 203: // expr_path: "path" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3187 "parser.cpp" +#line 3172 "parser.cpp" break; case 204: // expr_path: expr_identifier -#line 783 "parser.ypp" +#line 780 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3193 "parser.cpp" +#line 3178 "parser.cpp" break; case 205: // expr_istring: "localized string" -#line 788 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3199 "parser.cpp" +#line 3184 "parser.cpp" break; case 206: // expr_string: "string literal" -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3205 "parser.cpp" +#line 3190 "parser.cpp" break; case 207: // expr_color: "color" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3211 "parser.cpp" +#line 3196 "parser.cpp" break; case 208: // expr_vector: "(" expr "," expr "," expr ")" -#line 803 "parser.ypp" +#line 800 "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 3217 "parser.cpp" +#line 3202 "parser.cpp" break; case 209: // expr_float: "-" "float" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3223 "parser.cpp" +#line 3208 "parser.cpp" break; case 210: // expr_float: "float" -#line 810 "parser.ypp" +#line 807 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3229 "parser.cpp" +#line 3214 "parser.cpp" break; - case 211: // expr_integer: "-" "int" -#line 815 "parser.ypp" + case 211: // expr_integer: "-" "integer" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3235 "parser.cpp" +#line 3220 "parser.cpp" break; - case 212: // expr_integer: "int" -#line 817 "parser.ypp" + case 212: // expr_integer: "integer" +#line 814 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3241 "parser.cpp" +#line 3226 "parser.cpp" break; - case 213: // expr_integer: "octal int" + case 213: // expr_false: "false" #line 819 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3247 "parser.cpp" - break; - - case 214: // expr_integer: "binary int" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3253 "parser.cpp" - break; - - case 215: // expr_integer: "hexadecimal int" -#line 823 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3259 "parser.cpp" - break; - - case 216: // expr_false: "false" -#line 828 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3265 "parser.cpp" +#line 3232 "parser.cpp" break; - case 217: // expr_true: "true" -#line 833 "parser.ypp" + case 214: // expr_true: "true" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3271 "parser.cpp" +#line 3238 "parser.cpp" break; -#line 3275 "parser.cpp" +#line 3242 "parser.cpp" default: break; @@ -3466,27 +3433,27 @@ namespace xsk { namespace gsc { namespace iw6 { "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", "localized string", "color", - "float", "int", "octal int", "binary int", "hexadecimal int", - "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", - "POSTINC", "POSTDEC", "$accept", "root", "program", "inline", "include", - "declaration", "decl_usingtree", "decl_constant", "decl_thread", "stmt", - "stmt_dev", "stmt_block", "stmt_list", "stmt_expr", "stmt_call", - "stmt_assign", "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", - "stmt_waittillmatch", "stmt_waittillframeend", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier", "expr_path", "expr_istring", - "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", - "expr_false", "expr_true", YY_NULLPTR + "float", "integer", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", + "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", + "inline", "include", "declaration", "decl_usingtree", "decl_constant", + "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", + "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", + "stmt_wait", "stmt_waittill", "stmt_waittillmatch", + "stmt_waittillframeend", "stmt_if", "stmt_ifelse", "stmt_while", + "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", "stmt_case", + "stmt_default", "stmt_break", "stmt_continue", "stmt_return", + "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", "expr", + "expr_or_empty", "expr_assign", "expr_increment", "expr_decrement", + "expr_ternary", "expr_binary", "expr_primitive", "expr_complement", + "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", + "expr_add_array", "expr_parameters", "expr_arguments", + "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_size", "expr_paren", "expr_object", "expr_thisthread", + "expr_empty_array", "expr_undefined", "expr_game", "expr_self", + "expr_anim", "expr_level", "expr_animation", "expr_animtree", + "expr_identifier", "expr_path", "expr_istring", "expr_string", + "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", + "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3751,57 +3718,57 @@ namespace xsk { namespace gsc { namespace iw6 { } - const short parser::yypact_ninf_ = -261; + const short parser::yypact_ninf_ = -263; const short parser::yytable_ninf_ = -205; const short parser::yypact_[] = { - 17, -261, -261, -61, -61, -12, -261, 42, 17, -261, - -261, -261, -261, -261, -261, -17, -261, -261, -36, 15, - -16, -261, -261, -261, -261, -8, 911, -261, -261, -261, - 38, 18, -261, -261, -40, -33, -261, 41, -261, -261, - -261, -261, -261, -261, -261, 911, 777, -8, 911, 911, - -43, 1, -261, -261, -261, -261, -261, -261, -261, 2063, - -261, -261, -261, -261, -261, 69, 347, -261, -261, -261, - -261, 507, 710, -261, -261, 734, -261, -261, -261, 742, - 801, 867, 875, -261, -261, 26, 45, -261, -261, -261, - -261, -261, -261, -261, -261, 49, 53, -8, 58, 66, - 60, 70, 77, 89, 90, 1389, 777, -261, 2146, 95, - 103, -261, -261, -261, -261, -261, -261, -261, 911, 911, - 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, - 911, 911, 911, 911, 911, 911, 911, -261, 978, -8, - -261, -261, 117, 112, 911, -8, -261, 1073, -261, -261, - 911, 911, -8, 911, 911, -8, 911, -261, 911, 974, - 911, -261, 2028, 162, 162, 2177, 2187, 1059, 1059, 8, - 8, 8, 8, 2218, 2259, 2228, -15, -15, -261, -261, - -261, 1833, -261, -8, 36, -261, 123, 1149, 911, 120, - 125, 1327, 128, 132, 134, 135, 28, 127, 131, 133, - 844, 136, 145, 150, -261, 147, 570, 570, -261, -261, - -261, 1200, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, 142, 144, 146, 148, 149, - -261, -261, 642, -261, -261, -261, -261, -10, 1873, 55, - 155, 1913, 64, 160, 1953, 1992, 156, 2146, 911, -261, - 123, -261, 911, -261, 1276, 2098, -261, 911, 190, 911, - -2, -8, 911, 111, 158, 167, -261, -261, -261, -261, - 2133, -261, 911, 911, 911, -261, -261, 438, 438, -261, - -261, -261, -261, -261, -261, -261, 166, 169, 171, 180, - -261, -261, 911, 911, 911, 911, 911, 911, 911, 911, - 911, 911, 911, 176, -261, 911, 177, -261, 911, 178, - 911, 185, 2146, 82, -261, -261, 1555, 186, 1589, 188, - -261, -261, -261, 1353, -3, 1623, -261, -261, -261, 83, - 84, 974, 911, 911, 911, 911, 2146, 2146, 2146, 2146, - 2146, 2146, 2146, 2146, 2146, 2146, 2146, 197, 85, 200, - 86, 207, 1657, 911, -261, 1327, 911, 1327, 911, 911, - -8, 53, 199, 203, 1691, 1433, 1477, 1521, 911, -261, - 911, -261, 911, -261, 94, 214, 1725, -261, 2146, 204, - 1759, 232, -261, -261, -261, 205, 206, 911, 208, 911, - 209, 911, 97, 115, 118, -261, 1327, 212, -2, 1327, - 911, -261, -261, 216, -261, 222, -261, 224, -261, -261, - -261, -261, -261, 225, -261, 1793, 219, 221, 223, 1327, - 1327, -261, -261, -261, -261, -261 + 34, -263, -263, -22, -22, -28, -263, 19, 34, -263, + -263, -263, -263, -263, -263, -17, -263, -263, -4, 4, + -48, -263, -263, -263, -263, -38, 1180, -263, -263, -263, + 15, 33, -263, -263, -33, -24, -263, 6, -263, -263, + -263, -263, -263, -263, -263, 1180, 630, -38, 1180, 1180, + -15, -16, -263, -263, -263, -263, 2051, -263, -263, -263, + -263, -263, -14, 78, -263, -263, -263, -263, 532, 652, + -263, -263, 678, -263, -263, -263, 713, 727, 756, 866, + -263, -263, 57, 32, -263, -263, -263, -263, -263, -263, + -263, -263, 37, 54, -38, 56, 71, 62, 73, 88, + 90, 93, 1377, 630, -263, 2134, 98, 116, -263, -263, + -263, -263, -263, -263, -263, 1180, 1180, 1180, 1180, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 1180, 1180, 1180, 1180, -263, 1244, -38, -263, -263, 94, + 110, 1180, -38, -263, 835, -263, -263, 1180, 1180, -38, + 1180, 1180, -38, 1180, -263, 1180, 1176, 1180, -263, 2016, + 115, 115, 2165, 1321, 948, 948, 271, 271, 271, 271, + 747, 2206, 2175, 84, 84, -263, -263, -263, 1821, -263, + -38, 48, -263, 122, 911, 1180, 119, 125, 1089, 131, + 132, 133, 134, 21, 135, 136, 137, 1116, 138, 143, + 151, -263, 149, 605, 605, -263, -263, -263, 962, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, 152, 153, 154, 156, 157, -263, -263, 1292, + -263, -263, -263, -263, 3, 1861, 49, 172, 1901, 52, + 173, 1941, 1980, 178, 2134, 1180, -263, 122, -263, 1180, + -263, 1038, 2086, -263, 1180, 202, 1180, 29, -38, 1180, + 127, 175, 176, -263, -263, -263, -263, 2121, -263, 1180, + 1180, 1180, -263, -263, -2, -2, -263, -263, -263, -263, + -263, -263, -263, 186, 188, 189, 193, -263, -263, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 187, -263, 1180, 190, -263, 1180, 194, 1180, 198, 2134, + 75, -263, -263, 1543, 200, 1577, 184, -263, -263, -263, + 1341, 1, 1611, -263, -263, -263, 83, 85, 1176, 1180, + 1180, 1180, 1180, 2134, 2134, 2134, 2134, 2134, 2134, 2134, + 2134, 2134, 2134, 2134, 201, 86, 204, 89, 206, 1645, + 1180, -263, 1089, 1180, 1089, 1180, 1180, -38, 54, 197, + 199, 1679, 1421, 1465, 1509, 1180, -263, 1180, -263, 1180, + -263, 106, 235, 1713, -263, 2134, 203, 1747, 232, -263, + -263, -263, 207, 209, 1180, 210, 1180, 212, 1180, 107, + 113, 114, -263, 1089, 213, 29, 1089, 1180, -263, -263, + 227, -263, 228, -263, 231, -263, -263, -263, -263, -263, + 237, -263, 1781, 226, 230, 233, 1089, 1089, -263, -263, + -263, -263, -263 }; const unsigned char @@ -3810,483 +3777,470 @@ namespace xsk { namespace gsc { namespace iw6 { 3, 12, 13, 0, 0, 0, 202, 0, 2, 7, 8, 9, 14, 15, 16, 0, 203, 204, 0, 0, 0, 1, 4, 5, 6, 173, 0, 10, 11, 206, - 0, 0, 172, 201, 0, 0, 193, 0, 217, 216, + 0, 0, 172, 201, 0, 0, 193, 0, 214, 213, 195, 196, 197, 198, 199, 0, 175, 0, 0, 0, - 0, 0, 205, 207, 210, 212, 213, 214, 215, 0, - 87, 88, 89, 126, 127, 128, 129, 156, 157, 130, - 131, 132, 133, 134, 135, 0, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 0, 146, 147, 148, - 149, 150, 151, 152, 153, 0, 0, 0, 0, 204, - 0, 0, 204, 0, 0, 0, 175, 194, 177, 0, - 174, 178, 155, 154, 209, 211, 200, 18, 0, 0, + 0, 0, 205, 207, 210, 212, 0, 87, 88, 89, + 126, 127, 128, 129, 156, 157, 130, 131, 132, 133, + 134, 135, 0, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 152, 153, 0, 0, 0, 0, 204, 0, 0, 204, + 0, 0, 0, 175, 194, 177, 0, 174, 178, 155, + 154, 209, 211, 200, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 182, 0, 0, - 158, 159, 204, 0, 175, 0, 17, 0, 19, 171, - 0, 175, 0, 0, 175, 0, 0, 183, 0, 177, - 0, 170, 0, 119, 120, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, - 125, 0, 181, 0, 0, 174, 179, 0, 0, 0, + 0, 0, 0, 0, 182, 0, 0, 158, 159, 204, + 0, 175, 0, 17, 0, 19, 171, 0, 175, 0, + 0, 175, 0, 0, 183, 0, 177, 0, 170, 0, + 119, 120, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 121, 122, 123, 124, 125, 0, 181, + 0, 0, 174, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 0, 0, 0, 50, 20, - 21, 0, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 0, 0, 0, 184, 185, - 186, 187, 0, 188, 189, 190, 191, 192, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 176, 0, 180, - 0, 160, 175, 46, 0, 0, 68, 0, 0, 0, - 54, 0, 0, 0, 0, 0, 79, 80, 81, 83, - 0, 84, 175, 175, 0, 184, 185, 103, 105, 47, - 49, 57, 58, 59, 55, 56, 0, 0, 0, 0, - 104, 106, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 162, 175, 0, 164, 175, 0, - 0, 0, 107, 0, 45, 63, 0, 0, 0, 0, - 51, 52, 53, 0, 0, 0, 78, 77, 82, 0, - 0, 0, 0, 0, 0, 0, 92, 98, 99, 100, - 101, 102, 93, 94, 95, 97, 96, 0, 0, 0, - 0, 0, 0, 175, 161, 0, 0, 0, 91, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 175, 163, - 175, 165, 175, 208, 0, 69, 0, 71, 90, 0, - 0, 0, 76, 85, 86, 0, 0, 175, 0, 175, - 0, 175, 0, 0, 0, 166, 0, 0, 54, 0, - 0, 60, 62, 174, 65, 174, 67, 174, 167, 168, - 169, 70, 72, 0, 74, 0, 0, 0, 0, 0, - 0, 61, 64, 66, 73, 75 + 0, 48, 0, 0, 0, 50, 20, 21, 0, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 0, 0, 0, 184, 185, 186, 187, 0, + 188, 189, 190, 191, 192, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 0, 180, 0, 160, 175, + 46, 0, 0, 68, 0, 0, 0, 54, 0, 0, + 0, 0, 0, 79, 80, 81, 83, 0, 84, 175, + 175, 0, 184, 185, 103, 105, 47, 49, 57, 58, + 59, 55, 56, 0, 0, 0, 0, 104, 106, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 162, 175, 0, 164, 175, 0, 0, 0, 107, + 0, 45, 63, 0, 0, 0, 0, 51, 52, 53, + 0, 0, 0, 78, 77, 82, 0, 0, 0, 0, + 0, 0, 0, 92, 98, 99, 100, 101, 102, 93, + 94, 95, 97, 96, 0, 0, 0, 0, 0, 0, + 175, 161, 0, 0, 0, 91, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 175, 163, 175, 165, 175, + 208, 0, 69, 0, 71, 90, 0, 0, 0, 76, + 85, 86, 0, 0, 175, 0, 175, 0, 175, 0, + 0, 0, 166, 0, 0, 54, 0, 0, 60, 62, + 174, 65, 174, 67, 174, 167, 168, 169, 70, 72, + 0, 74, 0, 0, 0, 0, 0, 0, 61, 64, + 66, 73, 75 }; const short parser::yypgoto_[] = { - -261, -261, -261, 267, 274, 275, -261, -261, -261, -175, - -261, -94, 98, -124, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, 187, -261, -260, - -259, -255, -261, -261, -261, -261, -261, -128, -37, -70, - -66, -261, -261, 425, -45, -261, -26, 157, -261, -261, - 241, -261, -261, -261, 255, 273, 329, 361, -261, -261, - 0, 9, -261, -14, -261, -261, -261, 93, -261, -261 + -263, -263, -263, 279, 281, 282, -263, -263, -263, -181, + -263, -91, 108, -114, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, 185, -263, -262, + -257, -251, -263, -263, -263, -263, -263, -82, 70, -66, + -61, -263, -263, -120, -45, -263, 181, 192, -263, -263, + 253, -263, -263, -263, 327, 365, 373, 421, -263, -263, + 0, 9, -263, -11, -263, -263, -263, 102, -263, -263 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 208, - 209, 210, 211, 329, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 108, 389, 235, - 236, 237, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 31, 109, 185, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 205, + 206, 207, 208, 326, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 105, 386, 232, + 233, 234, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 31, 106, 182, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 30, 98, 15, 141, - 330, 331, 18, 19, 101, 332, 268, 27, 369, 238, - 1, 2, 3, 4, 5, 32, 25, 16, 6, 34, - 35, 20, 37, 144, 99, 102, 290, 41, 42, 43, - 44, -204, 21, 100, 103, 205, 370, 111, 16, 6, - 114, 115, 26, 206, 207, 16, 6, -192, -192, 238, - -192, 110, 96, 238, -192, 119, 120, 97, 28, 144, - 134, 135, 136, -192, 29, 142, -192, -204, 285, 285, - 261, 6, 95, 238, 143, 160, 16, 6, 104, 290, - 116, 132, 133, 134, 135, 136, 145, 149, 147, 314, - -184, -184, 146, -184, 160, 150, 6, -184, 317, 151, - 239, 152, 273, 160, -192, -192, -184, 153, 29, -184, - 154, 240, 55, 56, 57, 58, 364, 372, 373, 379, - 381, 160, 160, 160, 160, 160, 238, 156, 405, 182, - 155, 418, 285, 160, 160, 186, 160, 247, 330, 331, - 239, 161, 250, 332, 239, 253, 143, -184, -184, 419, - 144, 240, 420, 183, 160, 240, 262, 160, 267, 286, - 286, 269, 140, 266, 239, 270, 141, 271, 272, 276, - 240, 240, 274, 260, 277, 240, 278, 247, 282, 281, - 385, 247, 387, 283, 284, 291, 143, 292, 315, 293, - 143, 294, 295, 318, 321, 115, 247, 247, 327, 342, - 336, 247, 343, 59, 344, 143, 143, 140, 140, 337, - 143, 141, 141, 345, 357, 359, 361, 239, 363, 366, - 406, 421, 105, 286, 424, 112, 113, 238, 240, 238, - 378, 368, 142, 380, 240, 132, 133, 134, 135, 136, - 382, 143, 393, 410, 434, 435, 394, 408, 411, 412, - 426, 414, 416, 140, 247, 422, 427, 141, 428, 429, - 247, 334, 431, 143, 432, 22, 433, 392, 238, 143, - 285, 238, 23, 24, 423, 264, 0, 142, 142, 275, - 0, 0, 0, 159, 0, 0, 143, 143, 0, 0, - 0, 238, 238, 0, 241, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 0, 181, 0, 0, 239, 0, - 239, 0, 0, 142, 0, 0, 0, 248, 0, 240, - 251, 240, 143, 254, 241, 255, 0, 257, 241, 0, - 0, 0, 413, 0, 415, 0, 417, 0, 0, 0, - 0, 0, 0, 241, 241, 247, 0, 247, 241, 239, - 391, 286, 239, 0, 143, 265, 143, 0, -185, -185, - 240, -185, 240, 240, 0, -185, 0, 280, 242, 0, - 0, 0, 239, 239, -185, 0, 0, -185, 0, 0, - 0, 0, 243, 240, 240, 0, 247, 0, 247, 247, - 0, 0, 0, 0, 0, 143, 0, 143, 143, 0, - 244, 241, 0, 0, 0, 0, 0, 241, 242, 247, - 247, 0, 242, 0, 0, -185, -185, 0, 143, 143, - 0, 0, 243, 0, 0, 322, 243, 287, 288, 0, - 0, 0, 242, 0, 326, 0, 328, 0, 0, 335, - 244, 243, 243, 0, 244, 0, 243, 0, 0, 34, - 35, 341, 37, 0, 0, 0, 245, 0, 0, 244, - 244, 0, 0, 0, 244, 138, 0, 0, 139, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 0, 0, 0, 0, 0, 242, 0, 362, 246, 0, - 0, 333, 0, 0, 0, 0, 245, 0, 0, 243, - 245, 0, 241, 0, 241, 243, 16, 6, 0, 374, - 375, 376, 377, 0, 0, 245, 245, 244, -186, -186, - 245, -186, 0, 244, 0, -186, 0, 0, 246, 0, - 0, 0, 246, 386, -186, 388, 390, -186, 0, 0, - 0, 0, 0, 241, 0, 241, 241, 246, 246, 184, - 0, 0, 246, 0, 0, 0, 249, 0, 0, 252, - 0, 0, 0, 0, 0, 0, 241, 241, 0, 0, - 0, 0, 0, 245, 0, -186, -186, 425, 0, 245, - 0, 34, 35, 0, 37, 0, 242, 0, 242, 41, - 42, 43, 44, 0, 0, 0, 0, 205, 0, 0, - 243, 0, 243, 0, 0, 246, 0, 0, 0, 0, - 0, 246, 0, 0, 0, 0, 0, 0, 244, 0, - 244, 0, 0, 0, 0, 0, 0, 242, 0, 333, - 242, 296, 297, 0, 298, 299, 0, 0, 16, 6, - 0, 243, 0, 243, 243, 0, 0, 0, 0, 0, - 242, 242, 0, 34, 35, 0, 37, 0, 0, 244, - 0, 244, 244, 0, 243, 243, 0, 323, 0, 138, - 0, 0, 139, 0, 245, 0, 245, 300, 301, 0, - 0, 0, 244, 244, 0, 0, 0, 339, 340, 0, - 0, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 0, 0, 0, 0, 246, 0, 246, 0, - 16, 6, 0, 0, 0, 245, 0, 245, 245, 0, - 358, -187, -187, 360, -187, 0, 0, 0, -187, 0, - 0, 0, 0, 0, 0, 0, 0, -187, 245, 245, - -187, 0, 0, 0, 0, 34, 35, 246, 37, 246, - 246, 0, 137, -188, -188, 0, -188, 0, 0, 0, - -188, 138, 0, 0, 139, 33, 0, 0, 384, -188, - 246, 246, -188, 0, 0, 0, 0, 0, -187, -187, - 0, 0, 0, 402, 0, 403, 0, 404, 34, 35, - 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, - 45, 0, 16, 6, 106, 107, 0, 0, 47, 0, - -188, -188, -189, -189, 0, -189, 0, 0, 0, -189, - 0, 0, 0, 0, 48, 49, 0, 0, -189, 0, - 0, -189, 33, 0, 0, 0, 0, 0, 0, 0, - 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, - 54, 55, 56, 57, 58, 34, 35, 36, 37, 38, - 39, 40, 0, 41, 42, 43, 44, 45, 0, -189, - -189, 46, 0, 0, 0, 47, 0, 279, -190, -190, - 0, -190, 0, 0, 0, -190, -191, -191, 0, -191, - 0, 48, 49, -191, -190, 0, 0, -190, 0, 33, - 0, 0, -191, 0, 0, -191, 0, 0, 50, 0, - 0, 51, 16, 6, 29, 52, 53, 54, 55, 56, - 57, 58, 34, 35, 36, 37, 38, 39, 40, 0, - 41, 42, 43, 44, 45, -190, -190, 0, 46, 0, - 0, 0, 47, -191, -191, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, - 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, - 0, 0, 0, 0, 0, 50, 0, 0, 51, 16, - 6, 29, 52, 53, 54, 55, 56, 57, 58, 34, - 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 44, 45, 256, 0, 0, 106, 0, 0, 118, 47, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 48, 49, 0, 0, 0, - 0, 0, 0, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 50, 0, 0, 51, 16, 6, 29, 52, - 53, 54, 55, 56, 57, 58, 187, 0, 0, 0, - 0, 0, 0, 0, 188, 0, 0, 189, 190, 0, - 191, 192, 193, 194, 0, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 34, 35, 0, 37, 0, 0, - 0, 0, 41, 42, 43, 44, 119, 120, 147, 204, - 205, 0, 125, 126, 127, 128, 0, 0, 206, 207, + 15, 107, 145, 17, 17, 327, 137, 265, 15, 30, + 328, 138, 18, 19, 95, 20, 329, -184, -184, 21, + -184, 181, 366, 98, -184, 32, 25, 287, 246, 34, + 35, 249, 37, -184, 96, 99, -184, 1, 2, 3, + 4, 5, 29, 97, 100, 135, 141, 108, 136, 27, + 367, 6, 26, 101, -204, 16, 6, 28, 107, 92, + 34, 35, 235, 37, 16, 6, 16, 6, 41, 42, + 43, 44, 139, 113, -184, -184, 202, 93, 111, 112, + 287, 140, 94, 142, 203, 204, 16, 6, -192, -192, + 143, -192, 258, 311, 146, -192, 314, 157, 157, 144, + 141, 157, 235, 147, -192, 270, 235, -192, -204, -185, + -185, 29, -185, 149, 148, 55, -185, 16, 6, 361, + 150, 282, 282, 6, 157, -185, 235, 369, -185, 370, + 376, 151, 157, 378, 157, 157, 179, 141, 157, 320, + 153, 152, 183, 327, 244, -192, -192, 157, 328, 247, + 402, 415, 250, 140, 329, 157, 157, 416, 417, 336, + 337, 180, 157, 157, 158, 259, -185, -185, 264, 131, + 132, 133, 263, 137, 266, 267, 268, 269, 138, 235, + 257, 382, 271, 384, 244, 282, 279, 273, 244, 274, + 275, 278, 355, 140, 280, 357, 281, 140, 129, 130, + 131, 132, 133, 244, 244, 288, 289, 290, 244, 291, + 292, 56, 140, 140, 236, 312, 315, 140, 137, 137, + 324, 112, 418, 138, 138, 421, 318, 333, 334, 339, + 102, 340, 341, 109, 110, 354, 342, 365, 356, 139, + 381, 360, 358, 363, 375, 431, 432, 377, 140, 379, + 390, 403, 391, 407, 236, 399, 405, 400, 236, 401, + 408, 244, 409, 411, 137, 413, 419, 244, 331, 138, + 140, 423, 424, 283, 283, 425, 140, 389, 236, 428, + 235, 426, 235, 429, 139, 139, 430, 22, 156, 23, + 24, 420, 261, 140, 140, 272, 0, 0, 0, 0, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 0, + 178, 235, 0, 282, 235, 237, 0, 0, 116, 117, + 139, 236, 245, 0, 0, 248, 238, 283, 251, 140, + 252, 0, 254, 0, 235, 235, 0, 0, 0, 410, + 0, 412, 0, 414, 129, 130, 131, 132, 133, 0, + 0, 0, 244, 0, 244, 237, 0, 388, 0, 237, + 262, 140, 0, 140, 0, 0, 238, 0, 0, 0, + 238, 0, 277, 0, 237, 237, 0, 0, 0, 237, + 0, 0, 0, 0, 0, 238, 238, 239, 0, 0, + 238, 0, 0, 244, 0, 244, 244, 0, 0, 0, + 0, 0, 140, 0, 140, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 244, 244, 0, 0, + 0, 0, 236, 0, 236, 140, 140, 239, 0, 0, + 319, 239, 237, 0, 0, 0, 0, 0, 237, 323, + 0, 325, 0, 238, 332, 0, 284, 285, 0, 238, + 0, 239, 0, 0, 0, 0, 338, 0, 0, 0, + 0, 240, 0, 236, 0, 283, 236, 0, 0, 0, + 0, 0, 0, 0, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 0, 236, 236, 0, 0, + 0, 0, 359, 0, 0, 0, 0, 0, 0, 241, + 0, 240, 0, 0, 239, 240, 0, 242, 0, 0, + 330, 0, 0, 0, 371, 372, 373, 374, 0, 0, + 240, 240, 0, 0, 0, 240, 0, 0, 0, 0, + 0, 0, 0, 237, 0, 237, 0, 0, 383, 241, + 385, 387, 0, 241, 238, 0, 238, 242, 0, 0, + 0, 242, 0, -186, -186, 243, -186, 0, 241, 241, + -186, 0, 0, 241, 0, 0, 242, 242, 0, -186, + 0, 242, -186, 0, 237, 0, 237, 237, 240, 0, + 0, 0, 422, 0, 240, 238, 0, 238, 238, 0, + 0, 0, 0, 0, 0, 243, 0, 237, 237, 243, + 0, 0, 0, 0, 0, 239, 0, 239, 238, 238, + -186, -186, 0, 0, 243, 243, 241, 0, 0, 243, + 0, 0, 241, 0, 242, 0, 34, 35, 33, 37, + 242, 0, 0, 0, 41, 42, 43, 44, 0, 0, + 0, 0, 202, 0, 0, 0, 239, 0, 330, 239, + 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 103, 104, 239, + 239, 47, 243, -187, -187, 0, -187, 0, 243, 240, + -187, 240, 0, 16, 6, 0, 0, 48, 49, -187, + 0, 0, -187, 0, 0, 0, 0, 0, 0, 34, + 35, 0, 37, 0, 50, 0, 134, 51, 16, 6, + 29, 52, 53, 54, 55, 135, 0, 241, 136, 241, + 240, 0, 240, 240, 0, 242, 0, 242, 0, 0, + -187, -187, 0, 0, -188, -188, 0, -188, 0, 0, + 0, -188, 0, 240, 240, 0, 0, 0, -189, -189, + -188, -189, 0, -188, 0, -189, 16, 6, 241, 0, + 241, 241, 0, 0, -189, 0, 242, -189, 242, 242, + 0, 0, 0, 243, 0, 243, 0, -190, -190, 0, + -190, 241, 241, 0, -190, 0, 0, 0, 0, 242, + 242, -188, -188, -190, 116, 117, -190, 0, 120, 121, + 122, 123, 124, 125, 0, -189, -189, 0, 0, 0, + 0, 0, 0, 0, 243, 0, 243, 243, 127, 128, + 129, 130, 131, 132, 133, 0, 0, 0, 184, 0, + 0, 0, 0, 0, -190, -190, 185, 243, 243, 186, + 187, 0, 188, 189, 190, 191, 0, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 34, 35, 0, 37, + 0, 0, 0, 0, 41, 42, 43, 44, 0, 0, + 144, 201, 202, 0, 0, 0, 0, 0, 0, 0, + 203, 204, 0, 0, 0, 0, 0, -191, -191, 0, + -191, 0, 0, 0, -191, 0, 0, 0, 0, 0, + 0, 0, 0, -191, 184, 260, -191, 0, 0, 0, + 0, 0, 185, 16, 6, 186, 187, 0, 188, 189, + 190, 191, 0, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 34, 35, 0, 37, 0, 0, 0, 0, + 41, 42, 43, 44, -191, -191, 144, 0, 202, 0, + 0, 0, 0, 0, 0, 184, 203, 204, 0, 0, + 0, 0, 0, 185, 0, 0, 186, 187, 0, 188, + 189, 190, 191, 0, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 34, 35, 0, 37, 0, 0, 16, + 6, 41, 42, 43, 44, 116, 117, 144, 286, 202, + 0, 122, 123, 124, 125, 0, 0, 203, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136, 0, 0, 0, - 0, 0, 187, 263, 0, 0, 0, 0, 0, 0, - 188, 16, 6, 189, 190, 0, 191, 192, 193, 194, - 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 34, 35, 0, 37, 0, 0, 0, 0, 41, 42, - 43, 44, 0, 0, 147, 0, 205, 0, 0, 0, - 0, 0, 0, 187, 206, 207, 0, 0, 0, 0, - 0, 188, 0, 0, 189, 190, 0, 191, 192, 193, - 194, 0, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 34, 35, 0, 37, 0, 0, 16, 6, 41, - 42, 43, 44, 0, 0, 147, 289, 205, 0, 0, - 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, + 0, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 184, 321, 0, 0, 0, 0, 0, 0, 185, + 16, 6, 186, 187, 0, 188, 189, 190, 191, 0, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 34, + 35, 0, 37, 0, 0, 0, 0, 41, 42, 43, + 44, 0, 0, 144, 0, 202, 0, 0, 0, 0, + 0, 0, 184, 203, 204, 0, 0, 0, 0, 0, + 185, 0, 0, 186, 187, 0, 188, 189, 190, 191, + 0, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 34, 35, 0, 37, 33, 0, 16, 6, 41, 42, + 43, 44, 0, 0, 144, 0, 202, 0, 0, 0, + 0, 0, 0, 0, 203, 204, 0, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, + 0, 0, 0, 46, 0, 0, 0, 47, 0, 276, + 0, 0, 0, 0, 0, 0, 0, 16, 6, 0, + 0, 0, 0, 48, 49, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, - 324, 0, 0, 0, 0, 0, 0, 188, 16, 6, - 189, 190, 0, 191, 192, 193, 194, 0, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 34, 35, 0, - 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, - 0, 147, 0, 205, 0, 0, 0, 0, 0, 0, - 187, 206, 207, 0, 0, 0, 0, 0, 188, 0, - 0, 189, 190, 0, 191, 192, 193, 194, 0, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 34, 35, - 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, - 0, 0, 147, 0, 205, 0, 0, 0, 0, 0, - 0, 0, 206, 207, 34, 35, 0, 37, 0, 0, + 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 253, 0, 0, 46, 0, 0, + 115, 47, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 48, 49, 0, + 0, 0, 33, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 103, 0, 0, 0, 47, 0, 0, 0, 0, + 0, 293, 294, 0, 295, 296, 0, 0, 0, 0, + 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 34, 35, 0, 37, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 135, + 0, 0, 136, 0, 0, 0, 0, 297, 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 138, 0, 0, 139, 0, 0, 0, 0, 300, 301, - 0, 0, 0, 0, 0, 16, 6, 0, 0, 0, - 0, 0, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 157, 0, 0, 0, 0, 158, 0, - 0, 16, 6, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, + 0, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 34, 35, 0, 37, 0, 0, 116, 117, + 16, 6, 120, 121, 122, 123, 124, 125, 135, 0, + 0, 136, 0, 0, 0, 0, 297, 298, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 154, 0, 0, 0, 0, 155, 0, 0, 16, + 6, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 393, 0, 0, 0, 0, + 394, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 395, + 0, 0, 0, 0, 396, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 397, 0, 0, 0, 0, 398, 0, + 0, 0, 0, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 362, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 364, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 368, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 392, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 404, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 406, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 427, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 256, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 310, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 313, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 316, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 317, + 0, 0, 0, 0, 115, 0, 0, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 126, 127, 128, 129, 130, 131, 132, 133, 255, 0, + 115, 0, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 114, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 322, + 115, 0, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 335, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 115, 0, + 0, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 0, 0, 126, 127, 128, 129, 130, 131, + 132, 133, 116, 117, 0, 119, 120, 121, 122, 123, + 124, 125, 116, 117, 0, 0, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 0, 0, 0, 127, 0, 129, 130, + 131, 132, 133, 116, 117, 0, 0, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 396, 0, 0, - 0, 0, 397, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 398, 0, 0, 0, 0, 399, 0, 0, 0, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 400, 0, 0, 0, 0, - 401, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 367, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 371, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 383, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 395, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 407, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 409, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 430, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 259, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 313, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 316, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 319, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 320, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 117, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 325, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 338, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 122, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 119, 120, 0, 0, 123, - 124, 125, 126, 127, 128, 119, 120, 0, 0, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 130, - 131, 132, 133, 134, 135, 136, 0, 0, 0, 130, - 0, 132, 133, 134, 135, 136, 119, 120, 0, 0, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136 + 130, 131, 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 20, 47, 8, 75, - 270, 270, 3, 4, 47, 270, 191, 53, 21, 147, - 3, 4, 5, 6, 7, 25, 43, 88, 89, 31, - 32, 43, 34, 43, 34, 35, 211, 39, 40, 41, - 42, 51, 0, 34, 35, 47, 49, 47, 88, 89, - 93, 94, 69, 55, 56, 88, 89, 31, 32, 187, - 34, 106, 44, 191, 38, 57, 58, 49, 53, 43, - 85, 86, 87, 47, 90, 75, 50, 51, 206, 207, - 44, 89, 44, 211, 75, 49, 88, 89, 47, 264, - 89, 83, 84, 85, 86, 87, 51, 97, 45, 44, - 31, 32, 53, 34, 49, 47, 89, 38, 44, 43, - 147, 51, 84, 49, 88, 89, 47, 47, 90, 50, - 43, 147, 94, 95, 96, 97, 44, 44, 44, 44, - 44, 49, 49, 49, 49, 49, 264, 47, 44, 139, - 51, 44, 270, 49, 49, 145, 49, 147, 408, 408, - 187, 48, 152, 408, 191, 155, 147, 88, 89, 44, - 43, 187, 44, 51, 49, 191, 43, 49, 43, 206, - 207, 43, 242, 53, 211, 43, 242, 43, 43, 52, - 206, 207, 196, 183, 53, 211, 53, 187, 43, 53, - 365, 191, 367, 43, 47, 53, 187, 53, 43, 53, - 191, 53, 53, 43, 48, 94, 206, 207, 18, 43, - 52, 211, 43, 26, 43, 206, 207, 287, 288, 52, - 211, 287, 288, 43, 48, 48, 48, 264, 43, 43, - 16, 406, 45, 270, 409, 48, 49, 365, 264, 367, - 43, 53, 242, 43, 270, 83, 84, 85, 86, 87, - 43, 242, 53, 21, 429, 430, 53, 53, 53, 53, - 44, 53, 53, 333, 264, 53, 44, 333, 44, 44, - 270, 271, 53, 264, 53, 8, 53, 371, 406, 270, - 408, 409, 8, 8, 408, 187, -1, 287, 288, 196, - -1, -1, -1, 106, -1, -1, 287, 288, -1, -1, - -1, 429, 430, -1, 147, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, -1, 138, -1, -1, 365, -1, - 367, -1, -1, 333, -1, -1, -1, 150, -1, 365, - 153, 367, 333, 156, 187, 158, -1, 160, 191, -1, - -1, -1, 397, -1, 399, -1, 401, -1, -1, -1, - -1, -1, -1, 206, 207, 365, -1, 367, 211, 406, - 370, 408, 409, -1, 365, 188, 367, -1, 31, 32, - 406, 34, 408, 409, -1, 38, -1, 200, 147, -1, - -1, -1, 429, 430, 47, -1, -1, 50, -1, -1, - -1, -1, 147, 429, 430, -1, 406, -1, 408, 409, - -1, -1, -1, -1, -1, 406, -1, 408, 409, -1, - 147, 264, -1, -1, -1, -1, -1, 270, 187, 429, - 430, -1, 191, -1, -1, 88, 89, -1, 429, 430, - -1, -1, 187, -1, -1, 258, 191, 206, 207, -1, - -1, -1, 211, -1, 267, -1, 269, -1, -1, 272, - 187, 206, 207, -1, 191, -1, 211, -1, -1, 31, - 32, 284, 34, -1, -1, -1, 147, -1, -1, 206, - 207, -1, -1, -1, 211, 47, -1, -1, 50, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - -1, -1, -1, -1, -1, 264, -1, 320, 147, -1, - -1, 270, -1, -1, -1, -1, 187, -1, -1, 264, - 191, -1, 365, -1, 367, 270, 88, 89, -1, 342, - 343, 344, 345, -1, -1, 206, 207, 264, 31, 32, - 211, 34, -1, 270, -1, 38, -1, -1, 187, -1, - -1, -1, 191, 366, 47, 368, 369, 50, -1, -1, - -1, -1, -1, 406, -1, 408, 409, 206, 207, 144, - -1, -1, 211, -1, -1, -1, 151, -1, -1, 154, - -1, -1, -1, -1, -1, -1, 429, 430, -1, -1, - -1, -1, -1, 264, -1, 88, 89, 410, -1, 270, - -1, 31, 32, -1, 34, -1, 365, -1, 367, 39, - 40, 41, 42, -1, -1, -1, -1, 47, -1, -1, - 365, -1, 367, -1, -1, 264, -1, -1, -1, -1, - -1, 270, -1, -1, -1, -1, -1, -1, 365, -1, - 367, -1, -1, -1, -1, -1, -1, 406, -1, 408, - 409, 9, 10, -1, 12, 13, -1, -1, 88, 89, - -1, 406, -1, 408, 409, -1, -1, -1, -1, -1, - 429, 430, -1, 31, 32, -1, 34, -1, -1, 406, - -1, 408, 409, -1, 429, 430, -1, 262, -1, 47, - -1, -1, 50, -1, 365, -1, 367, 55, 56, -1, - -1, -1, 429, 430, -1, -1, -1, 282, 283, -1, - -1, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, -1, -1, -1, -1, 365, -1, 367, -1, - 88, 89, -1, -1, -1, 406, -1, 408, 409, -1, - 315, 31, 32, 318, 34, -1, -1, -1, 38, -1, - -1, -1, -1, -1, -1, -1, -1, 47, 429, 430, - 50, -1, -1, -1, -1, 31, 32, 406, 34, 408, - 409, -1, 38, 31, 32, -1, 34, -1, -1, -1, - 38, 47, -1, -1, 50, 8, -1, -1, 363, 47, - 429, 430, 50, -1, -1, -1, -1, -1, 88, 89, - -1, -1, -1, 378, -1, 380, -1, 382, 31, 32, - 33, 34, 35, 36, 37, -1, 39, 40, 41, 42, - 43, -1, 88, 89, 47, 48, -1, -1, 51, -1, - 88, 89, 31, 32, -1, 34, -1, -1, -1, 38, - -1, -1, -1, -1, 67, 68, -1, -1, 47, -1, - -1, 50, 8, -1, -1, -1, -1, -1, -1, -1, - -1, 84, -1, -1, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, 88, - 89, 47, -1, -1, -1, 51, -1, 53, 31, 32, - -1, 34, -1, -1, -1, 38, 31, 32, -1, 34, - -1, 67, 68, 38, 47, -1, -1, 50, -1, 8, - -1, -1, 47, -1, -1, 50, -1, -1, 84, -1, - -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 31, 32, 33, 34, 35, 36, 37, -1, - 39, 40, 41, 42, 43, 88, 89, -1, 47, -1, - -1, -1, 51, 88, 89, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, - -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, - -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 31, - 32, 33, 34, 35, 36, 37, -1, 39, 40, 41, - 42, 43, 48, -1, -1, 47, -1, -1, 54, 51, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, 67, 68, -1, -1, -1, - -1, -1, -1, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 84, -1, -1, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 3, -1, -1, -1, - -1, -1, -1, -1, 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, 57, 58, 45, 46, - 47, -1, 63, 64, 65, 66, -1, -1, 55, 56, + 0, 46, 93, 3, 4, 267, 72, 188, 8, 20, + 267, 72, 3, 4, 47, 43, 267, 31, 32, 0, + 34, 141, 21, 47, 38, 25, 43, 208, 148, 31, + 32, 151, 34, 47, 34, 35, 50, 3, 4, 5, + 6, 7, 90, 34, 35, 47, 43, 47, 50, 53, + 49, 89, 69, 47, 51, 88, 89, 53, 103, 44, + 31, 32, 144, 34, 88, 89, 88, 89, 39, 40, + 41, 42, 72, 89, 88, 89, 47, 44, 93, 94, + 261, 72, 49, 51, 55, 56, 88, 89, 31, 32, + 53, 34, 44, 44, 94, 38, 44, 49, 49, 45, + 43, 49, 184, 47, 47, 84, 188, 50, 51, 31, + 32, 90, 34, 51, 43, 94, 38, 88, 89, 44, + 47, 203, 204, 89, 49, 47, 208, 44, 50, 44, + 44, 43, 49, 44, 49, 49, 136, 43, 49, 259, + 47, 51, 142, 405, 144, 88, 89, 49, 405, 149, + 44, 44, 152, 144, 405, 49, 49, 44, 44, 279, + 280, 51, 49, 49, 48, 43, 88, 89, 43, 85, + 86, 87, 53, 239, 43, 43, 43, 43, 239, 261, + 180, 362, 193, 364, 184, 267, 43, 52, 188, 53, + 53, 53, 312, 184, 43, 315, 47, 188, 83, 84, + 85, 86, 87, 203, 204, 53, 53, 53, 208, 53, + 53, 26, 203, 204, 144, 43, 43, 208, 284, 285, + 18, 94, 403, 284, 285, 406, 48, 52, 52, 43, + 45, 43, 43, 48, 49, 48, 43, 53, 48, 239, + 360, 43, 48, 43, 43, 426, 427, 43, 239, 43, + 53, 16, 53, 21, 184, 375, 53, 377, 188, 379, + 53, 261, 53, 53, 330, 53, 53, 267, 268, 330, + 261, 44, 44, 203, 204, 44, 267, 368, 208, 53, + 362, 44, 364, 53, 284, 285, 53, 8, 103, 8, + 8, 405, 184, 284, 285, 193, -1, -1, -1, -1, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, + 135, 403, -1, 405, 406, 144, -1, -1, 57, 58, + 330, 261, 147, -1, -1, 150, 144, 267, 153, 330, + 155, -1, 157, -1, 426, 427, -1, -1, -1, 394, + -1, 396, -1, 398, 83, 84, 85, 86, 87, -1, + -1, -1, 362, -1, 364, 184, -1, 367, -1, 188, + 185, 362, -1, 364, -1, -1, 184, -1, -1, -1, + 188, -1, 197, -1, 203, 204, -1, -1, -1, 208, + -1, -1, -1, -1, -1, 203, 204, 144, -1, -1, + 208, -1, -1, 403, -1, 405, 406, -1, -1, -1, + -1, -1, 403, -1, 405, 406, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 426, 427, -1, -1, + -1, -1, 362, -1, 364, 426, 427, 184, -1, -1, + 255, 188, 261, -1, -1, -1, -1, -1, 267, 264, + -1, 266, -1, 261, 269, -1, 203, 204, -1, 267, + -1, 208, -1, -1, -1, -1, 281, -1, -1, -1, + -1, 144, -1, 403, -1, 405, 406, -1, -1, -1, + -1, -1, -1, -1, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, -1, 426, 427, -1, -1, + -1, -1, 317, -1, -1, -1, -1, -1, -1, 144, + -1, 184, -1, -1, 261, 188, -1, 144, -1, -1, + 267, -1, -1, -1, 339, 340, 341, 342, -1, -1, + 203, 204, -1, -1, -1, 208, -1, -1, -1, -1, + -1, -1, -1, 362, -1, 364, -1, -1, 363, 184, + 365, 366, -1, 188, 362, -1, 364, 184, -1, -1, + -1, 188, -1, 31, 32, 144, 34, -1, 203, 204, + 38, -1, -1, 208, -1, -1, 203, 204, -1, 47, + -1, 208, 50, -1, 403, -1, 405, 406, 261, -1, + -1, -1, 407, -1, 267, 403, -1, 405, 406, -1, + -1, -1, -1, -1, -1, 184, -1, 426, 427, 188, + -1, -1, -1, -1, -1, 362, -1, 364, 426, 427, + 88, 89, -1, -1, 203, 204, 261, -1, -1, 208, + -1, -1, 267, -1, 261, -1, 31, 32, 8, 34, + 267, -1, -1, -1, 39, 40, 41, 42, -1, -1, + -1, -1, 47, -1, -1, -1, 403, -1, 405, 406, + -1, 31, 32, 33, 34, 35, 36, 37, -1, 39, + 40, 41, 42, 43, -1, -1, -1, 47, 48, 426, + 427, 51, 261, 31, 32, -1, 34, -1, 267, 362, + 38, 364, -1, 88, 89, -1, -1, 67, 68, 47, + -1, -1, 50, -1, -1, -1, -1, -1, -1, 31, + 32, -1, 34, -1, 84, -1, 38, 87, 88, 89, + 90, 91, 92, 93, 94, 47, -1, 362, 50, 364, + 403, -1, 405, 406, -1, 362, -1, 364, -1, -1, + 88, 89, -1, -1, 31, 32, -1, 34, -1, -1, + -1, 38, -1, 426, 427, -1, -1, -1, 31, 32, + 47, 34, -1, 50, -1, 38, 88, 89, 403, -1, + 405, 406, -1, -1, 47, -1, 403, 50, 405, 406, + -1, -1, -1, 362, -1, 364, -1, 31, 32, -1, + 34, 426, 427, -1, 38, -1, -1, -1, -1, 426, + 427, 88, 89, 47, 57, 58, 50, -1, 61, 62, + 63, 64, 65, 66, -1, 88, 89, -1, -1, -1, + -1, -1, -1, -1, 403, -1, 405, 406, 81, 82, + 83, 84, 85, 86, 87, -1, -1, -1, 3, -1, + -1, -1, -1, -1, 88, 89, 11, 426, 427, 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, -1, -1, -1, -1, -1, -1, + 55, 56, -1, -1, -1, -1, -1, 31, 32, -1, + 34, -1, -1, -1, 38, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 3, 4, 50, -1, -1, -1, + -1, -1, 11, 88, 89, 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, 88, 89, 45, -1, 47, -1, + -1, -1, -1, -1, -1, 3, 55, 56, -1, -1, + -1, -1, -1, 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, 88, + 89, 39, 40, 41, 42, 57, 58, 45, 46, 47, + -1, 63, 64, 65, 66, -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 83, 84, 85, 86, 87, -1, -1, -1, - -1, -1, 3, 4, -1, -1, -1, -1, -1, -1, - 11, 88, 89, 14, 15, -1, 17, 18, 19, 20, + -1, 83, 84, 85, 86, 87, -1, -1, -1, -1, + -1, 3, 4, -1, -1, -1, -1, -1, -1, 11, + 88, 89, 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, -1, 47, -1, -1, -1, -1, + -1, -1, 3, 55, 56, -1, -1, -1, -1, -1, + 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, + 31, 32, -1, 34, 8, -1, 88, 89, 39, 40, 41, 42, -1, -1, 45, -1, 47, -1, -1, -1, - -1, -1, -1, 3, 55, 56, -1, -1, -1, -1, - -1, 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, 88, 89, 39, - 40, 41, 42, -1, -1, 45, 46, 47, -1, -1, - -1, -1, -1, -1, -1, 55, 56, -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, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, 88, 89, -1, + -1, -1, -1, 67, 68, -1, -1, -1, 8, -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, 88, 89, - 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, -1, 47, -1, -1, -1, -1, -1, -1, - 3, 55, 56, -1, -1, -1, -1, -1, 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, 88, 89, 39, 40, 41, 42, - -1, -1, 45, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, 56, 31, 32, -1, 34, -1, -1, + 84, -1, -1, 87, 88, 89, 90, 91, 92, 93, + 94, 31, 32, 33, 34, 35, 36, 37, -1, 39, + 40, 41, 42, 43, 48, -1, -1, 47, -1, -1, + 54, 51, -1, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, -1, -1, -1, -1, 67, 68, -1, + -1, -1, 8, -1, -1, -1, 80, 81, 82, 83, + 84, 85, 86, 87, 84, -1, -1, 87, 88, 89, + 90, 91, 92, 93, 94, 31, 32, 33, 34, 35, + 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, + -1, 47, -1, -1, -1, 51, -1, -1, -1, -1, + -1, 9, 10, -1, 12, 13, -1, -1, -1, -1, + -1, 67, 68, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 31, 32, -1, 34, -1, 84, -1, + -1, 87, 88, 89, 90, 91, 92, 93, 94, 47, + -1, -1, 50, -1, -1, -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 47, -1, -1, 50, -1, -1, -1, -1, 55, 56, - -1, -1, -1, -1, -1, 88, 89, -1, -1, -1, - -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 44, -1, -1, -1, -1, 49, -1, - -1, 88, 89, 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, + -1, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 31, 32, -1, 34, -1, -1, 57, 58, + 88, 89, 61, 62, 63, 64, 65, 66, 47, -1, + -1, 50, -1, -1, -1, -1, 55, 56, -1, -1, + -1, 80, 81, 82, 83, 84, 85, 86, 87, -1, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 44, -1, -1, -1, -1, 49, -1, -1, 88, + 89, 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, 44, - -1, 80, 81, 82, 83, 84, 85, 86, 87, 54, + -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, + -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, @@ -4309,130 +4263,133 @@ namespace xsk { namespace gsc { namespace iw6 { 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, 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, -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, 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, -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, 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, -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, 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, -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, 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, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 52, -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, 53, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + -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, - -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, + 80, 81, 82, 83, 84, 85, 86, 87, 52, -1, 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, 80, 81, 82, - 83, 84, 85, 86, 87, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 66, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, 81, - -1, 83, 84, 85, 86, 87, 57, 58, -1, -1, - 61, 62, 63, 64, 65, 66, -1, -1, -1, -1, + 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, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 83, 84, 85, 86, 87 + -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, 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, -1, 83, 84, + 85, 86, 87, 57, 58, -1, -1, 61, 62, 63, + 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, + 84, 85, 86, 87 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 89, 108, 109, 110, - 111, 112, 113, 114, 115, 177, 88, 177, 178, 178, - 43, 0, 110, 111, 112, 43, 69, 53, 53, 90, - 180, 159, 177, 8, 31, 32, 33, 34, 35, 36, + 0, 3, 4, 5, 6, 7, 89, 105, 106, 107, + 108, 109, 110, 111, 112, 174, 88, 174, 175, 175, + 43, 0, 107, 108, 109, 43, 69, 53, 53, 90, + 177, 156, 174, 8, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 47, 51, 67, 68, - 84, 87, 91, 92, 93, 94, 95, 96, 97, 144, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 84, 87, 91, 92, 93, 94, 141, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 159, 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, 185, 186, 44, 44, 49, 47, 177, - 178, 47, 177, 178, 47, 144, 47, 48, 144, 160, - 161, 177, 144, 144, 93, 94, 89, 53, 54, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 80, - 81, 82, 83, 84, 85, 86, 87, 38, 47, 50, - 156, 157, 177, 178, 43, 51, 53, 45, 118, 177, - 47, 43, 51, 47, 43, 51, 47, 44, 49, 144, - 49, 48, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 177, 51, 160, 161, 177, 3, 11, 14, - 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 46, 47, 55, 56, 116, 117, - 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, + 182, 183, 44, 44, 49, 47, 174, 175, 47, 174, + 175, 47, 141, 47, 48, 141, 157, 158, 174, 141, + 141, 93, 94, 89, 53, 54, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, + 84, 85, 86, 87, 38, 47, 50, 153, 154, 174, + 175, 43, 51, 53, 45, 115, 174, 47, 43, 51, + 47, 43, 51, 47, 44, 49, 141, 49, 48, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 174, + 51, 157, 158, 174, 3, 11, 14, 15, 17, 18, + 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 46, 47, 55, 56, 113, 114, 115, 116, 118, + 119, 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, 48, 144, 52, 48, - 177, 44, 43, 4, 119, 144, 53, 43, 116, 43, - 43, 43, 43, 84, 180, 184, 52, 53, 53, 53, - 144, 53, 43, 43, 47, 154, 155, 167, 167, 46, - 116, 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, 144, 160, 4, 53, 144, 18, 144, 120, - 146, 147, 148, 167, 177, 144, 52, 52, 53, 160, - 160, 144, 43, 43, 43, 43, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 48, 160, 48, - 160, 48, 144, 43, 44, 44, 43, 44, 53, 21, - 49, 44, 44, 44, 144, 144, 144, 144, 43, 44, - 43, 44, 43, 44, 160, 116, 144, 116, 144, 145, - 144, 177, 118, 53, 53, 44, 44, 49, 44, 49, - 44, 49, 160, 160, 160, 44, 16, 44, 53, 44, - 21, 53, 53, 161, 53, 161, 53, 161, 44, 44, - 44, 116, 53, 120, 116, 144, 44, 44, 44, 44, - 44, 53, 53, 53, 116, 116 + 139, 140, 143, 144, 145, 151, 152, 160, 161, 164, + 168, 169, 170, 171, 174, 141, 157, 174, 141, 157, + 174, 141, 141, 48, 141, 52, 48, 174, 44, 43, + 4, 116, 141, 53, 43, 113, 43, 43, 43, 43, + 84, 177, 181, 52, 53, 53, 53, 141, 53, 43, + 43, 47, 151, 152, 164, 164, 46, 113, 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, 141, + 157, 4, 53, 141, 18, 141, 117, 143, 144, 145, + 164, 174, 141, 52, 52, 53, 157, 157, 141, 43, + 43, 43, 43, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 48, 157, 48, 157, 48, 141, + 43, 44, 44, 43, 44, 53, 21, 49, 44, 44, + 44, 141, 141, 141, 141, 43, 44, 43, 44, 43, + 44, 157, 113, 141, 113, 141, 142, 141, 174, 115, + 53, 53, 44, 44, 49, 44, 49, 44, 49, 157, + 157, 157, 44, 16, 44, 53, 44, 21, 53, 53, + 158, 53, 158, 53, 158, 44, 44, 44, 113, 53, + 117, 113, 141, 44, 44, 44, 44, 44, 53, 53, + 53, 113, 113 }; const unsigned char parser::yyr1_[] = { - 0, 107, 108, 108, 109, 109, 109, 109, 109, 109, - 110, 111, 112, 112, 112, 112, 112, 113, 114, 115, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 117, 117, 118, 118, 119, - 119, 120, 120, 120, 120, 121, 121, 122, 122, 122, - 123, 124, 124, 125, 126, 126, 127, 127, 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, 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, 184, 184, 184, 185, 186 + 0, 104, 105, 105, 106, 106, 106, 106, 106, 106, + 107, 108, 109, 109, 109, 109, 109, 110, 111, 112, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 114, 114, 115, 115, 116, + 116, 117, 117, 117, 117, 118, 118, 119, 119, 119, + 120, 121, 121, 122, 123, 123, 124, 124, 125, 126, + 127, 128, 129, 130, 131, 131, 132, 133, 133, 134, + 135, 136, 137, 137, 138, 139, 140, 141, 141, 141, + 142, 142, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 144, 144, 145, 145, 146, 147, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 149, 150, 151, 151, 152, 152, + 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, + 155, 156, 156, 156, 157, 157, 158, 158, 159, 159, + 160, 161, 162, 163, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 175, 176, 177, 178, 179, 180, + 180, 181, 181, 182, 183 }; const signed char @@ -4459,7 +4416,7 @@ namespace xsk { namespace gsc { namespace iw6 { 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 7, 2, - 1, 2, 1, 1, 1, 1, 1, 1 + 1, 2, 1, 1, 1 }; @@ -4469,28 +4426,28 @@ namespace xsk { namespace gsc { namespace iw6 { const short parser::yyrline_[] = { - 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, 708, 713, 718, 719, 720, 721, 722, 723, - 724, 725, 726, 730, 735, 740, 745, 750, 755, 760, - 765, 770, 775, 780, 782, 787, 792, 797, 802, 807, - 809, 814, 816, 818, 820, 822, 827, 832 + 0, 249, 249, 250, 254, 256, 258, 260, 262, 264, + 269, 273, 278, 279, 280, 281, 282, 286, 291, 296, + 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, + 414, 419, 424, 429, 434, 436, 441, 446, 448, 453, + 458, 463, 468, 470, 475, 480, 485, 490, 491, 492, + 496, 497, 501, 503, 505, 507, 509, 511, 513, 515, + 517, 519, 521, 526, 528, 533, 535, 540, 545, 547, + 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, + 569, 571, 573, 575, 577, 579, 584, 585, 586, 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, 615, 620, 625, 626, 629, 630, + 634, 636, 638, 640, 642, 644, 649, 651, 653, 655, + 660, 665, 667, 670, 674, 677, 681, 683, 688, 690, + 695, 700, 705, 710, 715, 716, 717, 718, 719, 720, + 721, 722, 723, 727, 732, 737, 742, 747, 752, 757, + 762, 767, 772, 777, 779, 784, 789, 794, 799, 804, + 806, 811, 813, 818, 823 }; void @@ -4523,9 +4480,9 @@ namespace xsk { namespace gsc { namespace iw6 { #line 13 "parser.ypp" } } } // xsk::gsc::iw6 -#line 4527 "parser.cpp" +#line 4484 "parser.cpp" -#line 836 "parser.ypp" +#line 827 "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 55a7308..9b39da7 100644 --- a/src/iw6/xsk/parser.hpp +++ b/src/iw6/xsk/parser.hpp @@ -621,10 +621,7 @@ namespace xsk { namespace gsc { namespace iw6 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy66[sizeof (std::string)]; }; @@ -768,19 +765,16 @@ namespace xsk { namespace gsc { namespace iw6 { ISTRING = 91, // "localized string" COLOR = 92, // "color" FLOAT = 93, // "float" - INT_DEC = 94, // "int" - INT_OCT = 95, // "octal int" - INT_BIN = 96, // "binary int" - INT_HEX = 97, // "hexadecimal int" - ADD_ARRAY = 98, // ADD_ARRAY - THEN = 99, // THEN - TERN = 100, // TERN - NEG = 101, // NEG - ANIMREF = 102, // ANIMREF - PREINC = 103, // PREINC - PREDEC = 104, // PREDEC - POSTINC = 105, // POSTINC - POSTDEC = 106 // POSTDEC + INTEGER = 94, // "integer" + ADD_ARRAY = 95, // ADD_ARRAY + THEN = 96, // THEN + TERN = 97, // TERN + NEG = 98, // NEG + ANIMREF = 99, // ANIMREF + PREINC = 100, // PREINC + PREDEC = 101, // PREDEC + POSTINC = 102, // POSTINC + POSTDEC = 103 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -797,7 +791,7 @@ namespace xsk { namespace gsc { namespace iw6 { { enum symbol_kind_type { - YYNTOKENS = 107, ///< Number of tokens. + YYNTOKENS = 104, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -893,99 +887,96 @@ namespace xsk { namespace gsc { namespace iw6 { S_ISTRING = 91, // "localized string" S_COLOR = 92, // "color" S_FLOAT = 93, // "float" - S_INT_DEC = 94, // "int" - S_INT_OCT = 95, // "octal int" - S_INT_BIN = 96, // "binary int" - S_INT_HEX = 97, // "hexadecimal int" - S_ADD_ARRAY = 98, // ADD_ARRAY - S_THEN = 99, // THEN - S_TERN = 100, // TERN - S_NEG = 101, // NEG - S_ANIMREF = 102, // ANIMREF - S_PREINC = 103, // PREINC - S_PREDEC = 104, // PREDEC - S_POSTINC = 105, // POSTINC - S_POSTDEC = 106, // POSTDEC - S_YYACCEPT = 107, // $accept - S_root = 108, // root - S_program = 109, // program - S_inline = 110, // inline - S_include = 111, // include - S_declaration = 112, // declaration - S_decl_usingtree = 113, // decl_usingtree - S_decl_constant = 114, // decl_constant - S_decl_thread = 115, // decl_thread - S_stmt = 116, // stmt - S_stmt_dev = 117, // stmt_dev - S_stmt_block = 118, // stmt_block - S_stmt_list = 119, // stmt_list - S_stmt_expr = 120, // stmt_expr - S_stmt_call = 121, // stmt_call - S_stmt_assign = 122, // stmt_assign - S_stmt_endon = 123, // stmt_endon - S_stmt_notify = 124, // stmt_notify - S_stmt_wait = 125, // stmt_wait - S_stmt_waittill = 126, // stmt_waittill - S_stmt_waittillmatch = 127, // stmt_waittillmatch - S_stmt_waittillframeend = 128, // stmt_waittillframeend - 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_INTEGER = 94, // "integer" + S_ADD_ARRAY = 95, // ADD_ARRAY + S_THEN = 96, // THEN + S_TERN = 97, // TERN + S_NEG = 98, // NEG + S_ANIMREF = 99, // ANIMREF + S_PREINC = 100, // PREINC + S_PREDEC = 101, // PREDEC + S_POSTINC = 102, // POSTINC + S_POSTDEC = 103, // POSTDEC + S_YYACCEPT = 104, // $accept + S_root = 105, // root + S_program = 106, // program + S_inline = 107, // inline + S_include = 108, // include + S_declaration = 109, // declaration + S_decl_usingtree = 110, // decl_usingtree + S_decl_constant = 111, // decl_constant + S_decl_thread = 112, // decl_thread + S_stmt = 113, // stmt + S_stmt_dev = 114, // stmt_dev + S_stmt_block = 115, // stmt_block + S_stmt_list = 116, // stmt_list + S_stmt_expr = 117, // stmt_expr + S_stmt_call = 118, // stmt_call + S_stmt_assign = 119, // stmt_assign + S_stmt_endon = 120, // stmt_endon + S_stmt_notify = 121, // stmt_notify + S_stmt_wait = 122, // stmt_wait + S_stmt_waittill = 123, // stmt_waittill + S_stmt_waittillmatch = 124, // stmt_waittillmatch + S_stmt_waittillframeend = 125, // stmt_waittillframeend + S_stmt_if = 126, // stmt_if + S_stmt_ifelse = 127, // stmt_ifelse + S_stmt_while = 128, // stmt_while + S_stmt_dowhile = 129, // stmt_dowhile + S_stmt_for = 130, // stmt_for + S_stmt_foreach = 131, // stmt_foreach + S_stmt_switch = 132, // stmt_switch + S_stmt_case = 133, // stmt_case + S_stmt_default = 134, // stmt_default + S_stmt_break = 135, // stmt_break + S_stmt_continue = 136, // stmt_continue + S_stmt_return = 137, // stmt_return + S_stmt_breakpoint = 138, // stmt_breakpoint + S_stmt_prof_begin = 139, // stmt_prof_begin + S_stmt_prof_end = 140, // stmt_prof_end + S_expr = 141, // expr + S_expr_or_empty = 142, // expr_or_empty + S_expr_assign = 143, // expr_assign + S_expr_increment = 144, // expr_increment + S_expr_decrement = 145, // expr_decrement + S_expr_ternary = 146, // expr_ternary + S_expr_binary = 147, // expr_binary + S_expr_primitive = 148, // expr_primitive + S_expr_complement = 149, // expr_complement + S_expr_not = 150, // expr_not + S_expr_call = 151, // expr_call + S_expr_method = 152, // expr_method + S_expr_function = 153, // expr_function + S_expr_pointer = 154, // expr_pointer + S_expr_add_array = 155, // expr_add_array + S_expr_parameters = 156, // expr_parameters + S_expr_arguments = 157, // expr_arguments + S_expr_arguments_no_empty = 158, // expr_arguments_no_empty + S_expr_reference = 159, // expr_reference + S_expr_array = 160, // expr_array + S_expr_field = 161, // expr_field + S_expr_size = 162, // expr_size + S_expr_paren = 163, // expr_paren + S_expr_object = 164, // expr_object + S_expr_thisthread = 165, // expr_thisthread + S_expr_empty_array = 166, // expr_empty_array + S_expr_undefined = 167, // expr_undefined + S_expr_game = 168, // expr_game + S_expr_self = 169, // expr_self + S_expr_anim = 170, // expr_anim + S_expr_level = 171, // expr_level + S_expr_animation = 172, // expr_animation + S_expr_animtree = 173, // expr_animtree + S_expr_identifier = 174, // expr_identifier + S_expr_path = 175, // expr_path + S_expr_istring = 176, // expr_istring + S_expr_string = 177, // expr_string + S_expr_color = 178, // expr_color + S_expr_vector = 179, // expr_vector + S_expr_float = 180, // expr_float + S_expr_integer = 181, // expr_integer + S_expr_false = 182, // expr_false + S_expr_true = 183 // expr_true }; }; @@ -1300,10 +1291,7 @@ namespace xsk { namespace gsc { namespace iw6 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2554,10 +2542,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2667,7 +2652,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - IW6_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + IW6_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4130,61 +4115,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4666,7 +4606,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2346, ///< Last index in yytable_. + yylast_ = 2293, ///< Last index in yytable_. yynnts_ = 80, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -4973,10 +4913,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5287,10 +5224,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5357,7 +5291,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw6 -#line 5361 "parser.hpp" +#line 5295 "parser.hpp" diff --git a/src/iw6/xsk/resolver.cpp b/src/iw6/xsk/resolver.cpp index 1b2815f..4aece49 100644 --- a/src/iw6/xsk/resolver.cpp +++ b/src/iw6/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::iw6 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +125,19 @@ auto resolver::file_name(std::uint16_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +154,16 @@ auto resolver::token_name(std::uint16_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -164,164 +188,182 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 153> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, + { 0x17, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x18, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x19, "RETN" }, + { 0x1A, "CALL_BUILTIN_FUNC_0" }, + { 0x1B, "CALL_BUILTIN_FUNC_1" }, + { 0x1C, "CALL_BUILTIN_FUNC_2" }, + { 0x1D, "CALL_BUILTIN_FUNC_3" }, + { 0x1E, "CALL_BUILTIN_FUNC_4" }, + { 0x1F, "CALL_BUILTIN_FUNC_5" }, + { 0x20, "CALL_BUILTIN_FUNC" }, + { 0x21, "BOOL_NOT" }, + { 0x22, "CALL_FAR_METHOD_THEAD" }, + { 0x23, "JMP_EXPR_TRUE" }, + { 0x24, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x25, "CAST_BOOL" }, + { 0x26, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x27, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x28, "INEQUALITY" }, + { 0x29, "GET_THISTHREAD" }, + { 0x2A, "CLEAR_FIELD_VARIABLE" }, + { 0x2B, "GET_FLOAT" }, + { 0x2C, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x2D, "CALL_FAR_FUNC2" }, + { 0x2E, "CALL_FAR_FUNC" }, + { 0x2F, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x30, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x31, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x32, "CHECK_CLEAR_PARAMS" }, + { 0x33, "CAST_FIELD_OBJ" }, + { 0x34, "END" }, + { 0x35, "SIZE" }, + { 0x36, "EMPTY_ARRAY" }, + { 0x37, "BIT_AND" }, + { 0x38, "LESSEQUAL" }, + { 0x39, "VOIDCODEPOS" }, + { 0x3A, "CALL_METHOD_THREAD_POINTER" }, + { 0x3B, "ENDSWITCH" }, + { 0x3C, "CLEAR_VARIABLE_FIELD" }, + { 0x3D, "DIV" }, + { 0x3E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x3F, "GET_USHORT" }, + { 0x40, "JMP_TRUE" }, + { 0x41, "GET_SELF" }, + { 0x42, "CALL_FAR_FUNC_THREAD" }, + { 0x43, "CALL_LOCAL_FUNC_THREAD" }, + { 0x44, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x45, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x46, "PLUS" }, + { 0x47, "BOOL_COMPLEMENT" }, + { 0x48, "CALL_METHOD_POINTER" }, + { 0x49, "INC" }, + { 0x4A, "REMOVE_LOCAL_VARIABLES" }, + { 0x4B, "JMP_EXPR_FALSE" }, + { 0x4C, "SWITCH" }, + { 0x4D, "CLEAR_PARAMS" }, + { 0x4E, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x4F, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x50, "CALL_LOCAL_METHOD" }, + { 0x51, "EVAL_FIELD_VARIABLE" }, + { 0x52, "EVAL_FIELD_VARIABLE_REF" }, + { 0x53, "GET_STRING" }, + { 0x54, "CALL_FUNC_POINTER" }, + { 0x55, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x56, "GET_VECTOR" }, + { 0x57, "ENDON" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "GET_SELF_OBJ" }, + { 0x5A, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x5B, "SET_VARIABLE_FIELD" }, + { 0x5C, "CALL_LOCAL_FUNC2" }, + { 0x5D, "CALL_LOCAL_FUNC" }, + { 0x5E, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x5F, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x60, "GET_FAR_FUNC" }, + { 0x61, "LESS" }, + { 0x62, "GET_GAME_REF" }, + { 0x63, "WAITTILLFRAMEEND" }, + { 0x64, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x65, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x66, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x67, "GET_LEVEL" }, + { 0x68, "NOTIFY" }, + { 0x69, "DEC_TOP" }, + { 0x6A, "SHIFT_LEFT" }, + { 0x6B, "CALL_LOCAL_METHOD_THREAD" }, + { 0x6C, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x6D, "GREATER" }, + { 0x6E, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x6F, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x70, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x71, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x72, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x73, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x74, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x75, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x76, "JMP" }, + { 0x77, "CALL_FUNC_THREAD_POINTER" }, + { 0x78, "GET_ZERO" }, + { 0x79, "WAIT" }, + { 0x7A, "MINUS" }, + { 0x7B, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7C, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x7D, "MULT" }, + { 0x7E, "CREATE_LOCAL_VARIABLE" }, + { 0x7F, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x80, "GET_INT" }, + { 0x81, "MOD" }, + { 0x82, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x83, "GET_BUILTIN_FUNC" }, + { 0x84, "GET_GAME" }, + { 0x85, "WAITTILL" }, + { 0x86, "DEC" }, + { 0x87, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x88, "PRE_CALL" }, + { 0x89, "GET_ANIM" }, + { 0x8A, "GET_UNDEFINED" }, + { 0x8B, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x8C, "GET_ANIM_OBJ" }, + { 0x8D, "GET_LEVEL_OBJ" }, + { 0x8E, "BIT_EXOR" }, + { 0x8F, "EQUALITY" }, + { 0x90, "CLEAR_ARRAY" }, + { 0x91, "JMP_BACK" }, + { 0x92, "GET_ANIMATION" }, + { 0x93, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x94, "GET_ANIMTREE" }, + { 0x95, "GET_ISTRING" }, + { 0x96, "EVAL_ARRAY_REF" }, + { 0x97, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x98, "GET_NBYTE" }, + { 0x99, "GET_BUILTIN_METHOD" }, + { 0x9A, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x9B, "EVAL_ARRAY" }, + { 0x9C, "VECTOR" }, + { 0x9D, "CALL_FAR_METHOD" }, + { 0x9E, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0x9F, "GET_BYTE" }, + { 0xA0, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0xA1, "BIT_OR" }, + { 0xA2, "ADD_ARRAY" }, + { 0xA3, "WAITTILLMATCH2" }, + { 0xA4, "WAITTILLMATCH" }, + { 0xA5, "GET_LOCAL_FUNC" }, + { 0xA6, "GET_NUSHORT" }, + { 0xA7, "SHIFT_RIGHT" }, + { 0xA8, "CALL_BUILTIN_METHOD_0" }, + { 0xA9, "CALL_BUILTIN_METHOD_1" }, + { 0xAA, "CALL_BUILTIN_METHOD_2" }, + { 0xAB, "CALL_BUILTIN_METHOD_3" }, + { 0xAC, "CALL_BUILTIN_METHOD_4" }, + { 0xAD, "CALL_BUILTIN_METHOD_5" }, + { 0xAE, "CALL_BUILTIN_METHOD" }, + { 0xAF, "JMP_FALSE" }, }}; -const std::array function_list +const std::array, 605> function_list {{ { 0x001, "precacheturret" }, { 0x002, "getweaponarray" }, @@ -930,7 +972,7 @@ const std::array function_list { 0x25D, "capsuletracepassed" }, }}; -const std::array method_list +const std::array, 1066> method_list {{ { 0x8000, "thermaldrawdisable" }, { 0x8001, "setturretdismountorg" }, @@ -2000,7 +2042,7 @@ const std::array method_list { 0x8429, "alienscheckisitempurchased" }, }}; -const std::array file_list +const std::array, 831> file_list {{ { 0x301, "character/character_ajax_flood_a" }, { 0x302, "character/character_ajax_wood_shotgun_a" }, @@ -2838,24 +2880,24 @@ const std::array file_list // 36631-44, effects? }}; -const std::array token_list +const std::array, 13823> token_list {{ - //OPAQUE_STRING_VOID = 0x0, - //OPAQUE_STRING_PL = 0x1, - //OPAQUE_STRING_MINUS = 0x2, - //OPAQUE_STRING_RADIUS_TYPO = 0x3, - //OPAQUE_STRING_NOTE_COLON = 0x4, - { 0x5, "_" }, - { 0x6, "_custom" }, - { 0x7, "accuracy" }, - { 0x8, "actionslot1" }, - { 0x9, "actionslot2" }, - { 0xA, "actionslot3" }, - { 0xB, "actionslot4" }, - { 0xC, "actionslot5" }, - { 0xD, "actionslot6" }, - { 0xE, "actionslot7" }, - { 0xF, "activator" }, + { 0x0000, "" }, + { 0x0001, "pl#" }, + { 0x0002, "-" }, + { 0x0003, "radius`" }, + { 0x0004, "note:" }, + { 0x0005, "_" }, + { 0x0006, "_custom" }, + { 0x0007, "accuracy" }, + { 0x0008, "actionslot1" }, + { 0x0009, "actionslot2" }, + { 0x000A, "actionslot3" }, + { 0x000B, "actionslot4" }, + { 0x000C, "actionslot5" }, + { 0x000D, "actionslot6" }, + { 0x000E, "actionslot7" }, + { 0x000F, "activator" }, { 0x10, "active" }, { 0x11, "activevisionset" }, { 0x12, "activevisionsetduration" }, @@ -16687,32 +16729,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/iw6/xsk/resolver.hpp b/src/iw6/xsk/resolver.hpp index d8f733c..999a944 100644 --- a/src/iw6/xsk/resolver.hpp +++ b/src/iw6/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::iw6 diff --git a/src/iw7/stdafx.hpp b/src/iw7/stdafx.hpp index 6cf2fff..d387156 100644 --- a/src/iw7/stdafx.hpp +++ b/src/iw7/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/iw7/xsk/assembler.cpp b/src/iw7/xsk/assembler.cpp index 1be7524..d6011ef 100644 --- a/src/iw7/xsk/assembler.cpp +++ b/src/iw7/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -378,24 +392,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -404,9 +406,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -422,33 +423,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint32_t file_id = 0; - std::uint32_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -457,22 +450,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -486,25 +470,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -513,25 +498,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint32_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFFFFFF; - if (field_id == 0) - { - field_id = 0xFFFFFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 0x13FCC) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -542,7 +515,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -571,24 +544,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/iw7/xsk/assembler.hpp b/src/iw7/xsk/assembler.hpp index ef4a098..2b94e3a 100644 --- a/src/iw7/xsk/assembler.hpp +++ b/src/iw7/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::iw7 diff --git a/src/iw7/xsk/compiler.cpp b/src/iw7/xsk/compiler.cpp index c129f98..ba2ca8e 100644 --- a/src/iw7/xsk/compiler.cpp +++ b/src/iw7/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = iw7__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -390,9 +390,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -526,7 +526,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -580,7 +580,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -726,7 +726,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -747,9 +747,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -839,7 +839,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -889,7 +889,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1047,7 +1047,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1101,7 +1101,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1364,10 +1364,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1384,7 +1384,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1400,7 +1400,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1482,10 +1482,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1502,7 +1502,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1518,7 +1518,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1540,7 +1540,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1616,7 +1616,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1783,7 +1783,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2074,7 +2074,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2086,7 +2086,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2099,7 +2099,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2215,7 +2215,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2252,7 +2252,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2295,7 +2295,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2425,7 +2425,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2697,7 +2697,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2726,7 +2726,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/iw7/xsk/compiler.hpp b/src/iw7/xsk/compiler.hpp index 0d1dfd8..1d61350 100644 --- a/src/iw7/xsk/compiler.hpp +++ b/src/iw7/xsk/compiler.hpp @@ -87,7 +87,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/iw7/xsk/decompiler.cpp b/src/iw7/xsk/decompiler.cpp index 336559c..82105ba 100644 --- a/src/iw7/xsk/decompiler.cpp +++ b/src/iw7/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1359,7 +1359,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1840,7 +1840,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1915,7 +1915,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2051,7 +2051,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2158,11 +2158,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2560,7 +2560,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2679,7 +2679,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3070,7 +3070,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/iw7/xsk/disassembler.cpp b/src/iw7/xsk/disassembler.cpp index 730e68b..db3da0c 100644 --- a/src/iw7/xsk/disassembler.cpp +++ b/src/iw7/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// IW7 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,14 +69,14 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); - + dissasemble_instruction(inst); - + size -= inst->size; } } @@ -168,7 +168,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -310,19 +310,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -341,88 +336,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint32_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0x13FCC) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x40000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -430,24 +380,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -457,7 +447,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 9; @@ -466,24 +456,24 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { - case opcode::OP_GetLocalFunction: - case opcode::OP_ScriptLocalFunctionCall: - case opcode::OP_ScriptLocalFunctionCall2: - case opcode::OP_ScriptLocalMethodCall: - case opcode::OP_ScriptLocalThreadCall: - case opcode::OP_ScriptLocalChildThreadCall: - case opcode::OP_ScriptLocalMethodThreadCall: - case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); - break; - default: - break; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = resolve_function(inst->data[0]); + break; + default: + break; } } } @@ -512,9 +502,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s %X\n", func->name.data(), func->index)); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -532,40 +522,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/iw7/xsk/disassembler.hpp b/src/iw7/xsk/disassembler.hpp index 7275f20..eefe365 100644 --- a/src/iw7/xsk/disassembler.hpp +++ b/src/iw7/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/iw7/xsk/iw7.hpp b/src/iw7/xsk/iw7.hpp index 8003830..33ec87e 100644 --- a/src/iw7/xsk/iw7.hpp +++ b/src/iw7/xsk/iw7.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::iw7 { +constexpr std::uint32_t max_string_id = 0x13FCC; + enum class opcode : std::uint8_t { OP_SetNewLocalVariableFieldCached0 = 0x17, diff --git a/src/iw7/xsk/lexer.cpp b/src/iw7/xsk/lexer.cpp index d9f0ece..a04137e 100644 --- a/src/iw7/xsk/lexer.cpp +++ b/src/iw7/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 110 -#define YY_END_OF_BUFFER 111 +#define YY_NUM_RULES 111 +#define YY_END_OF_BUFFER 112 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[328] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 109, - 1, 2, 94, 109, 109, 93, 97, 109, 54, 55, - 91, 89, 60, 90, 61, 92, 108, 108, 63, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, + 1, 2, 94, 110, 110, 93, 97, 110, 54, 55, + 91, 89, 60, 90, 61, 92, 109, 109, 63, 64, 78, 88, 79, 65, 100, 58, 59, 98, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 56, 96, 57, 95, 5, 6, - 5, 12, 13, 12, 109, 91, 92, 75, 0, 102, + 5, 12, 13, 12, 110, 91, 92, 75, 0, 102, 0, 15, 0, 0, 0, 0, 84, 0, 73, 0, - 86, 0, 0, 8, 82, 66, 80, 67, 81, 104, - 0, 11, 4, 3, 83, 104, 108, 105, 0, 0, + 86, 0, 0, 8, 82, 66, 80, 67, 81, 105, + 0, 11, 4, 3, 83, 105, 109, 106, 0, 0, 0, 0, 62, 70, 76, 74, 77, 71, 100, 87, 100, 100, 100, 100, 100, 100, 28, 100, 100, 100, 100, 100, 26, 32, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 85, 72, 7, 14, 10, 9, 0, 102, 0, 0, 0, 0, 0, 0, 101, - 0, 0, 0, 0, 102, 0, 104, 0, 3, 104, - 104, 105, 106, 107, 99, 68, 69, 100, 100, 100, + 0, 0, 0, 0, 102, 0, 105, 0, 3, 105, + 105, 106, 107, 108, 99, 68, 69, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 30, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 103, 0, 0, 0, 0, 0, 101, 0, 0, @@ -594,7 +594,7 @@ static const flex_int16_t yy_accept[328] = 0, 0, 49, 36, 100, 100, 100, 20, 47, 100, 53, 100, 100, 100, 100, 100, 100, 100, 100, 29, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, - 21, 100, 100, 38, 33, 100, 42, 100, 100, 103, + 21, 100, 100, 38, 33, 100, 42, 100, 100, 104, 0, 0, 16, 0, 100, 100, 100, 35, 31, 100, 100, 100, 100, 100, 0, 17, 0, 100, 100, 37, 100, 41, 100, 100, 23, 19, 0, 100, 100, 100, @@ -1188,11 +1188,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1251,577 +1251,582 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw iw7::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw iw7::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw iw7::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return iw7::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw iw7::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return iw7::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw iw7::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw iw7::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return iw7::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return iw7::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return iw7::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return iw7::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return iw7::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return iw7::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return iw7::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return iw7::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return iw7::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return iw7::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return iw7::parser::make_IF(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return iw7::parser::make_ELSE(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return iw7::parser::make_DO(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return iw7::parser::make_WHILE(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return iw7::parser::make_FOR(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return iw7::parser::make_FOREACH(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return iw7::parser::make_IN(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return iw7::parser::make_SWITCH(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return iw7::parser::make_CASE(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return iw7::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return iw7::parser::make_BREAK(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return iw7::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return iw7::parser::make_RETURN(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return iw7::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return iw7::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return iw7::parser::make_PROFEND(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return iw7::parser::make_THREAD(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return iw7::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return iw7::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return iw7::parser::make_CALL(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return iw7::parser::make_TRUE(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return iw7::parser::make_FALSE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return iw7::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return iw7::parser::make_SIZE(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return iw7::parser::make_GAME(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return iw7::parser::make_SELF(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return iw7::parser::make_ANIM(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return iw7::parser::make_LEVEL(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return iw7::parser::make_LPAREN(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return iw7::parser::make_RPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return iw7::parser::make_LBRACE(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return iw7::parser::make_RBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return iw7::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return iw7::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return iw7::parser::make_COMMA(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return iw7::parser::make_DOT(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return iw7::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return iw7::parser::make_COLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return iw7::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return iw7::parser::make_QMARK(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return iw7::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return iw7::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return iw7::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return iw7::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return iw7::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return iw7::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return iw7::parser::make_OR(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return iw7::parser::make_AND(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return iw7::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return iw7::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return iw7::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return iw7::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return iw7::parser::make_LESS(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return iw7::parser::make_GREATER(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return iw7::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return iw7::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return iw7::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return iw7::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return iw7::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return iw7::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return iw7::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return iw7::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return iw7::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return iw7::parser::make_ADD(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return iw7::parser::make_SUB(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return iw7::parser::make_MUL(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return iw7::parser::make_DIV(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return iw7::parser::make_MOD(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return iw7::parser::make_NOT(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return iw7::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return iw7::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return iw7::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return iw7::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" -{ return iw7::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 157 "lexer.lpp" +{ return iw7::parser::make_PATH(xsk::gsc::iw7::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return iw7::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return iw7::parser::make_IDENTIFIER(xsk::gsc::iw7::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: /* rule 101 can match eol */ YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return iw7::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 159 "lexer.lpp" +{ return iw7::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" +#line 160 "lexer.lpp" { return iw7::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 103: YY_RULE_SETUP -#line 160 "lexer.lpp" -{ return iw7::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 161 "lexer.lpp" +{ return iw7::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return iw7::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 162 "lexer.lpp" +{ return iw7::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return iw7::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return iw7::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return iw7::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return iw7::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return iw7::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return iw7::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return iw7::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 166 "lexer.lpp" -{ if(ctx->header_top > 0) iw7_pop_header(ctx); else return iw7::parser::make_IW7EOF(ctx->loc); } +{ return iw7::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 109: -/* rule 109 can match eol */ YY_RULE_SETUP #line 167 "lexer.lpp" -{ throw iw7::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return iw7::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 168 "lexer.lpp" +{ if(ctx->header_top > 0) iw7_pop_header(ctx); else return iw7::parser::make_IW7EOF(ctx->loc); } YY_BREAK case 110: +/* rule 110 can match eol */ YY_RULE_SETUP #line 169 "lexer.lpp" +{ throw iw7::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 171 "lexer.lpp" ECHO; YY_BREAK -#line 1824 "lexer.cpp" +#line 1829 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2951,65 +2956,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 169 "lexer.lpp" +#line 171 "lexer.lpp" void iw7_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3017,9 +3022,9 @@ void iw7_push_header(xsk::gsc::context* ctx, const std::string& file) void iw7_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/iw7/xsk/lexer.hpp b/src/iw7/xsk/lexer.hpp index 4114b75..df078b4 100644 --- a/src/iw7/xsk/lexer.hpp +++ b/src/iw7/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 169 "lexer.lpp" +#line 171 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/iw7/xsk/parser.cpp b/src/iw7/xsk/parser.cpp index 734ac39..6ef244a 100644 --- a/src/iw7/xsk/parser.cpp +++ b/src/iw7/xsk/parser.cpp @@ -494,10 +494,7 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -794,10 +791,7 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1094,10 +1088,7 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1393,10 +1384,7 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1947,10 +1935,7 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1975,1303 +1960,1285 @@ namespace xsk { namespace gsc { namespace iw7 { switch (yyn) { case 2: // root: program -#line 252 "parser.ypp" +#line 249 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 1981 "parser.cpp" +#line 1966 "parser.cpp" break; case 3: // root: %empty -#line 253 "parser.ypp" +#line 250 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 1987 "parser.cpp" +#line 1972 "parser.cpp" break; case 4: // program: program inline -#line 258 "parser.ypp" +#line 255 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 1993 "parser.cpp" +#line 1978 "parser.cpp" break; case 5: // program: program include -#line 260 "parser.ypp" +#line 257 "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 1999 "parser.cpp" +#line 1984 "parser.cpp" break; case 6: // program: program declaration -#line 262 "parser.ypp" +#line 259 "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 2005 "parser.cpp" +#line 1990 "parser.cpp" break; case 7: // program: inline -#line 264 "parser.ypp" +#line 261 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2011 "parser.cpp" +#line 1996 "parser.cpp" break; case 8: // program: include -#line 266 "parser.ypp" +#line 263 "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 2017 "parser.cpp" +#line 2002 "parser.cpp" break; case 9: // program: declaration -#line 268 "parser.ypp" +#line 265 "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 2023 "parser.cpp" +#line 2008 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 272 "parser.ypp" +#line 269 "parser.ypp" { iw7_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2029 "parser.cpp" +#line 2014 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 277 "parser.ypp" +#line 274 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2035 "parser.cpp" +#line 2020 "parser.cpp" break; case 12: // declaration: "/#" -#line 281 "parser.ypp" +#line 278 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2041 "parser.cpp" +#line 2026 "parser.cpp" break; case 13: // declaration: "#/" -#line 282 "parser.ypp" +#line 279 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2047 "parser.cpp" +#line 2032 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2053 "parser.cpp" +#line 2038 "parser.cpp" break; case 15: // declaration: decl_constant -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2059 "parser.cpp" +#line 2044 "parser.cpp" break; case 16: // declaration: decl_thread -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2065 "parser.cpp" +#line 2050 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 290 "parser.ypp" +#line 287 "parser.ypp" { ctx->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 2071 "parser.cpp" +#line 2056 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 295 "parser.ypp" +#line 292 "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 2077 "parser.cpp" +#line 2062 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 300 "parser.ypp" +#line 297 "parser.ypp" { ctx->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 2083 "parser.cpp" +#line 2068 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 304 "parser.ypp" +#line 301 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2089 "parser.cpp" +#line 2074 "parser.cpp" break; case 21: // stmt: stmt_block -#line 305 "parser.ypp" +#line 302 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2095 "parser.cpp" +#line 2080 "parser.cpp" break; case 22: // stmt: stmt_call -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2101 "parser.cpp" +#line 2086 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2107 "parser.cpp" +#line 2092 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2113 "parser.cpp" +#line 2098 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2119 "parser.cpp" +#line 2104 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2125 "parser.cpp" +#line 2110 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2131 "parser.cpp" +#line 2116 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2137 "parser.cpp" +#line 2122 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2143 "parser.cpp" +#line 2128 "parser.cpp" break; case 30: // stmt: stmt_if -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2149 "parser.cpp" +#line 2134 "parser.cpp" break; case 31: // stmt: stmt_ifelse -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2155 "parser.cpp" +#line 2140 "parser.cpp" break; case 32: // stmt: stmt_while -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2161 "parser.cpp" +#line 2146 "parser.cpp" break; case 33: // stmt: stmt_dowhile -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2167 "parser.cpp" +#line 2152 "parser.cpp" break; case 34: // stmt: stmt_for -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2173 "parser.cpp" +#line 2158 "parser.cpp" break; case 35: // stmt: stmt_foreach -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2179 "parser.cpp" +#line 2164 "parser.cpp" break; case 36: // stmt: stmt_switch -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2185 "parser.cpp" +#line 2170 "parser.cpp" break; case 37: // stmt: stmt_case -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2191 "parser.cpp" +#line 2176 "parser.cpp" break; case 38: // stmt: stmt_default -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2197 "parser.cpp" +#line 2182 "parser.cpp" break; case 39: // stmt: stmt_break -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2203 "parser.cpp" +#line 2188 "parser.cpp" break; case 40: // stmt: stmt_continue -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2209 "parser.cpp" +#line 2194 "parser.cpp" break; case 41: // stmt: stmt_return -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2215 "parser.cpp" +#line 2200 "parser.cpp" break; case 42: // stmt: stmt_breakpoint -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2221 "parser.cpp" +#line 2206 "parser.cpp" break; case 43: // stmt: stmt_prof_begin -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } -#line 2227 "parser.cpp" +#line 2212 "parser.cpp" break; case 44: // stmt: stmt_prof_end -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } -#line 2233 "parser.cpp" +#line 2218 "parser.cpp" break; case 45: // stmt_dev: "/#" stmt_list "#/" -#line 332 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2239 "parser.cpp" +#line 2224 "parser.cpp" break; case 46: // stmt_dev: "/#" "#/" -#line 333 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2245 "parser.cpp" +#line 2230 "parser.cpp" break; case 47: // stmt_block: "{" stmt_list "}" -#line 337 "parser.ypp" +#line 334 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2251 "parser.cpp" +#line 2236 "parser.cpp" break; case 48: // stmt_block: "{" "}" -#line 338 "parser.ypp" +#line 335 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2257 "parser.cpp" +#line 2242 "parser.cpp" break; case 49: // stmt_list: stmt_list stmt -#line 343 "parser.ypp" +#line 340 "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 2263 "parser.cpp" +#line 2248 "parser.cpp" break; case 50: // stmt_list: stmt -#line 345 "parser.ypp" +#line 342 "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 2269 "parser.cpp" +#line 2254 "parser.cpp" break; case 51: // stmt_expr: expr_assign -#line 350 "parser.ypp" +#line 347 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2275 "parser.cpp" +#line 2260 "parser.cpp" break; case 52: // stmt_expr: expr_increment -#line 352 "parser.ypp" +#line 349 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2281 "parser.cpp" +#line 2266 "parser.cpp" break; case 53: // stmt_expr: expr_decrement -#line 354 "parser.ypp" +#line 351 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2287 "parser.cpp" +#line 2272 "parser.cpp" break; case 54: // stmt_expr: %empty -#line 356 "parser.ypp" +#line 353 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2293 "parser.cpp" +#line 2278 "parser.cpp" break; case 55: // stmt_call: expr_call ";" -#line 361 "parser.ypp" +#line 358 "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 2299 "parser.cpp" +#line 2284 "parser.cpp" break; case 56: // stmt_call: expr_method ";" -#line 363 "parser.ypp" +#line 360 "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 2305 "parser.cpp" +#line 2290 "parser.cpp" break; case 57: // stmt_assign: expr_assign ";" -#line 368 "parser.ypp" +#line 365 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2311 "parser.cpp" +#line 2296 "parser.cpp" break; case 58: // stmt_assign: expr_increment ";" -#line 370 "parser.ypp" +#line 367 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2317 "parser.cpp" +#line 2302 "parser.cpp" break; case 59: // stmt_assign: expr_decrement ";" -#line 372 "parser.ypp" +#line 369 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2323 "parser.cpp" +#line 2308 "parser.cpp" break; case 60: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 377 "parser.ypp" +#line 374 "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 2329 "parser.cpp" +#line 2314 "parser.cpp" break; case 61: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 382 "parser.ypp" +#line 379 "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 2335 "parser.cpp" +#line 2320 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 384 "parser.ypp" +#line 381 "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 2341 "parser.cpp" +#line 2326 "parser.cpp" break; case 63: // stmt_wait: "wait" expr ";" -#line 389 "parser.ypp" +#line 386 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2347 "parser.cpp" +#line 2332 "parser.cpp" break; case 64: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 394 "parser.ypp" +#line 391 "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 2353 "parser.cpp" +#line 2338 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 396 "parser.ypp" +#line 393 "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 2359 "parser.cpp" +#line 2344 "parser.cpp" break; case 66: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 401 "parser.ypp" +#line 398 "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 2365 "parser.cpp" +#line 2350 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 403 "parser.ypp" +#line 400 "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 2371 "parser.cpp" +#line 2356 "parser.cpp" break; case 68: // stmt_waittillframeend: "waittillframeend" ";" -#line 408 "parser.ypp" +#line 405 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2377 "parser.cpp" +#line 2362 "parser.cpp" break; case 69: // stmt_if: "if" "(" expr ")" stmt -#line 413 "parser.ypp" +#line 410 "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 2383 "parser.cpp" +#line 2368 "parser.cpp" break; case 70: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 418 "parser.ypp" +#line 415 "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 2389 "parser.cpp" +#line 2374 "parser.cpp" break; case 71: // stmt_while: "while" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2395 "parser.cpp" +#line 2380 "parser.cpp" break; case 72: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 428 "parser.ypp" +#line 425 "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 2401 "parser.cpp" +#line 2386 "parser.cpp" break; case 73: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2407 "parser.cpp" +#line 2392 "parser.cpp" break; case 74: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 438 "parser.ypp" +#line 435 "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 2413 "parser.cpp" +#line 2398 "parser.cpp" break; case 75: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 440 "parser.ypp" +#line 437 "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 2419 "parser.cpp" +#line 2404 "parser.cpp" break; case 76: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 445 "parser.ypp" +#line 442 "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 2425 "parser.cpp" +#line 2410 "parser.cpp" break; case 77: // stmt_case: "case" expr_integer ":" -#line 450 "parser.ypp" +#line 447 "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 2431 "parser.cpp" +#line 2416 "parser.cpp" break; case 78: // stmt_case: "case" expr_string ":" -#line 452 "parser.ypp" +#line 449 "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 2437 "parser.cpp" +#line 2422 "parser.cpp" break; case 79: // stmt_default: "default" ":" -#line 457 "parser.ypp" +#line 454 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2443 "parser.cpp" +#line 2428 "parser.cpp" break; case 80: // stmt_break: "break" ";" -#line 462 "parser.ypp" +#line 459 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2449 "parser.cpp" +#line 2434 "parser.cpp" break; case 81: // stmt_continue: "continue" ";" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2455 "parser.cpp" +#line 2440 "parser.cpp" break; case 82: // stmt_return: "return" expr ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2461 "parser.cpp" +#line 2446 "parser.cpp" break; case 83: // stmt_return: "return" ";" -#line 474 "parser.ypp" +#line 471 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2467 "parser.cpp" +#line 2452 "parser.cpp" break; case 84: // stmt_breakpoint: "breakpoint" ";" -#line 479 "parser.ypp" +#line 476 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2473 "parser.cpp" +#line 2458 "parser.cpp" break; case 85: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 484 "parser.ypp" +#line 481 "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 2479 "parser.cpp" +#line 2464 "parser.cpp" break; case 86: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 489 "parser.ypp" +#line 486 "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 2485 "parser.cpp" +#line 2470 "parser.cpp" break; case 87: // expr: expr_ternary -#line 493 "parser.ypp" +#line 490 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2491 "parser.cpp" +#line 2476 "parser.cpp" break; case 88: // expr: expr_binary -#line 494 "parser.ypp" +#line 491 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2497 "parser.cpp" +#line 2482 "parser.cpp" break; case 89: // expr: expr_primitive -#line 495 "parser.ypp" +#line 492 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2503 "parser.cpp" +#line 2488 "parser.cpp" break; case 90: // expr_or_empty: expr -#line 499 "parser.ypp" +#line 496 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2509 "parser.cpp" +#line 2494 "parser.cpp" break; case 91: // expr_or_empty: %empty -#line 500 "parser.ypp" +#line 497 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2515 "parser.cpp" +#line 2500 "parser.cpp" break; case 92: // expr_assign: expr_object "=" expr -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2521 "parser.cpp" +#line 2506 "parser.cpp" break; case 93: // expr_assign: expr_object "|=" expr -#line 507 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2527 "parser.cpp" +#line 2512 "parser.cpp" break; case 94: // expr_assign: expr_object "&=" expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2533 "parser.cpp" +#line 2518 "parser.cpp" break; case 95: // expr_assign: expr_object "^=" expr -#line 511 "parser.ypp" +#line 508 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2539 "parser.cpp" +#line 2524 "parser.cpp" break; case 96: // expr_assign: expr_object "<<=" expr -#line 513 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2545 "parser.cpp" +#line 2530 "parser.cpp" break; case 97: // expr_assign: expr_object ">>=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2551 "parser.cpp" +#line 2536 "parser.cpp" break; case 98: // expr_assign: expr_object "+=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2557 "parser.cpp" +#line 2542 "parser.cpp" break; case 99: // expr_assign: expr_object "-=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2563 "parser.cpp" +#line 2548 "parser.cpp" break; case 100: // expr_assign: expr_object "*=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2569 "parser.cpp" +#line 2554 "parser.cpp" break; case 101: // expr_assign: expr_object "/=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2575 "parser.cpp" +#line 2560 "parser.cpp" break; case 102: // expr_assign: expr_object "%=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2581 "parser.cpp" +#line 2566 "parser.cpp" break; case 103: // expr_increment: "++" expr_object -#line 530 "parser.ypp" +#line 527 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2587 "parser.cpp" +#line 2572 "parser.cpp" break; case 104: // expr_increment: expr_object "++" -#line 532 "parser.ypp" +#line 529 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2593 "parser.cpp" +#line 2578 "parser.cpp" break; case 105: // expr_decrement: "--" expr_object -#line 537 "parser.ypp" +#line 534 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2599 "parser.cpp" +#line 2584 "parser.cpp" break; case 106: // expr_decrement: expr_object "--" -#line 539 "parser.ypp" +#line 536 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2605 "parser.cpp" +#line 2590 "parser.cpp" break; case 107: // expr_ternary: expr "?" expr ":" expr -#line 544 "parser.ypp" +#line 541 "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 2611 "parser.cpp" +#line 2596 "parser.cpp" break; case 108: // expr_binary: expr "||" expr -#line 549 "parser.ypp" +#line 546 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2617 "parser.cpp" +#line 2602 "parser.cpp" break; case 109: // expr_binary: expr "&&" expr -#line 551 "parser.ypp" +#line 548 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2623 "parser.cpp" +#line 2608 "parser.cpp" break; case 110: // expr_binary: expr "==" expr -#line 553 "parser.ypp" +#line 550 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2629 "parser.cpp" +#line 2614 "parser.cpp" break; case 111: // expr_binary: expr "!=" expr -#line 555 "parser.ypp" +#line 552 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2635 "parser.cpp" +#line 2620 "parser.cpp" break; case 112: // expr_binary: expr "<=" expr -#line 557 "parser.ypp" +#line 554 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2641 "parser.cpp" +#line 2626 "parser.cpp" break; case 113: // expr_binary: expr ">=" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2647 "parser.cpp" +#line 2632 "parser.cpp" break; case 114: // expr_binary: expr "<" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2653 "parser.cpp" +#line 2638 "parser.cpp" break; case 115: // expr_binary: expr ">" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2659 "parser.cpp" +#line 2644 "parser.cpp" break; case 116: // expr_binary: expr "|" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2665 "parser.cpp" +#line 2650 "parser.cpp" break; case 117: // expr_binary: expr "&" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2671 "parser.cpp" +#line 2656 "parser.cpp" break; case 118: // expr_binary: expr "^" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2677 "parser.cpp" +#line 2662 "parser.cpp" break; case 119: // expr_binary: expr "<<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2683 "parser.cpp" +#line 2668 "parser.cpp" break; case 120: // expr_binary: expr ">>" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2689 "parser.cpp" +#line 2674 "parser.cpp" break; case 121: // expr_binary: expr "+" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2695 "parser.cpp" +#line 2680 "parser.cpp" break; case 122: // expr_binary: expr "-" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2701 "parser.cpp" +#line 2686 "parser.cpp" break; case 123: // expr_binary: expr "*" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2707 "parser.cpp" +#line 2692 "parser.cpp" break; case 124: // expr_binary: expr "/" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2713 "parser.cpp" +#line 2698 "parser.cpp" break; case 125: // expr_binary: expr "%" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2719 "parser.cpp" +#line 2704 "parser.cpp" break; case 126: // expr_primitive: expr_complement -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2725 "parser.cpp" +#line 2710 "parser.cpp" break; case 127: // expr_primitive: expr_not -#line 588 "parser.ypp" +#line 585 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2731 "parser.cpp" +#line 2716 "parser.cpp" break; case 128: // expr_primitive: expr_call -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2737 "parser.cpp" +#line 2722 "parser.cpp" break; case 129: // expr_primitive: expr_method -#line 590 "parser.ypp" +#line 587 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2743 "parser.cpp" +#line 2728 "parser.cpp" break; case 130: // expr_primitive: expr_add_array -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2749 "parser.cpp" +#line 2734 "parser.cpp" break; case 131: // expr_primitive: expr_reference -#line 592 "parser.ypp" +#line 589 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2755 "parser.cpp" +#line 2740 "parser.cpp" break; case 132: // expr_primitive: expr_array -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2761 "parser.cpp" +#line 2746 "parser.cpp" break; case 133: // expr_primitive: expr_field -#line 594 "parser.ypp" +#line 591 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2767 "parser.cpp" +#line 2752 "parser.cpp" break; case 134: // expr_primitive: expr_size -#line 595 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2773 "parser.cpp" +#line 2758 "parser.cpp" break; case 135: // expr_primitive: expr_paren -#line 596 "parser.ypp" +#line 593 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2779 "parser.cpp" +#line 2764 "parser.cpp" break; case 136: // expr_primitive: expr_thisthread -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2785 "parser.cpp" +#line 2770 "parser.cpp" break; case 137: // expr_primitive: expr_empty_array -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2791 "parser.cpp" +#line 2776 "parser.cpp" break; case 138: // expr_primitive: expr_undefined -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2797 "parser.cpp" +#line 2782 "parser.cpp" break; case 139: // expr_primitive: expr_game -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2803 "parser.cpp" +#line 2788 "parser.cpp" break; case 140: // expr_primitive: expr_self -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2809 "parser.cpp" +#line 2794 "parser.cpp" break; case 141: // expr_primitive: expr_anim -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2815 "parser.cpp" +#line 2800 "parser.cpp" break; case 142: // expr_primitive: expr_level -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2821 "parser.cpp" +#line 2806 "parser.cpp" break; case 143: // expr_primitive: expr_animation -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2827 "parser.cpp" +#line 2812 "parser.cpp" break; case 144: // expr_primitive: expr_animtree -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2833 "parser.cpp" +#line 2818 "parser.cpp" break; case 145: // expr_primitive: expr_identifier -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2839 "parser.cpp" +#line 2824 "parser.cpp" break; case 146: // expr_primitive: expr_istring -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2845 "parser.cpp" +#line 2830 "parser.cpp" break; case 147: // expr_primitive: expr_string -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2851 "parser.cpp" +#line 2836 "parser.cpp" break; case 148: // expr_primitive: expr_color -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2857 "parser.cpp" +#line 2842 "parser.cpp" break; case 149: // expr_primitive: expr_vector -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2863 "parser.cpp" +#line 2848 "parser.cpp" break; case 150: // expr_primitive: expr_float -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2869 "parser.cpp" +#line 2854 "parser.cpp" break; case 151: // expr_primitive: expr_integer -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2875 "parser.cpp" +#line 2860 "parser.cpp" break; case 152: // expr_primitive: expr_false -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2881 "parser.cpp" +#line 2866 "parser.cpp" break; case 153: // expr_primitive: expr_true -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2887 "parser.cpp" +#line 2872 "parser.cpp" break; case 154: // expr_complement: "~" expr -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2893 "parser.cpp" +#line 2878 "parser.cpp" break; case 155: // expr_not: "!" expr -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2899 "parser.cpp" +#line 2884 "parser.cpp" break; case 156: // expr_call: expr_function -#line 628 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2905 "parser.cpp" +#line 2890 "parser.cpp" break; case 157: // expr_call: expr_pointer -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2911 "parser.cpp" +#line 2896 "parser.cpp" break; case 158: // expr_method: expr_object expr_function -#line 632 "parser.ypp" +#line 629 "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 2917 "parser.cpp" +#line 2902 "parser.cpp" break; case 159: // expr_method: expr_object expr_pointer -#line 633 "parser.ypp" +#line 630 "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 2923 "parser.cpp" +#line 2908 "parser.cpp" break; case 160: // expr_function: expr_identifier "(" expr_arguments ")" -#line 638 "parser.ypp" +#line 635 "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 2929 "parser.cpp" +#line 2914 "parser.cpp" break; case 161: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 640 "parser.ypp" +#line 637 "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 2935 "parser.cpp" +#line 2920 "parser.cpp" break; case 162: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 642 "parser.ypp" +#line 639 "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 2941 "parser.cpp" +#line 2926 "parser.cpp" break; case 163: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 644 "parser.ypp" +#line 641 "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 2947 "parser.cpp" +#line 2932 "parser.cpp" break; case 164: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 646 "parser.ypp" +#line 643 "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 2953 "parser.cpp" +#line 2938 "parser.cpp" break; case 165: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2959 "parser.cpp" +#line 2944 "parser.cpp" break; case 166: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 653 "parser.ypp" +#line 650 "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 2965 "parser.cpp" +#line 2950 "parser.cpp" break; case 167: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 655 "parser.ypp" +#line 652 "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 2971 "parser.cpp" +#line 2956 "parser.cpp" break; case 168: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 657 "parser.ypp" +#line 654 "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 2977 "parser.cpp" +#line 2962 "parser.cpp" break; case 169: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 659 "parser.ypp" +#line 656 "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 2983 "parser.cpp" +#line 2968 "parser.cpp" break; case 170: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 664 "parser.ypp" +#line 661 "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 2989 "parser.cpp" +#line 2974 "parser.cpp" break; case 171: // expr_parameters: expr_parameters "," expr_identifier -#line 669 "parser.ypp" +#line 666 "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 2995 "parser.cpp" +#line 2980 "parser.cpp" break; case 172: // expr_parameters: expr_identifier -#line 671 "parser.ypp" +#line 668 "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 3001 "parser.cpp" +#line 2986 "parser.cpp" break; case 173: // expr_parameters: %empty -#line 673 "parser.ypp" +#line 670 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3007 "parser.cpp" +#line 2992 "parser.cpp" break; case 174: // expr_arguments: expr_arguments_no_empty -#line 678 "parser.ypp" +#line 675 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3013 "parser.cpp" +#line 2998 "parser.cpp" break; case 175: // expr_arguments: %empty -#line 680 "parser.ypp" +#line 677 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3019 "parser.cpp" +#line 3004 "parser.cpp" break; case 176: // expr_arguments_no_empty: expr_arguments "," expr -#line 685 "parser.ypp" +#line 682 "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 3025 "parser.cpp" +#line 3010 "parser.cpp" break; case 177: // expr_arguments_no_empty: expr -#line 687 "parser.ypp" +#line 684 "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 3031 "parser.cpp" +#line 3016 "parser.cpp" break; case 178: // expr_reference: "::" expr_identifier -#line 692 "parser.ypp" +#line 689 "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 3037 "parser.cpp" +#line 3022 "parser.cpp" break; case 179: // expr_reference: expr_path "::" expr_identifier -#line 694 "parser.ypp" +#line 691 "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 3043 "parser.cpp" +#line 3028 "parser.cpp" break; case 180: // expr_array: expr_object "[" expr "]" -#line 699 "parser.ypp" +#line 696 "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 3049 "parser.cpp" +#line 3034 "parser.cpp" break; case 181: // expr_field: expr_object "." expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3055 "parser.cpp" +#line 3040 "parser.cpp" break; case 182: // expr_size: expr_object ".size" -#line 709 "parser.ypp" +#line 706 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3061 "parser.cpp" +#line 3046 "parser.cpp" break; case 183: // expr_paren: "(" expr ")" -#line 714 "parser.ypp" +#line 711 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3067 "parser.cpp" +#line 3052 "parser.cpp" break; case 184: // expr_object: expr_call -#line 718 "parser.ypp" +#line 715 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3073 "parser.cpp" +#line 3058 "parser.cpp" break; case 185: // expr_object: expr_method -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3079 "parser.cpp" +#line 3064 "parser.cpp" break; case 186: // expr_object: expr_array -#line 720 "parser.ypp" +#line 717 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3085 "parser.cpp" +#line 3070 "parser.cpp" break; case 187: // expr_object: expr_field -#line 721 "parser.ypp" +#line 718 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3091 "parser.cpp" +#line 3076 "parser.cpp" break; case 188: // expr_object: expr_game -#line 722 "parser.ypp" +#line 719 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3097 "parser.cpp" +#line 3082 "parser.cpp" break; case 189: // expr_object: expr_self -#line 723 "parser.ypp" +#line 720 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3103 "parser.cpp" +#line 3088 "parser.cpp" break; case 190: // expr_object: expr_anim -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3109 "parser.cpp" +#line 3094 "parser.cpp" break; case 191: // expr_object: expr_level -#line 725 "parser.ypp" +#line 722 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3115 "parser.cpp" +#line 3100 "parser.cpp" break; case 192: // expr_object: expr_identifier -#line 726 "parser.ypp" +#line 723 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3121 "parser.cpp" +#line 3106 "parser.cpp" break; case 193: // expr_thisthread: "thisthread" -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3127 "parser.cpp" +#line 3112 "parser.cpp" break; case 194: // expr_empty_array: "[" "]" -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3133 "parser.cpp" +#line 3118 "parser.cpp" break; case 195: // expr_undefined: "undefined" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3139 "parser.cpp" +#line 3124 "parser.cpp" break; case 196: // expr_game: "game" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3145 "parser.cpp" +#line 3130 "parser.cpp" break; case 197: // expr_self: "self" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3151 "parser.cpp" +#line 3136 "parser.cpp" break; case 198: // expr_anim: "anim" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3157 "parser.cpp" +#line 3142 "parser.cpp" break; case 199: // expr_level: "level" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3163 "parser.cpp" +#line 3148 "parser.cpp" break; case 200: // expr_animation: "%" "identifier" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3169 "parser.cpp" +#line 3154 "parser.cpp" break; case 201: // expr_animtree: "#animtree" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3175 "parser.cpp" +#line 3160 "parser.cpp" break; case 202: // expr_identifier: "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3181 "parser.cpp" +#line 3166 "parser.cpp" break; case 203: // expr_path: "path" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3187 "parser.cpp" +#line 3172 "parser.cpp" break; case 204: // expr_path: expr_identifier -#line 783 "parser.ypp" +#line 780 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3193 "parser.cpp" +#line 3178 "parser.cpp" break; case 205: // expr_istring: "localized string" -#line 788 "parser.ypp" +#line 785 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3199 "parser.cpp" +#line 3184 "parser.cpp" break; case 206: // expr_string: "string literal" -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3205 "parser.cpp" +#line 3190 "parser.cpp" break; case 207: // expr_color: "color" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3211 "parser.cpp" +#line 3196 "parser.cpp" break; case 208: // expr_vector: "(" expr "," expr "," expr ")" -#line 803 "parser.ypp" +#line 800 "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 3217 "parser.cpp" +#line 3202 "parser.cpp" break; case 209: // expr_float: "-" "float" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3223 "parser.cpp" +#line 3208 "parser.cpp" break; case 210: // expr_float: "float" -#line 810 "parser.ypp" +#line 807 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3229 "parser.cpp" +#line 3214 "parser.cpp" break; - case 211: // expr_integer: "-" "int" -#line 815 "parser.ypp" + case 211: // expr_integer: "-" "integer" +#line 812 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3235 "parser.cpp" +#line 3220 "parser.cpp" break; - case 212: // expr_integer: "int" -#line 817 "parser.ypp" + case 212: // expr_integer: "integer" +#line 814 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3241 "parser.cpp" +#line 3226 "parser.cpp" break; - case 213: // expr_integer: "octal int" + case 213: // expr_false: "false" #line 819 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3247 "parser.cpp" - break; - - case 214: // expr_integer: "binary int" -#line 821 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3253 "parser.cpp" - break; - - case 215: // expr_integer: "hexadecimal int" -#line 823 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3259 "parser.cpp" - break; - - case 216: // expr_false: "false" -#line 828 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3265 "parser.cpp" +#line 3232 "parser.cpp" break; - case 217: // expr_true: "true" -#line 833 "parser.ypp" + case 214: // expr_true: "true" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3271 "parser.cpp" +#line 3238 "parser.cpp" break; -#line 3275 "parser.cpp" +#line 3242 "parser.cpp" default: break; @@ -3466,27 +3433,27 @@ namespace xsk { namespace gsc { namespace iw7 { "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", "localized string", "color", - "float", "int", "octal int", "binary int", "hexadecimal int", - "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", - "POSTINC", "POSTDEC", "$accept", "root", "program", "inline", "include", - "declaration", "decl_usingtree", "decl_constant", "decl_thread", "stmt", - "stmt_dev", "stmt_block", "stmt_list", "stmt_expr", "stmt_call", - "stmt_assign", "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", - "stmt_waittillmatch", "stmt_waittillframeend", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier", "expr_path", "expr_istring", - "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", - "expr_false", "expr_true", YY_NULLPTR + "float", "integer", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", + "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", + "inline", "include", "declaration", "decl_usingtree", "decl_constant", + "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", + "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", + "stmt_wait", "stmt_waittill", "stmt_waittillmatch", + "stmt_waittillframeend", "stmt_if", "stmt_ifelse", "stmt_while", + "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", "stmt_case", + "stmt_default", "stmt_break", "stmt_continue", "stmt_return", + "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", "expr", + "expr_or_empty", "expr_assign", "expr_increment", "expr_decrement", + "expr_ternary", "expr_binary", "expr_primitive", "expr_complement", + "expr_not", "expr_call", "expr_method", "expr_function", "expr_pointer", + "expr_add_array", "expr_parameters", "expr_arguments", + "expr_arguments_no_empty", "expr_reference", "expr_array", "expr_field", + "expr_size", "expr_paren", "expr_object", "expr_thisthread", + "expr_empty_array", "expr_undefined", "expr_game", "expr_self", + "expr_anim", "expr_level", "expr_animation", "expr_animtree", + "expr_identifier", "expr_path", "expr_istring", "expr_string", + "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", + "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3751,57 +3718,57 @@ namespace xsk { namespace gsc { namespace iw7 { } - const short parser::yypact_ninf_ = -261; + const short parser::yypact_ninf_ = -263; const short parser::yytable_ninf_ = -205; const short parser::yypact_[] = { - 17, -261, -261, -61, -61, -12, -261, 42, 17, -261, - -261, -261, -261, -261, -261, -17, -261, -261, -36, 15, - -16, -261, -261, -261, -261, -8, 911, -261, -261, -261, - 38, 18, -261, -261, -40, -33, -261, 41, -261, -261, - -261, -261, -261, -261, -261, 911, 777, -8, 911, 911, - -43, 1, -261, -261, -261, -261, -261, -261, -261, 2063, - -261, -261, -261, -261, -261, 69, 347, -261, -261, -261, - -261, 507, 710, -261, -261, 734, -261, -261, -261, 742, - 801, 867, 875, -261, -261, 26, 45, -261, -261, -261, - -261, -261, -261, -261, -261, 49, 53, -8, 58, 66, - 60, 70, 77, 89, 90, 1389, 777, -261, 2146, 95, - 103, -261, -261, -261, -261, -261, -261, -261, 911, 911, - 911, 911, 911, 911, 911, 911, 911, 911, 911, 911, - 911, 911, 911, 911, 911, 911, 911, -261, 978, -8, - -261, -261, 117, 112, 911, -8, -261, 1073, -261, -261, - 911, 911, -8, 911, 911, -8, 911, -261, 911, 974, - 911, -261, 2028, 162, 162, 2177, 2187, 1059, 1059, 8, - 8, 8, 8, 2218, 2259, 2228, -15, -15, -261, -261, - -261, 1833, -261, -8, 36, -261, 123, 1149, 911, 120, - 125, 1327, 128, 132, 134, 135, 28, 127, 131, 133, - 844, 136, 145, 150, -261, 147, 570, 570, -261, -261, - -261, 1200, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, 142, 144, 146, 148, 149, - -261, -261, 642, -261, -261, -261, -261, -10, 1873, 55, - 155, 1913, 64, 160, 1953, 1992, 156, 2146, 911, -261, - 123, -261, 911, -261, 1276, 2098, -261, 911, 190, 911, - -2, -8, 911, 111, 158, 167, -261, -261, -261, -261, - 2133, -261, 911, 911, 911, -261, -261, 438, 438, -261, - -261, -261, -261, -261, -261, -261, 166, 169, 171, 180, - -261, -261, 911, 911, 911, 911, 911, 911, 911, 911, - 911, 911, 911, 176, -261, 911, 177, -261, 911, 178, - 911, 185, 2146, 82, -261, -261, 1555, 186, 1589, 188, - -261, -261, -261, 1353, -3, 1623, -261, -261, -261, 83, - 84, 974, 911, 911, 911, 911, 2146, 2146, 2146, 2146, - 2146, 2146, 2146, 2146, 2146, 2146, 2146, 197, 85, 200, - 86, 207, 1657, 911, -261, 1327, 911, 1327, 911, 911, - -8, 53, 199, 203, 1691, 1433, 1477, 1521, 911, -261, - 911, -261, 911, -261, 94, 214, 1725, -261, 2146, 204, - 1759, 232, -261, -261, -261, 205, 206, 911, 208, 911, - 209, 911, 97, 115, 118, -261, 1327, 212, -2, 1327, - 911, -261, -261, 216, -261, 222, -261, 224, -261, -261, - -261, -261, -261, 225, -261, 1793, 219, 221, 223, 1327, - 1327, -261, -261, -261, -261, -261 + 34, -263, -263, -22, -22, -28, -263, 19, 34, -263, + -263, -263, -263, -263, -263, -17, -263, -263, -4, 4, + -48, -263, -263, -263, -263, -38, 1180, -263, -263, -263, + 15, 33, -263, -263, -33, -24, -263, 6, -263, -263, + -263, -263, -263, -263, -263, 1180, 630, -38, 1180, 1180, + -15, -16, -263, -263, -263, -263, 2051, -263, -263, -263, + -263, -263, -14, 78, -263, -263, -263, -263, 532, 652, + -263, -263, 678, -263, -263, -263, 713, 727, 756, 866, + -263, -263, 57, 32, -263, -263, -263, -263, -263, -263, + -263, -263, 37, 54, -38, 56, 71, 62, 73, 88, + 90, 93, 1377, 630, -263, 2134, 98, 116, -263, -263, + -263, -263, -263, -263, -263, 1180, 1180, 1180, 1180, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 1180, 1180, 1180, 1180, -263, 1244, -38, -263, -263, 94, + 110, 1180, -38, -263, 835, -263, -263, 1180, 1180, -38, + 1180, 1180, -38, 1180, -263, 1180, 1176, 1180, -263, 2016, + 115, 115, 2165, 1321, 948, 948, 271, 271, 271, 271, + 747, 2206, 2175, 84, 84, -263, -263, -263, 1821, -263, + -38, 48, -263, 122, 911, 1180, 119, 125, 1089, 131, + 132, 133, 134, 21, 135, 136, 137, 1116, 138, 143, + 151, -263, 149, 605, 605, -263, -263, -263, 962, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, 152, 153, 154, 156, 157, -263, -263, 1292, + -263, -263, -263, -263, 3, 1861, 49, 172, 1901, 52, + 173, 1941, 1980, 178, 2134, 1180, -263, 122, -263, 1180, + -263, 1038, 2086, -263, 1180, 202, 1180, 29, -38, 1180, + 127, 175, 176, -263, -263, -263, -263, 2121, -263, 1180, + 1180, 1180, -263, -263, -2, -2, -263, -263, -263, -263, + -263, -263, -263, 186, 188, 189, 193, -263, -263, 1180, + 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, 1180, + 187, -263, 1180, 190, -263, 1180, 194, 1180, 198, 2134, + 75, -263, -263, 1543, 200, 1577, 184, -263, -263, -263, + 1341, 1, 1611, -263, -263, -263, 83, 85, 1176, 1180, + 1180, 1180, 1180, 2134, 2134, 2134, 2134, 2134, 2134, 2134, + 2134, 2134, 2134, 2134, 201, 86, 204, 89, 206, 1645, + 1180, -263, 1089, 1180, 1089, 1180, 1180, -38, 54, 197, + 199, 1679, 1421, 1465, 1509, 1180, -263, 1180, -263, 1180, + -263, 106, 235, 1713, -263, 2134, 203, 1747, 232, -263, + -263, -263, 207, 209, 1180, 210, 1180, 212, 1180, 107, + 113, 114, -263, 1089, 213, 29, 1089, 1180, -263, -263, + 227, -263, 228, -263, 231, -263, -263, -263, -263, -263, + 237, -263, 1781, 226, 230, 233, 1089, 1089, -263, -263, + -263, -263, -263 }; const unsigned char @@ -3810,483 +3777,470 @@ namespace xsk { namespace gsc { namespace iw7 { 3, 12, 13, 0, 0, 0, 202, 0, 2, 7, 8, 9, 14, 15, 16, 0, 203, 204, 0, 0, 0, 1, 4, 5, 6, 173, 0, 10, 11, 206, - 0, 0, 172, 201, 0, 0, 193, 0, 217, 216, + 0, 0, 172, 201, 0, 0, 193, 0, 214, 213, 195, 196, 197, 198, 199, 0, 175, 0, 0, 0, - 0, 0, 205, 207, 210, 212, 213, 214, 215, 0, - 87, 88, 89, 126, 127, 128, 129, 156, 157, 130, - 131, 132, 133, 134, 135, 0, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 0, 146, 147, 148, - 149, 150, 151, 152, 153, 0, 0, 0, 0, 204, - 0, 0, 204, 0, 0, 0, 175, 194, 177, 0, - 174, 178, 155, 154, 209, 211, 200, 18, 0, 0, + 0, 0, 205, 207, 210, 212, 0, 87, 88, 89, + 126, 127, 128, 129, 156, 157, 130, 131, 132, 133, + 134, 135, 0, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, + 152, 153, 0, 0, 0, 0, 204, 0, 0, 204, + 0, 0, 0, 175, 194, 177, 0, 174, 178, 155, + 154, 209, 211, 200, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 182, 0, 0, - 158, 159, 204, 0, 175, 0, 17, 0, 19, 171, - 0, 175, 0, 0, 175, 0, 0, 183, 0, 177, - 0, 170, 0, 119, 120, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, - 125, 0, 181, 0, 0, 174, 179, 0, 0, 0, + 0, 0, 0, 0, 182, 0, 0, 158, 159, 204, + 0, 175, 0, 17, 0, 19, 171, 0, 175, 0, + 0, 175, 0, 0, 183, 0, 177, 0, 170, 0, + 119, 120, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 121, 122, 123, 124, 125, 0, 181, + 0, 0, 174, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 0, 0, 0, 50, 20, - 21, 0, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 0, 0, 0, 184, 185, - 186, 187, 0, 188, 189, 190, 191, 192, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 176, 0, 180, - 0, 160, 175, 46, 0, 0, 68, 0, 0, 0, - 54, 0, 0, 0, 0, 0, 79, 80, 81, 83, - 0, 84, 175, 175, 0, 184, 185, 103, 105, 47, - 49, 57, 58, 59, 55, 56, 0, 0, 0, 0, - 104, 106, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 162, 175, 0, 164, 175, 0, - 0, 0, 107, 0, 45, 63, 0, 0, 0, 0, - 51, 52, 53, 0, 0, 0, 78, 77, 82, 0, - 0, 0, 0, 0, 0, 0, 92, 98, 99, 100, - 101, 102, 93, 94, 95, 97, 96, 0, 0, 0, - 0, 0, 0, 175, 161, 0, 0, 0, 91, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 175, 163, - 175, 165, 175, 208, 0, 69, 0, 71, 90, 0, - 0, 0, 76, 85, 86, 0, 0, 175, 0, 175, - 0, 175, 0, 0, 0, 166, 0, 0, 54, 0, - 0, 60, 62, 174, 65, 174, 67, 174, 167, 168, - 169, 70, 72, 0, 74, 0, 0, 0, 0, 0, - 0, 61, 64, 66, 73, 75 + 0, 48, 0, 0, 0, 50, 20, 21, 0, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 0, 0, 0, 184, 185, 186, 187, 0, + 188, 189, 190, 191, 192, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 176, 0, 180, 0, 160, 175, + 46, 0, 0, 68, 0, 0, 0, 54, 0, 0, + 0, 0, 0, 79, 80, 81, 83, 0, 84, 175, + 175, 0, 184, 185, 103, 105, 47, 49, 57, 58, + 59, 55, 56, 0, 0, 0, 0, 104, 106, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 162, 175, 0, 164, 175, 0, 0, 0, 107, + 0, 45, 63, 0, 0, 0, 0, 51, 52, 53, + 0, 0, 0, 78, 77, 82, 0, 0, 0, 0, + 0, 0, 0, 92, 98, 99, 100, 101, 102, 93, + 94, 95, 97, 96, 0, 0, 0, 0, 0, 0, + 175, 161, 0, 0, 0, 91, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 175, 163, 175, 165, 175, + 208, 0, 69, 0, 71, 90, 0, 0, 0, 76, + 85, 86, 0, 0, 175, 0, 175, 0, 175, 0, + 0, 0, 166, 0, 0, 54, 0, 0, 60, 62, + 174, 65, 174, 67, 174, 167, 168, 169, 70, 72, + 0, 74, 0, 0, 0, 0, 0, 0, 61, 64, + 66, 73, 75 }; const short parser::yypgoto_[] = { - -261, -261, -261, 267, 274, 275, -261, -261, -261, -175, - -261, -94, 98, -124, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, - -261, -261, -261, -261, -261, -261, -261, 187, -261, -260, - -259, -255, -261, -261, -261, -261, -261, -128, -37, -70, - -66, -261, -261, 425, -45, -261, -26, 157, -261, -261, - 241, -261, -261, -261, 255, 273, 329, 361, -261, -261, - 0, 9, -261, -14, -261, -261, -261, 93, -261, -261 + -263, -263, -263, 279, 281, 282, -263, -263, -263, -181, + -263, -91, 108, -114, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, -263, -263, -263, + -263, -263, -263, -263, -263, -263, -263, 185, -263, -262, + -257, -251, -263, -263, -263, -263, -263, -82, 70, -66, + -61, -263, -263, -120, -45, -263, 181, 192, -263, -263, + 253, -263, -263, -263, 327, 365, 373, 421, -263, -263, + 0, 9, -263, -11, -263, -263, -263, 102, -263, -263 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 208, - 209, 210, 211, 329, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 108, 389, 235, - 236, 237, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 31, 109, 185, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 205, + 206, 207, 208, 326, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 105, 386, 232, + 233, 234, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 31, 106, 182, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 30, 98, 15, 141, - 330, 331, 18, 19, 101, 332, 268, 27, 369, 238, - 1, 2, 3, 4, 5, 32, 25, 16, 6, 34, - 35, 20, 37, 144, 99, 102, 290, 41, 42, 43, - 44, -204, 21, 100, 103, 205, 370, 111, 16, 6, - 114, 115, 26, 206, 207, 16, 6, -192, -192, 238, - -192, 110, 96, 238, -192, 119, 120, 97, 28, 144, - 134, 135, 136, -192, 29, 142, -192, -204, 285, 285, - 261, 6, 95, 238, 143, 160, 16, 6, 104, 290, - 116, 132, 133, 134, 135, 136, 145, 149, 147, 314, - -184, -184, 146, -184, 160, 150, 6, -184, 317, 151, - 239, 152, 273, 160, -192, -192, -184, 153, 29, -184, - 154, 240, 55, 56, 57, 58, 364, 372, 373, 379, - 381, 160, 160, 160, 160, 160, 238, 156, 405, 182, - 155, 418, 285, 160, 160, 186, 160, 247, 330, 331, - 239, 161, 250, 332, 239, 253, 143, -184, -184, 419, - 144, 240, 420, 183, 160, 240, 262, 160, 267, 286, - 286, 269, 140, 266, 239, 270, 141, 271, 272, 276, - 240, 240, 274, 260, 277, 240, 278, 247, 282, 281, - 385, 247, 387, 283, 284, 291, 143, 292, 315, 293, - 143, 294, 295, 318, 321, 115, 247, 247, 327, 342, - 336, 247, 343, 59, 344, 143, 143, 140, 140, 337, - 143, 141, 141, 345, 357, 359, 361, 239, 363, 366, - 406, 421, 105, 286, 424, 112, 113, 238, 240, 238, - 378, 368, 142, 380, 240, 132, 133, 134, 135, 136, - 382, 143, 393, 410, 434, 435, 394, 408, 411, 412, - 426, 414, 416, 140, 247, 422, 427, 141, 428, 429, - 247, 334, 431, 143, 432, 22, 433, 392, 238, 143, - 285, 238, 23, 24, 423, 264, 0, 142, 142, 275, - 0, 0, 0, 159, 0, 0, 143, 143, 0, 0, - 0, 238, 238, 0, 241, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 0, 181, 0, 0, 239, 0, - 239, 0, 0, 142, 0, 0, 0, 248, 0, 240, - 251, 240, 143, 254, 241, 255, 0, 257, 241, 0, - 0, 0, 413, 0, 415, 0, 417, 0, 0, 0, - 0, 0, 0, 241, 241, 247, 0, 247, 241, 239, - 391, 286, 239, 0, 143, 265, 143, 0, -185, -185, - 240, -185, 240, 240, 0, -185, 0, 280, 242, 0, - 0, 0, 239, 239, -185, 0, 0, -185, 0, 0, - 0, 0, 243, 240, 240, 0, 247, 0, 247, 247, - 0, 0, 0, 0, 0, 143, 0, 143, 143, 0, - 244, 241, 0, 0, 0, 0, 0, 241, 242, 247, - 247, 0, 242, 0, 0, -185, -185, 0, 143, 143, - 0, 0, 243, 0, 0, 322, 243, 287, 288, 0, - 0, 0, 242, 0, 326, 0, 328, 0, 0, 335, - 244, 243, 243, 0, 244, 0, 243, 0, 0, 34, - 35, 341, 37, 0, 0, 0, 245, 0, 0, 244, - 244, 0, 0, 0, 244, 138, 0, 0, 139, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 0, 0, 0, 0, 0, 242, 0, 362, 246, 0, - 0, 333, 0, 0, 0, 0, 245, 0, 0, 243, - 245, 0, 241, 0, 241, 243, 16, 6, 0, 374, - 375, 376, 377, 0, 0, 245, 245, 244, -186, -186, - 245, -186, 0, 244, 0, -186, 0, 0, 246, 0, - 0, 0, 246, 386, -186, 388, 390, -186, 0, 0, - 0, 0, 0, 241, 0, 241, 241, 246, 246, 184, - 0, 0, 246, 0, 0, 0, 249, 0, 0, 252, - 0, 0, 0, 0, 0, 0, 241, 241, 0, 0, - 0, 0, 0, 245, 0, -186, -186, 425, 0, 245, - 0, 34, 35, 0, 37, 0, 242, 0, 242, 41, - 42, 43, 44, 0, 0, 0, 0, 205, 0, 0, - 243, 0, 243, 0, 0, 246, 0, 0, 0, 0, - 0, 246, 0, 0, 0, 0, 0, 0, 244, 0, - 244, 0, 0, 0, 0, 0, 0, 242, 0, 333, - 242, 296, 297, 0, 298, 299, 0, 0, 16, 6, - 0, 243, 0, 243, 243, 0, 0, 0, 0, 0, - 242, 242, 0, 34, 35, 0, 37, 0, 0, 244, - 0, 244, 244, 0, 243, 243, 0, 323, 0, 138, - 0, 0, 139, 0, 245, 0, 245, 300, 301, 0, - 0, 0, 244, 244, 0, 0, 0, 339, 340, 0, - 0, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 0, 0, 0, 0, 246, 0, 246, 0, - 16, 6, 0, 0, 0, 245, 0, 245, 245, 0, - 358, -187, -187, 360, -187, 0, 0, 0, -187, 0, - 0, 0, 0, 0, 0, 0, 0, -187, 245, 245, - -187, 0, 0, 0, 0, 34, 35, 246, 37, 246, - 246, 0, 137, -188, -188, 0, -188, 0, 0, 0, - -188, 138, 0, 0, 139, 33, 0, 0, 384, -188, - 246, 246, -188, 0, 0, 0, 0, 0, -187, -187, - 0, 0, 0, 402, 0, 403, 0, 404, 34, 35, - 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, - 45, 0, 16, 6, 106, 107, 0, 0, 47, 0, - -188, -188, -189, -189, 0, -189, 0, 0, 0, -189, - 0, 0, 0, 0, 48, 49, 0, 0, -189, 0, - 0, -189, 33, 0, 0, 0, 0, 0, 0, 0, - 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, - 54, 55, 56, 57, 58, 34, 35, 36, 37, 38, - 39, 40, 0, 41, 42, 43, 44, 45, 0, -189, - -189, 46, 0, 0, 0, 47, 0, 279, -190, -190, - 0, -190, 0, 0, 0, -190, -191, -191, 0, -191, - 0, 48, 49, -191, -190, 0, 0, -190, 0, 33, - 0, 0, -191, 0, 0, -191, 0, 0, 50, 0, - 0, 51, 16, 6, 29, 52, 53, 54, 55, 56, - 57, 58, 34, 35, 36, 37, 38, 39, 40, 0, - 41, 42, 43, 44, 45, -190, -190, 0, 46, 0, - 0, 0, 47, -191, -191, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 49, - 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, - 0, 0, 0, 0, 0, 50, 0, 0, 51, 16, - 6, 29, 52, 53, 54, 55, 56, 57, 58, 34, - 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 44, 45, 256, 0, 0, 106, 0, 0, 118, 47, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 48, 49, 0, 0, 0, - 0, 0, 0, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 50, 0, 0, 51, 16, 6, 29, 52, - 53, 54, 55, 56, 57, 58, 187, 0, 0, 0, - 0, 0, 0, 0, 188, 0, 0, 189, 190, 0, - 191, 192, 193, 194, 0, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 34, 35, 0, 37, 0, 0, - 0, 0, 41, 42, 43, 44, 119, 120, 147, 204, - 205, 0, 125, 126, 127, 128, 0, 0, 206, 207, + 15, 107, 145, 17, 17, 327, 137, 265, 15, 30, + 328, 138, 18, 19, 95, 20, 329, -184, -184, 21, + -184, 181, 366, 98, -184, 32, 25, 287, 246, 34, + 35, 249, 37, -184, 96, 99, -184, 1, 2, 3, + 4, 5, 29, 97, 100, 135, 141, 108, 136, 27, + 367, 6, 26, 101, -204, 16, 6, 28, 107, 92, + 34, 35, 235, 37, 16, 6, 16, 6, 41, 42, + 43, 44, 139, 113, -184, -184, 202, 93, 111, 112, + 287, 140, 94, 142, 203, 204, 16, 6, -192, -192, + 143, -192, 258, 311, 146, -192, 314, 157, 157, 144, + 141, 157, 235, 147, -192, 270, 235, -192, -204, -185, + -185, 29, -185, 149, 148, 55, -185, 16, 6, 361, + 150, 282, 282, 6, 157, -185, 235, 369, -185, 370, + 376, 151, 157, 378, 157, 157, 179, 141, 157, 320, + 153, 152, 183, 327, 244, -192, -192, 157, 328, 247, + 402, 415, 250, 140, 329, 157, 157, 416, 417, 336, + 337, 180, 157, 157, 158, 259, -185, -185, 264, 131, + 132, 133, 263, 137, 266, 267, 268, 269, 138, 235, + 257, 382, 271, 384, 244, 282, 279, 273, 244, 274, + 275, 278, 355, 140, 280, 357, 281, 140, 129, 130, + 131, 132, 133, 244, 244, 288, 289, 290, 244, 291, + 292, 56, 140, 140, 236, 312, 315, 140, 137, 137, + 324, 112, 418, 138, 138, 421, 318, 333, 334, 339, + 102, 340, 341, 109, 110, 354, 342, 365, 356, 139, + 381, 360, 358, 363, 375, 431, 432, 377, 140, 379, + 390, 403, 391, 407, 236, 399, 405, 400, 236, 401, + 408, 244, 409, 411, 137, 413, 419, 244, 331, 138, + 140, 423, 424, 283, 283, 425, 140, 389, 236, 428, + 235, 426, 235, 429, 139, 139, 430, 22, 156, 23, + 24, 420, 261, 140, 140, 272, 0, 0, 0, 0, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 0, + 178, 235, 0, 282, 235, 237, 0, 0, 116, 117, + 139, 236, 245, 0, 0, 248, 238, 283, 251, 140, + 252, 0, 254, 0, 235, 235, 0, 0, 0, 410, + 0, 412, 0, 414, 129, 130, 131, 132, 133, 0, + 0, 0, 244, 0, 244, 237, 0, 388, 0, 237, + 262, 140, 0, 140, 0, 0, 238, 0, 0, 0, + 238, 0, 277, 0, 237, 237, 0, 0, 0, 237, + 0, 0, 0, 0, 0, 238, 238, 239, 0, 0, + 238, 0, 0, 244, 0, 244, 244, 0, 0, 0, + 0, 0, 140, 0, 140, 140, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 244, 244, 0, 0, + 0, 0, 236, 0, 236, 140, 140, 239, 0, 0, + 319, 239, 237, 0, 0, 0, 0, 0, 237, 323, + 0, 325, 0, 238, 332, 0, 284, 285, 0, 238, + 0, 239, 0, 0, 0, 0, 338, 0, 0, 0, + 0, 240, 0, 236, 0, 283, 236, 0, 0, 0, + 0, 0, 0, 0, 343, 344, 345, 346, 347, 348, + 349, 350, 351, 352, 353, 0, 236, 236, 0, 0, + 0, 0, 359, 0, 0, 0, 0, 0, 0, 241, + 0, 240, 0, 0, 239, 240, 0, 242, 0, 0, + 330, 0, 0, 0, 371, 372, 373, 374, 0, 0, + 240, 240, 0, 0, 0, 240, 0, 0, 0, 0, + 0, 0, 0, 237, 0, 237, 0, 0, 383, 241, + 385, 387, 0, 241, 238, 0, 238, 242, 0, 0, + 0, 242, 0, -186, -186, 243, -186, 0, 241, 241, + -186, 0, 0, 241, 0, 0, 242, 242, 0, -186, + 0, 242, -186, 0, 237, 0, 237, 237, 240, 0, + 0, 0, 422, 0, 240, 238, 0, 238, 238, 0, + 0, 0, 0, 0, 0, 243, 0, 237, 237, 243, + 0, 0, 0, 0, 0, 239, 0, 239, 238, 238, + -186, -186, 0, 0, 243, 243, 241, 0, 0, 243, + 0, 0, 241, 0, 242, 0, 34, 35, 33, 37, + 242, 0, 0, 0, 41, 42, 43, 44, 0, 0, + 0, 0, 202, 0, 0, 0, 239, 0, 330, 239, + 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 103, 104, 239, + 239, 47, 243, -187, -187, 0, -187, 0, 243, 240, + -187, 240, 0, 16, 6, 0, 0, 48, 49, -187, + 0, 0, -187, 0, 0, 0, 0, 0, 0, 34, + 35, 0, 37, 0, 50, 0, 134, 51, 16, 6, + 29, 52, 53, 54, 55, 135, 0, 241, 136, 241, + 240, 0, 240, 240, 0, 242, 0, 242, 0, 0, + -187, -187, 0, 0, -188, -188, 0, -188, 0, 0, + 0, -188, 0, 240, 240, 0, 0, 0, -189, -189, + -188, -189, 0, -188, 0, -189, 16, 6, 241, 0, + 241, 241, 0, 0, -189, 0, 242, -189, 242, 242, + 0, 0, 0, 243, 0, 243, 0, -190, -190, 0, + -190, 241, 241, 0, -190, 0, 0, 0, 0, 242, + 242, -188, -188, -190, 116, 117, -190, 0, 120, 121, + 122, 123, 124, 125, 0, -189, -189, 0, 0, 0, + 0, 0, 0, 0, 243, 0, 243, 243, 127, 128, + 129, 130, 131, 132, 133, 0, 0, 0, 184, 0, + 0, 0, 0, 0, -190, -190, 185, 243, 243, 186, + 187, 0, 188, 189, 190, 191, 0, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 34, 35, 0, 37, + 0, 0, 0, 0, 41, 42, 43, 44, 0, 0, + 144, 201, 202, 0, 0, 0, 0, 0, 0, 0, + 203, 204, 0, 0, 0, 0, 0, -191, -191, 0, + -191, 0, 0, 0, -191, 0, 0, 0, 0, 0, + 0, 0, 0, -191, 184, 260, -191, 0, 0, 0, + 0, 0, 185, 16, 6, 186, 187, 0, 188, 189, + 190, 191, 0, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 34, 35, 0, 37, 0, 0, 0, 0, + 41, 42, 43, 44, -191, -191, 144, 0, 202, 0, + 0, 0, 0, 0, 0, 184, 203, 204, 0, 0, + 0, 0, 0, 185, 0, 0, 186, 187, 0, 188, + 189, 190, 191, 0, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 34, 35, 0, 37, 0, 0, 16, + 6, 41, 42, 43, 44, 116, 117, 144, 286, 202, + 0, 122, 123, 124, 125, 0, 0, 203, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136, 0, 0, 0, - 0, 0, 187, 263, 0, 0, 0, 0, 0, 0, - 188, 16, 6, 189, 190, 0, 191, 192, 193, 194, - 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 34, 35, 0, 37, 0, 0, 0, 0, 41, 42, - 43, 44, 0, 0, 147, 0, 205, 0, 0, 0, - 0, 0, 0, 187, 206, 207, 0, 0, 0, 0, - 0, 188, 0, 0, 189, 190, 0, 191, 192, 193, - 194, 0, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 34, 35, 0, 37, 0, 0, 16, 6, 41, - 42, 43, 44, 0, 0, 147, 289, 205, 0, 0, - 0, 0, 0, 0, 0, 206, 207, 0, 0, 0, + 0, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 184, 321, 0, 0, 0, 0, 0, 0, 185, + 16, 6, 186, 187, 0, 188, 189, 190, 191, 0, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 34, + 35, 0, 37, 0, 0, 0, 0, 41, 42, 43, + 44, 0, 0, 144, 0, 202, 0, 0, 0, 0, + 0, 0, 184, 203, 204, 0, 0, 0, 0, 0, + 185, 0, 0, 186, 187, 0, 188, 189, 190, 191, + 0, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 34, 35, 0, 37, 33, 0, 16, 6, 41, 42, + 43, 44, 0, 0, 144, 0, 202, 0, 0, 0, + 0, 0, 0, 0, 203, 204, 0, 34, 35, 36, + 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, + 0, 0, 0, 46, 0, 0, 0, 47, 0, 276, + 0, 0, 0, 0, 0, 0, 0, 16, 6, 0, + 0, 0, 0, 48, 49, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 187, - 324, 0, 0, 0, 0, 0, 0, 188, 16, 6, - 189, 190, 0, 191, 192, 193, 194, 0, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 34, 35, 0, - 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, - 0, 147, 0, 205, 0, 0, 0, 0, 0, 0, - 187, 206, 207, 0, 0, 0, 0, 0, 188, 0, - 0, 189, 190, 0, 191, 192, 193, 194, 0, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 34, 35, - 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, - 0, 0, 147, 0, 205, 0, 0, 0, 0, 0, - 0, 0, 206, 207, 34, 35, 0, 37, 0, 0, + 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 253, 0, 0, 46, 0, 0, + 115, 47, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 48, 49, 0, + 0, 0, 33, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 103, 0, 0, 0, 47, 0, 0, 0, 0, + 0, 293, 294, 0, 295, 296, 0, 0, 0, 0, + 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 34, 35, 0, 37, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 135, + 0, 0, 136, 0, 0, 0, 0, 297, 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 138, 0, 0, 139, 0, 0, 0, 0, 300, 301, - 0, 0, 0, 0, 0, 16, 6, 0, 0, 0, - 0, 0, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 157, 0, 0, 0, 0, 158, 0, - 0, 16, 6, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, + 0, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 34, 35, 0, 37, 0, 0, 116, 117, + 16, 6, 120, 121, 122, 123, 124, 125, 135, 0, + 0, 136, 0, 0, 0, 0, 297, 298, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, + 309, 154, 0, 0, 0, 0, 155, 0, 0, 16, + 6, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 393, 0, 0, 0, 0, + 394, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 395, + 0, 0, 0, 0, 396, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 397, 0, 0, 0, 0, 398, 0, + 0, 0, 0, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 362, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 364, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 368, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 392, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 404, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 406, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 427, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 256, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 310, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 313, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 316, + 0, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 317, + 0, 0, 0, 0, 115, 0, 0, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 126, 127, 128, 129, 130, 131, 132, 133, 255, 0, + 115, 0, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 114, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 322, + 115, 0, 0, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 131, 132, 133, 335, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 115, 0, + 0, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, + 0, 0, 0, 0, 126, 127, 128, 129, 130, 131, + 132, 133, 116, 117, 0, 119, 120, 121, 122, 123, + 124, 125, 116, 117, 0, 0, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 0, 0, 0, 127, 0, 129, 130, + 131, 132, 133, 116, 117, 0, 0, 120, 121, 122, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 396, 0, 0, - 0, 0, 397, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 398, 0, 0, 0, 0, 399, 0, 0, 0, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 400, 0, 0, 0, 0, - 401, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 367, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 371, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 383, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 395, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 407, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 409, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 118, 0, 0, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 430, 0, 129, - 130, 131, 132, 133, 134, 135, 136, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 259, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 313, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 316, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 319, 0, 0, 0, 0, 0, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 320, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 117, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 129, 130, 131, 132, 133, 134, 135, - 136, 325, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 338, 118, 0, 0, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 122, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 119, 120, 0, 0, 123, - 124, 125, 126, 127, 128, 119, 120, 0, 0, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 130, - 131, 132, 133, 134, 135, 136, 0, 0, 0, 130, - 0, 132, 133, 134, 135, 136, 119, 120, 0, 0, - 123, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 132, 133, 134, 135, 136 + 130, 131, 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 20, 47, 8, 75, - 270, 270, 3, 4, 47, 270, 191, 53, 21, 147, - 3, 4, 5, 6, 7, 25, 43, 88, 89, 31, - 32, 43, 34, 43, 34, 35, 211, 39, 40, 41, - 42, 51, 0, 34, 35, 47, 49, 47, 88, 89, - 93, 94, 69, 55, 56, 88, 89, 31, 32, 187, - 34, 106, 44, 191, 38, 57, 58, 49, 53, 43, - 85, 86, 87, 47, 90, 75, 50, 51, 206, 207, - 44, 89, 44, 211, 75, 49, 88, 89, 47, 264, - 89, 83, 84, 85, 86, 87, 51, 97, 45, 44, - 31, 32, 53, 34, 49, 47, 89, 38, 44, 43, - 147, 51, 84, 49, 88, 89, 47, 47, 90, 50, - 43, 147, 94, 95, 96, 97, 44, 44, 44, 44, - 44, 49, 49, 49, 49, 49, 264, 47, 44, 139, - 51, 44, 270, 49, 49, 145, 49, 147, 408, 408, - 187, 48, 152, 408, 191, 155, 147, 88, 89, 44, - 43, 187, 44, 51, 49, 191, 43, 49, 43, 206, - 207, 43, 242, 53, 211, 43, 242, 43, 43, 52, - 206, 207, 196, 183, 53, 211, 53, 187, 43, 53, - 365, 191, 367, 43, 47, 53, 187, 53, 43, 53, - 191, 53, 53, 43, 48, 94, 206, 207, 18, 43, - 52, 211, 43, 26, 43, 206, 207, 287, 288, 52, - 211, 287, 288, 43, 48, 48, 48, 264, 43, 43, - 16, 406, 45, 270, 409, 48, 49, 365, 264, 367, - 43, 53, 242, 43, 270, 83, 84, 85, 86, 87, - 43, 242, 53, 21, 429, 430, 53, 53, 53, 53, - 44, 53, 53, 333, 264, 53, 44, 333, 44, 44, - 270, 271, 53, 264, 53, 8, 53, 371, 406, 270, - 408, 409, 8, 8, 408, 187, -1, 287, 288, 196, - -1, -1, -1, 106, -1, -1, 287, 288, -1, -1, - -1, 429, 430, -1, 147, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, -1, 138, -1, -1, 365, -1, - 367, -1, -1, 333, -1, -1, -1, 150, -1, 365, - 153, 367, 333, 156, 187, 158, -1, 160, 191, -1, - -1, -1, 397, -1, 399, -1, 401, -1, -1, -1, - -1, -1, -1, 206, 207, 365, -1, 367, 211, 406, - 370, 408, 409, -1, 365, 188, 367, -1, 31, 32, - 406, 34, 408, 409, -1, 38, -1, 200, 147, -1, - -1, -1, 429, 430, 47, -1, -1, 50, -1, -1, - -1, -1, 147, 429, 430, -1, 406, -1, 408, 409, - -1, -1, -1, -1, -1, 406, -1, 408, 409, -1, - 147, 264, -1, -1, -1, -1, -1, 270, 187, 429, - 430, -1, 191, -1, -1, 88, 89, -1, 429, 430, - -1, -1, 187, -1, -1, 258, 191, 206, 207, -1, - -1, -1, 211, -1, 267, -1, 269, -1, -1, 272, - 187, 206, 207, -1, 191, -1, 211, -1, -1, 31, - 32, 284, 34, -1, -1, -1, 147, -1, -1, 206, - 207, -1, -1, -1, 211, 47, -1, -1, 50, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - -1, -1, -1, -1, -1, 264, -1, 320, 147, -1, - -1, 270, -1, -1, -1, -1, 187, -1, -1, 264, - 191, -1, 365, -1, 367, 270, 88, 89, -1, 342, - 343, 344, 345, -1, -1, 206, 207, 264, 31, 32, - 211, 34, -1, 270, -1, 38, -1, -1, 187, -1, - -1, -1, 191, 366, 47, 368, 369, 50, -1, -1, - -1, -1, -1, 406, -1, 408, 409, 206, 207, 144, - -1, -1, 211, -1, -1, -1, 151, -1, -1, 154, - -1, -1, -1, -1, -1, -1, 429, 430, -1, -1, - -1, -1, -1, 264, -1, 88, 89, 410, -1, 270, - -1, 31, 32, -1, 34, -1, 365, -1, 367, 39, - 40, 41, 42, -1, -1, -1, -1, 47, -1, -1, - 365, -1, 367, -1, -1, 264, -1, -1, -1, -1, - -1, 270, -1, -1, -1, -1, -1, -1, 365, -1, - 367, -1, -1, -1, -1, -1, -1, 406, -1, 408, - 409, 9, 10, -1, 12, 13, -1, -1, 88, 89, - -1, 406, -1, 408, 409, -1, -1, -1, -1, -1, - 429, 430, -1, 31, 32, -1, 34, -1, -1, 406, - -1, 408, 409, -1, 429, 430, -1, 262, -1, 47, - -1, -1, 50, -1, 365, -1, 367, 55, 56, -1, - -1, -1, 429, 430, -1, -1, -1, 282, 283, -1, - -1, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, -1, -1, -1, -1, 365, -1, 367, -1, - 88, 89, -1, -1, -1, 406, -1, 408, 409, -1, - 315, 31, 32, 318, 34, -1, -1, -1, 38, -1, - -1, -1, -1, -1, -1, -1, -1, 47, 429, 430, - 50, -1, -1, -1, -1, 31, 32, 406, 34, 408, - 409, -1, 38, 31, 32, -1, 34, -1, -1, -1, - 38, 47, -1, -1, 50, 8, -1, -1, 363, 47, - 429, 430, 50, -1, -1, -1, -1, -1, 88, 89, - -1, -1, -1, 378, -1, 380, -1, 382, 31, 32, - 33, 34, 35, 36, 37, -1, 39, 40, 41, 42, - 43, -1, 88, 89, 47, 48, -1, -1, 51, -1, - 88, 89, 31, 32, -1, 34, -1, -1, -1, 38, - -1, -1, -1, -1, 67, 68, -1, -1, 47, -1, - -1, 50, 8, -1, -1, -1, -1, -1, -1, -1, - -1, 84, -1, -1, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 31, 32, 33, 34, 35, - 36, 37, -1, 39, 40, 41, 42, 43, -1, 88, - 89, 47, -1, -1, -1, 51, -1, 53, 31, 32, - -1, 34, -1, -1, -1, 38, 31, 32, -1, 34, - -1, 67, 68, 38, 47, -1, -1, 50, -1, 8, - -1, -1, 47, -1, -1, 50, -1, -1, 84, -1, - -1, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 31, 32, 33, 34, 35, 36, 37, -1, - 39, 40, 41, 42, 43, 88, 89, -1, 47, -1, - -1, -1, 51, 88, 89, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, - -1, -1, -1, -1, -1, -1, 8, -1, -1, -1, - -1, -1, -1, -1, -1, 84, -1, -1, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 31, - 32, 33, 34, 35, 36, 37, -1, 39, 40, 41, - 42, 43, 48, -1, -1, 47, -1, -1, 54, 51, - -1, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, -1, -1, -1, -1, 67, 68, -1, -1, -1, - -1, -1, -1, -1, 80, 81, 82, 83, 84, 85, - 86, 87, 84, -1, -1, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 3, -1, -1, -1, - -1, -1, -1, -1, 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, 57, 58, 45, 46, - 47, -1, 63, 64, 65, 66, -1, -1, 55, 56, + 0, 46, 93, 3, 4, 267, 72, 188, 8, 20, + 267, 72, 3, 4, 47, 43, 267, 31, 32, 0, + 34, 141, 21, 47, 38, 25, 43, 208, 148, 31, + 32, 151, 34, 47, 34, 35, 50, 3, 4, 5, + 6, 7, 90, 34, 35, 47, 43, 47, 50, 53, + 49, 89, 69, 47, 51, 88, 89, 53, 103, 44, + 31, 32, 144, 34, 88, 89, 88, 89, 39, 40, + 41, 42, 72, 89, 88, 89, 47, 44, 93, 94, + 261, 72, 49, 51, 55, 56, 88, 89, 31, 32, + 53, 34, 44, 44, 94, 38, 44, 49, 49, 45, + 43, 49, 184, 47, 47, 84, 188, 50, 51, 31, + 32, 90, 34, 51, 43, 94, 38, 88, 89, 44, + 47, 203, 204, 89, 49, 47, 208, 44, 50, 44, + 44, 43, 49, 44, 49, 49, 136, 43, 49, 259, + 47, 51, 142, 405, 144, 88, 89, 49, 405, 149, + 44, 44, 152, 144, 405, 49, 49, 44, 44, 279, + 280, 51, 49, 49, 48, 43, 88, 89, 43, 85, + 86, 87, 53, 239, 43, 43, 43, 43, 239, 261, + 180, 362, 193, 364, 184, 267, 43, 52, 188, 53, + 53, 53, 312, 184, 43, 315, 47, 188, 83, 84, + 85, 86, 87, 203, 204, 53, 53, 53, 208, 53, + 53, 26, 203, 204, 144, 43, 43, 208, 284, 285, + 18, 94, 403, 284, 285, 406, 48, 52, 52, 43, + 45, 43, 43, 48, 49, 48, 43, 53, 48, 239, + 360, 43, 48, 43, 43, 426, 427, 43, 239, 43, + 53, 16, 53, 21, 184, 375, 53, 377, 188, 379, + 53, 261, 53, 53, 330, 53, 53, 267, 268, 330, + 261, 44, 44, 203, 204, 44, 267, 368, 208, 53, + 362, 44, 364, 53, 284, 285, 53, 8, 103, 8, + 8, 405, 184, 284, 285, 193, -1, -1, -1, -1, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, -1, + 135, 403, -1, 405, 406, 144, -1, -1, 57, 58, + 330, 261, 147, -1, -1, 150, 144, 267, 153, 330, + 155, -1, 157, -1, 426, 427, -1, -1, -1, 394, + -1, 396, -1, 398, 83, 84, 85, 86, 87, -1, + -1, -1, 362, -1, 364, 184, -1, 367, -1, 188, + 185, 362, -1, 364, -1, -1, 184, -1, -1, -1, + 188, -1, 197, -1, 203, 204, -1, -1, -1, 208, + -1, -1, -1, -1, -1, 203, 204, 144, -1, -1, + 208, -1, -1, 403, -1, 405, 406, -1, -1, -1, + -1, -1, 403, -1, 405, 406, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 426, 427, -1, -1, + -1, -1, 362, -1, 364, 426, 427, 184, -1, -1, + 255, 188, 261, -1, -1, -1, -1, -1, 267, 264, + -1, 266, -1, 261, 269, -1, 203, 204, -1, 267, + -1, 208, -1, -1, -1, -1, 281, -1, -1, -1, + -1, 144, -1, 403, -1, 405, 406, -1, -1, -1, + -1, -1, -1, -1, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, -1, 426, 427, -1, -1, + -1, -1, 317, -1, -1, -1, -1, -1, -1, 144, + -1, 184, -1, -1, 261, 188, -1, 144, -1, -1, + 267, -1, -1, -1, 339, 340, 341, 342, -1, -1, + 203, 204, -1, -1, -1, 208, -1, -1, -1, -1, + -1, -1, -1, 362, -1, 364, -1, -1, 363, 184, + 365, 366, -1, 188, 362, -1, 364, 184, -1, -1, + -1, 188, -1, 31, 32, 144, 34, -1, 203, 204, + 38, -1, -1, 208, -1, -1, 203, 204, -1, 47, + -1, 208, 50, -1, 403, -1, 405, 406, 261, -1, + -1, -1, 407, -1, 267, 403, -1, 405, 406, -1, + -1, -1, -1, -1, -1, 184, -1, 426, 427, 188, + -1, -1, -1, -1, -1, 362, -1, 364, 426, 427, + 88, 89, -1, -1, 203, 204, 261, -1, -1, 208, + -1, -1, 267, -1, 261, -1, 31, 32, 8, 34, + 267, -1, -1, -1, 39, 40, 41, 42, -1, -1, + -1, -1, 47, -1, -1, -1, 403, -1, 405, 406, + -1, 31, 32, 33, 34, 35, 36, 37, -1, 39, + 40, 41, 42, 43, -1, -1, -1, 47, 48, 426, + 427, 51, 261, 31, 32, -1, 34, -1, 267, 362, + 38, 364, -1, 88, 89, -1, -1, 67, 68, 47, + -1, -1, 50, -1, -1, -1, -1, -1, -1, 31, + 32, -1, 34, -1, 84, -1, 38, 87, 88, 89, + 90, 91, 92, 93, 94, 47, -1, 362, 50, 364, + 403, -1, 405, 406, -1, 362, -1, 364, -1, -1, + 88, 89, -1, -1, 31, 32, -1, 34, -1, -1, + -1, 38, -1, 426, 427, -1, -1, -1, 31, 32, + 47, 34, -1, 50, -1, 38, 88, 89, 403, -1, + 405, 406, -1, -1, 47, -1, 403, 50, 405, 406, + -1, -1, -1, 362, -1, 364, -1, 31, 32, -1, + 34, 426, 427, -1, 38, -1, -1, -1, -1, 426, + 427, 88, 89, 47, 57, 58, 50, -1, 61, 62, + 63, 64, 65, 66, -1, 88, 89, -1, -1, -1, + -1, -1, -1, -1, 403, -1, 405, 406, 81, 82, + 83, 84, 85, 86, 87, -1, -1, -1, 3, -1, + -1, -1, -1, -1, 88, 89, 11, 426, 427, 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, -1, -1, -1, -1, -1, -1, + 55, 56, -1, -1, -1, -1, -1, 31, 32, -1, + 34, -1, -1, -1, 38, -1, -1, -1, -1, -1, + -1, -1, -1, 47, 3, 4, 50, -1, -1, -1, + -1, -1, 11, 88, 89, 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, 88, 89, 45, -1, 47, -1, + -1, -1, -1, -1, -1, 3, 55, 56, -1, -1, + -1, -1, -1, 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, 88, + 89, 39, 40, 41, 42, 57, 58, 45, 46, 47, + -1, 63, 64, 65, 66, -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 83, 84, 85, 86, 87, -1, -1, -1, - -1, -1, 3, 4, -1, -1, -1, -1, -1, -1, - 11, 88, 89, 14, 15, -1, 17, 18, 19, 20, + -1, 83, 84, 85, 86, 87, -1, -1, -1, -1, + -1, 3, 4, -1, -1, -1, -1, -1, -1, 11, + 88, 89, 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, -1, 47, -1, -1, -1, -1, + -1, -1, 3, 55, 56, -1, -1, -1, -1, -1, + 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, + 31, 32, -1, 34, 8, -1, 88, 89, 39, 40, 41, 42, -1, -1, 45, -1, 47, -1, -1, -1, - -1, -1, -1, 3, 55, 56, -1, -1, -1, -1, - -1, 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, 88, 89, 39, - 40, 41, 42, -1, -1, 45, 46, 47, -1, -1, - -1, -1, -1, -1, -1, 55, 56, -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, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, 88, 89, -1, + -1, -1, -1, 67, 68, -1, -1, -1, 8, -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, 88, 89, - 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, -1, 47, -1, -1, -1, -1, -1, -1, - 3, 55, 56, -1, -1, -1, -1, -1, 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, 88, 89, 39, 40, 41, 42, - -1, -1, 45, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, 56, 31, 32, -1, 34, -1, -1, + 84, -1, -1, 87, 88, 89, 90, 91, 92, 93, + 94, 31, 32, 33, 34, 35, 36, 37, -1, 39, + 40, 41, 42, 43, 48, -1, -1, 47, -1, -1, + 54, 51, -1, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, -1, -1, -1, -1, 67, 68, -1, + -1, -1, 8, -1, -1, -1, 80, 81, 82, 83, + 84, 85, 86, 87, 84, -1, -1, 87, 88, 89, + 90, 91, 92, 93, 94, 31, 32, 33, 34, 35, + 36, 37, -1, 39, 40, 41, 42, 43, -1, -1, + -1, 47, -1, -1, -1, 51, -1, -1, -1, -1, + -1, 9, 10, -1, 12, 13, -1, -1, -1, -1, + -1, 67, 68, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 31, 32, -1, 34, -1, 84, -1, + -1, 87, 88, 89, 90, 91, 92, 93, 94, 47, + -1, -1, 50, -1, -1, -1, -1, 55, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 47, -1, -1, 50, -1, -1, -1, -1, 55, 56, - -1, -1, -1, -1, -1, 88, 89, -1, -1, -1, - -1, -1, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 44, -1, -1, -1, -1, 49, -1, - -1, 88, 89, 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, + -1, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 31, 32, -1, 34, -1, -1, 57, 58, + 88, 89, 61, 62, 63, 64, 65, 66, 47, -1, + -1, 50, -1, -1, -1, -1, 55, 56, -1, -1, + -1, 80, 81, 82, 83, 84, 85, 86, 87, -1, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 44, -1, -1, -1, -1, 49, -1, -1, 88, + 89, 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, 44, - -1, 80, 81, 82, 83, 84, 85, 86, 87, 54, + -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, + -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, @@ -4309,130 +4263,133 @@ namespace xsk { namespace gsc { namespace iw7 { 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, 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, -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, 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, -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, 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, -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, 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, -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, 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, -1, 80, 81, 82, 83, 84, 85, 86, 87, - 52, -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, 53, 54, -1, -1, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + -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, - -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, + 80, 81, 82, 83, 84, 85, 86, 87, 52, -1, 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, 80, 81, 82, - 83, 84, 85, 86, 87, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 66, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 66, -1, -1, -1, -1, 81, - 82, 83, 84, 85, 86, 87, -1, -1, -1, 81, - -1, 83, 84, 85, 86, 87, 57, 58, -1, -1, - 61, 62, 63, 64, 65, 66, -1, -1, -1, -1, + 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, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 83, 84, 85, 86, 87 + -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, 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, -1, 83, 84, + 85, 86, 87, 57, 58, -1, -1, 61, 62, 63, + 64, 65, 66, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, + 84, 85, 86, 87 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 89, 108, 109, 110, - 111, 112, 113, 114, 115, 177, 88, 177, 178, 178, - 43, 0, 110, 111, 112, 43, 69, 53, 53, 90, - 180, 159, 177, 8, 31, 32, 33, 34, 35, 36, + 0, 3, 4, 5, 6, 7, 89, 105, 106, 107, + 108, 109, 110, 111, 112, 174, 88, 174, 175, 175, + 43, 0, 107, 108, 109, 43, 69, 53, 53, 90, + 177, 156, 174, 8, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 47, 51, 67, 68, - 84, 87, 91, 92, 93, 94, 95, 96, 97, 144, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 84, 87, 91, 92, 93, 94, 141, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 159, 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, 185, 186, 44, 44, 49, 47, 177, - 178, 47, 177, 178, 47, 144, 47, 48, 144, 160, - 161, 177, 144, 144, 93, 94, 89, 53, 54, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 80, - 81, 82, 83, 84, 85, 86, 87, 38, 47, 50, - 156, 157, 177, 178, 43, 51, 53, 45, 118, 177, - 47, 43, 51, 47, 43, 51, 47, 44, 49, 144, - 49, 48, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, - 144, 144, 177, 51, 160, 161, 177, 3, 11, 14, - 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 46, 47, 55, 56, 116, 117, - 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, + 182, 183, 44, 44, 49, 47, 174, 175, 47, 174, + 175, 47, 141, 47, 48, 141, 157, 158, 174, 141, + 141, 93, 94, 89, 53, 54, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 80, 81, 82, 83, + 84, 85, 86, 87, 38, 47, 50, 153, 154, 174, + 175, 43, 51, 53, 45, 115, 174, 47, 43, 51, + 47, 43, 51, 47, 44, 49, 141, 49, 48, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 141, 141, 141, 141, 141, 174, + 51, 157, 158, 174, 3, 11, 14, 15, 17, 18, + 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 46, 47, 55, 56, 113, 114, 115, 116, 118, + 119, 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, 48, 144, 52, 48, - 177, 44, 43, 4, 119, 144, 53, 43, 116, 43, - 43, 43, 43, 84, 180, 184, 52, 53, 53, 53, - 144, 53, 43, 43, 47, 154, 155, 167, 167, 46, - 116, 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, 144, 160, 4, 53, 144, 18, 144, 120, - 146, 147, 148, 167, 177, 144, 52, 52, 53, 160, - 160, 144, 43, 43, 43, 43, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 48, 160, 48, - 160, 48, 144, 43, 44, 44, 43, 44, 53, 21, - 49, 44, 44, 44, 144, 144, 144, 144, 43, 44, - 43, 44, 43, 44, 160, 116, 144, 116, 144, 145, - 144, 177, 118, 53, 53, 44, 44, 49, 44, 49, - 44, 49, 160, 160, 160, 44, 16, 44, 53, 44, - 21, 53, 53, 161, 53, 161, 53, 161, 44, 44, - 44, 116, 53, 120, 116, 144, 44, 44, 44, 44, - 44, 53, 53, 53, 116, 116 + 139, 140, 143, 144, 145, 151, 152, 160, 161, 164, + 168, 169, 170, 171, 174, 141, 157, 174, 141, 157, + 174, 141, 141, 48, 141, 52, 48, 174, 44, 43, + 4, 116, 141, 53, 43, 113, 43, 43, 43, 43, + 84, 177, 181, 52, 53, 53, 53, 141, 53, 43, + 43, 47, 151, 152, 164, 164, 46, 113, 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, 141, + 157, 4, 53, 141, 18, 141, 117, 143, 144, 145, + 164, 174, 141, 52, 52, 53, 157, 157, 141, 43, + 43, 43, 43, 141, 141, 141, 141, 141, 141, 141, + 141, 141, 141, 141, 48, 157, 48, 157, 48, 141, + 43, 44, 44, 43, 44, 53, 21, 49, 44, 44, + 44, 141, 141, 141, 141, 43, 44, 43, 44, 43, + 44, 157, 113, 141, 113, 141, 142, 141, 174, 115, + 53, 53, 44, 44, 49, 44, 49, 44, 49, 157, + 157, 157, 44, 16, 44, 53, 44, 21, 53, 53, + 158, 53, 158, 53, 158, 44, 44, 44, 113, 53, + 117, 113, 141, 44, 44, 44, 44, 44, 53, 53, + 53, 113, 113 }; const unsigned char parser::yyr1_[] = { - 0, 107, 108, 108, 109, 109, 109, 109, 109, 109, - 110, 111, 112, 112, 112, 112, 112, 113, 114, 115, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 117, 117, 118, 118, 119, - 119, 120, 120, 120, 120, 121, 121, 122, 122, 122, - 123, 124, 124, 125, 126, 126, 127, 127, 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, 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, 184, 184, 184, 185, 186 + 0, 104, 105, 105, 106, 106, 106, 106, 106, 106, + 107, 108, 109, 109, 109, 109, 109, 110, 111, 112, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 114, 114, 115, 115, 116, + 116, 117, 117, 117, 117, 118, 118, 119, 119, 119, + 120, 121, 121, 122, 123, 123, 124, 124, 125, 126, + 127, 128, 129, 130, 131, 131, 132, 133, 133, 134, + 135, 136, 137, 137, 138, 139, 140, 141, 141, 141, + 142, 142, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 144, 144, 145, 145, 146, 147, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 149, 150, 151, 151, 152, 152, + 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, + 155, 156, 156, 156, 157, 157, 158, 158, 159, 159, + 160, 161, 162, 163, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 175, 176, 177, 178, 179, 180, + 180, 181, 181, 182, 183 }; const signed char @@ -4459,7 +4416,7 @@ namespace xsk { namespace gsc { namespace iw7 { 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 7, 2, - 1, 2, 1, 1, 1, 1, 1, 1 + 1, 2, 1, 1, 1 }; @@ -4469,28 +4426,28 @@ namespace xsk { namespace gsc { namespace iw7 { const short parser::yyrline_[] = { - 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, 708, 713, 718, 719, 720, 721, 722, 723, - 724, 725, 726, 730, 735, 740, 745, 750, 755, 760, - 765, 770, 775, 780, 782, 787, 792, 797, 802, 807, - 809, 814, 816, 818, 820, 822, 827, 832 + 0, 249, 249, 250, 254, 256, 258, 260, 262, 264, + 269, 273, 278, 279, 280, 281, 282, 286, 291, 296, + 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, + 414, 419, 424, 429, 434, 436, 441, 446, 448, 453, + 458, 463, 468, 470, 475, 480, 485, 490, 491, 492, + 496, 497, 501, 503, 505, 507, 509, 511, 513, 515, + 517, 519, 521, 526, 528, 533, 535, 540, 545, 547, + 549, 551, 553, 555, 557, 559, 561, 563, 565, 567, + 569, 571, 573, 575, 577, 579, 584, 585, 586, 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, 615, 620, 625, 626, 629, 630, + 634, 636, 638, 640, 642, 644, 649, 651, 653, 655, + 660, 665, 667, 670, 674, 677, 681, 683, 688, 690, + 695, 700, 705, 710, 715, 716, 717, 718, 719, 720, + 721, 722, 723, 727, 732, 737, 742, 747, 752, 757, + 762, 767, 772, 777, 779, 784, 789, 794, 799, 804, + 806, 811, 813, 818, 823 }; void @@ -4523,9 +4480,9 @@ namespace xsk { namespace gsc { namespace iw7 { #line 13 "parser.ypp" } } } // xsk::gsc::iw7 -#line 4527 "parser.cpp" +#line 4484 "parser.cpp" -#line 836 "parser.ypp" +#line 827 "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 5a10747..295a8da 100644 --- a/src/iw7/xsk/parser.hpp +++ b/src/iw7/xsk/parser.hpp @@ -621,10 +621,7 @@ namespace xsk { namespace gsc { namespace iw7 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy66[sizeof (std::string)]; }; @@ -768,19 +765,16 @@ namespace xsk { namespace gsc { namespace iw7 { ISTRING = 91, // "localized string" COLOR = 92, // "color" FLOAT = 93, // "float" - INT_DEC = 94, // "int" - INT_OCT = 95, // "octal int" - INT_BIN = 96, // "binary int" - INT_HEX = 97, // "hexadecimal int" - ADD_ARRAY = 98, // ADD_ARRAY - THEN = 99, // THEN - TERN = 100, // TERN - NEG = 101, // NEG - ANIMREF = 102, // ANIMREF - PREINC = 103, // PREINC - PREDEC = 104, // PREDEC - POSTINC = 105, // POSTINC - POSTDEC = 106 // POSTDEC + INTEGER = 94, // "integer" + ADD_ARRAY = 95, // ADD_ARRAY + THEN = 96, // THEN + TERN = 97, // TERN + NEG = 98, // NEG + ANIMREF = 99, // ANIMREF + PREINC = 100, // PREINC + PREDEC = 101, // PREDEC + POSTINC = 102, // POSTINC + POSTDEC = 103 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -797,7 +791,7 @@ namespace xsk { namespace gsc { namespace iw7 { { enum symbol_kind_type { - YYNTOKENS = 107, ///< Number of tokens. + YYNTOKENS = 104, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -893,99 +887,96 @@ namespace xsk { namespace gsc { namespace iw7 { S_ISTRING = 91, // "localized string" S_COLOR = 92, // "color" S_FLOAT = 93, // "float" - S_INT_DEC = 94, // "int" - S_INT_OCT = 95, // "octal int" - S_INT_BIN = 96, // "binary int" - S_INT_HEX = 97, // "hexadecimal int" - S_ADD_ARRAY = 98, // ADD_ARRAY - S_THEN = 99, // THEN - S_TERN = 100, // TERN - S_NEG = 101, // NEG - S_ANIMREF = 102, // ANIMREF - S_PREINC = 103, // PREINC - S_PREDEC = 104, // PREDEC - S_POSTINC = 105, // POSTINC - S_POSTDEC = 106, // POSTDEC - S_YYACCEPT = 107, // $accept - S_root = 108, // root - S_program = 109, // program - S_inline = 110, // inline - S_include = 111, // include - S_declaration = 112, // declaration - S_decl_usingtree = 113, // decl_usingtree - S_decl_constant = 114, // decl_constant - S_decl_thread = 115, // decl_thread - S_stmt = 116, // stmt - S_stmt_dev = 117, // stmt_dev - S_stmt_block = 118, // stmt_block - S_stmt_list = 119, // stmt_list - S_stmt_expr = 120, // stmt_expr - S_stmt_call = 121, // stmt_call - S_stmt_assign = 122, // stmt_assign - S_stmt_endon = 123, // stmt_endon - S_stmt_notify = 124, // stmt_notify - S_stmt_wait = 125, // stmt_wait - S_stmt_waittill = 126, // stmt_waittill - S_stmt_waittillmatch = 127, // stmt_waittillmatch - S_stmt_waittillframeend = 128, // stmt_waittillframeend - 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_INTEGER = 94, // "integer" + S_ADD_ARRAY = 95, // ADD_ARRAY + S_THEN = 96, // THEN + S_TERN = 97, // TERN + S_NEG = 98, // NEG + S_ANIMREF = 99, // ANIMREF + S_PREINC = 100, // PREINC + S_PREDEC = 101, // PREDEC + S_POSTINC = 102, // POSTINC + S_POSTDEC = 103, // POSTDEC + S_YYACCEPT = 104, // $accept + S_root = 105, // root + S_program = 106, // program + S_inline = 107, // inline + S_include = 108, // include + S_declaration = 109, // declaration + S_decl_usingtree = 110, // decl_usingtree + S_decl_constant = 111, // decl_constant + S_decl_thread = 112, // decl_thread + S_stmt = 113, // stmt + S_stmt_dev = 114, // stmt_dev + S_stmt_block = 115, // stmt_block + S_stmt_list = 116, // stmt_list + S_stmt_expr = 117, // stmt_expr + S_stmt_call = 118, // stmt_call + S_stmt_assign = 119, // stmt_assign + S_stmt_endon = 120, // stmt_endon + S_stmt_notify = 121, // stmt_notify + S_stmt_wait = 122, // stmt_wait + S_stmt_waittill = 123, // stmt_waittill + S_stmt_waittillmatch = 124, // stmt_waittillmatch + S_stmt_waittillframeend = 125, // stmt_waittillframeend + S_stmt_if = 126, // stmt_if + S_stmt_ifelse = 127, // stmt_ifelse + S_stmt_while = 128, // stmt_while + S_stmt_dowhile = 129, // stmt_dowhile + S_stmt_for = 130, // stmt_for + S_stmt_foreach = 131, // stmt_foreach + S_stmt_switch = 132, // stmt_switch + S_stmt_case = 133, // stmt_case + S_stmt_default = 134, // stmt_default + S_stmt_break = 135, // stmt_break + S_stmt_continue = 136, // stmt_continue + S_stmt_return = 137, // stmt_return + S_stmt_breakpoint = 138, // stmt_breakpoint + S_stmt_prof_begin = 139, // stmt_prof_begin + S_stmt_prof_end = 140, // stmt_prof_end + S_expr = 141, // expr + S_expr_or_empty = 142, // expr_or_empty + S_expr_assign = 143, // expr_assign + S_expr_increment = 144, // expr_increment + S_expr_decrement = 145, // expr_decrement + S_expr_ternary = 146, // expr_ternary + S_expr_binary = 147, // expr_binary + S_expr_primitive = 148, // expr_primitive + S_expr_complement = 149, // expr_complement + S_expr_not = 150, // expr_not + S_expr_call = 151, // expr_call + S_expr_method = 152, // expr_method + S_expr_function = 153, // expr_function + S_expr_pointer = 154, // expr_pointer + S_expr_add_array = 155, // expr_add_array + S_expr_parameters = 156, // expr_parameters + S_expr_arguments = 157, // expr_arguments + S_expr_arguments_no_empty = 158, // expr_arguments_no_empty + S_expr_reference = 159, // expr_reference + S_expr_array = 160, // expr_array + S_expr_field = 161, // expr_field + S_expr_size = 162, // expr_size + S_expr_paren = 163, // expr_paren + S_expr_object = 164, // expr_object + S_expr_thisthread = 165, // expr_thisthread + S_expr_empty_array = 166, // expr_empty_array + S_expr_undefined = 167, // expr_undefined + S_expr_game = 168, // expr_game + S_expr_self = 169, // expr_self + S_expr_anim = 170, // expr_anim + S_expr_level = 171, // expr_level + S_expr_animation = 172, // expr_animation + S_expr_animtree = 173, // expr_animtree + S_expr_identifier = 174, // expr_identifier + S_expr_path = 175, // expr_path + S_expr_istring = 176, // expr_istring + S_expr_string = 177, // expr_string + S_expr_color = 178, // expr_color + S_expr_vector = 179, // expr_vector + S_expr_float = 180, // expr_float + S_expr_integer = 181, // expr_integer + S_expr_false = 182, // expr_false + S_expr_true = 183 // expr_true }; }; @@ -1300,10 +1291,7 @@ namespace xsk { namespace gsc { namespace iw7 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2554,10 +2542,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2667,7 +2652,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - IW7_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + IW7_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4130,61 +4115,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4666,7 +4606,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2346, ///< Last index in yytable_. + yylast_ = 2293, ///< Last index in yytable_. yynnts_ = 80, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -4973,10 +4913,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5287,10 +5224,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5357,7 +5291,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw7 -#line 5361 "parser.hpp" +#line 5295 "parser.hpp" diff --git a/src/iw7/xsk/resolver.cpp b/src/iw7/xsk/resolver.cpp index e27036a..cbdd950 100644 --- a/src/iw7/xsk/resolver.cpp +++ b/src/iw7/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::iw7 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint32_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +125,19 @@ auto resolver::file_name(std::uint32_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint32_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +154,16 @@ auto resolver::token_name(std::uint32_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -164,164 +188,182 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 153> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, + { 0x17, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x18, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x19, "RETN" }, + { 0x1A, "CALL_BUILTIN_FUNC_0" }, + { 0x1B, "CALL_BUILTIN_FUNC_1" }, + { 0x1C, "CALL_BUILTIN_FUNC_2" }, + { 0x1D, "CALL_BUILTIN_FUNC_3" }, + { 0x1E, "CALL_BUILTIN_FUNC_4" }, + { 0x1F, "CALL_BUILTIN_FUNC_5" }, + { 0x20, "CALL_BUILTIN_FUNC" }, + { 0x21, "BOOL_NOT" }, + { 0x22, "CALL_FAR_METHOD_THEAD" }, + { 0x23, "JMP_EXPR_TRUE" }, + { 0x24, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x25, "CAST_BOOL" }, + { 0x26, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x27, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x28, "INEQUALITY" }, + { 0x29, "GET_THISTHREAD" }, + { 0x2A, "CLEAR_FIELD_VARIABLE" }, + { 0x2B, "GET_FLOAT" }, + { 0x2C, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x2D, "CALL_FAR_FUNC2" }, + { 0x2E, "CALL_FAR_FUNC" }, + { 0x2F, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x30, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x31, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x32, "CHECK_CLEAR_PARAMS" }, + { 0x33, "CAST_FIELD_OBJ" }, + { 0x34, "END" }, + { 0x35, "SIZE" }, + { 0x36, "EMPTY_ARRAY" }, + { 0x37, "BIT_AND" }, + { 0x38, "LESSEQUAL" }, + { 0x39, "VOIDCODEPOS" }, + { 0x3A, "CALL_METHOD_THREAD_POINTER" }, + { 0x3B, "ENDSWITCH" }, + { 0x3C, "CLEAR_VARIABLE_FIELD" }, + { 0x3D, "DIV" }, + { 0x3E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x3F, "GET_USHORT" }, + { 0x40, "JMP_TRUE" }, + { 0x41, "GET_SELF" }, + { 0x42, "CALL_FAR_FUNC_THREAD" }, + { 0x43, "CALL_LOCAL_FUNC_THREAD" }, + { 0x44, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x45, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x46, "PLUS" }, + { 0x47, "BOOL_COMPLEMENT" }, + { 0x48, "CALL_METHOD_POINTER" }, + { 0x49, "INC" }, + { 0x4A, "REMOVE_LOCAL_VARIABLES" }, + { 0x4B, "JMP_EXPR_FALSE" }, + { 0x4C, "SWITCH" }, + { 0x4D, "CLEAR_PARAMS" }, + { 0x4E, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x4F, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x50, "CALL_LOCAL_METHOD" }, + { 0x51, "EVAL_FIELD_VARIABLE" }, + { 0x52, "EVAL_FIELD_VARIABLE_REF" }, + { 0x53, "GET_STRING" }, + { 0x54, "CALL_FUNC_POINTER" }, + { 0x55, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x56, "GET_VECTOR" }, + { 0x57, "ENDON" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "GET_SELF_OBJ" }, + { 0x5A, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x5B, "SET_VARIABLE_FIELD" }, + { 0x5C, "CALL_LOCAL_FUNC2" }, + { 0x5D, "CALL_LOCAL_FUNC" }, + { 0x5E, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x5F, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x60, "GET_FAR_FUNC" }, + { 0x61, "LESS" }, + { 0x62, "GET_GAME_REF" }, + { 0x63, "WAITTILLFRAMEEND" }, + { 0x64, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x65, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x66, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x67, "GET_LEVEL" }, + { 0x68, "NOTIFY" }, + { 0x69, "DEC_TOP" }, + { 0x6A, "SHIFT_LEFT" }, + { 0x6B, "CALL_LOCAL_METHOD_THREAD" }, + { 0x6C, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x6D, "GREATER" }, + { 0x6E, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x6F, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x70, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x71, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x72, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x73, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x74, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x75, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x76, "JMP" }, + { 0x77, "CALL_FUNC_THREAD_POINTER" }, + { 0x78, "GET_ZERO" }, + { 0x79, "WAIT" }, + { 0x7A, "MINUS" }, + { 0x7B, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7C, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x7D, "MULT" }, + { 0x7E, "CREATE_LOCAL_VARIABLE" }, + { 0x7F, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x80, "GET_INT" }, + { 0x81, "MOD" }, + { 0x82, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x83, "GET_BUILTIN_FUNC" }, + { 0x84, "GET_GAME" }, + { 0x85, "WAITTILL" }, + { 0x86, "DEC" }, + { 0x87, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x88, "PRE_CALL" }, + { 0x89, "GET_ANIM" }, + { 0x8A, "GET_UNDEFINED" }, + { 0x8B, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x8C, "GET_ANIM_OBJ" }, + { 0x8D, "GET_LEVEL_OBJ" }, + { 0x8E, "BIT_EXOR" }, + { 0x8F, "EQUALITY" }, + { 0x90, "CLEAR_ARRAY" }, + { 0x91, "JMP_BACK" }, + { 0x92, "GET_ANIMATION" }, + { 0x93, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x94, "GET_ANIMTREE" }, + { 0x95, "GET_ISTRING" }, + { 0x96, "EVAL_ARRAY_REF" }, + { 0x97, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x98, "GET_NBYTE" }, + { 0x99, "GET_BUILTIN_METHOD" }, + { 0x9A, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x9B, "EVAL_ARRAY" }, + { 0x9C, "VECTOR" }, + { 0x9D, "CALL_FAR_METHOD" }, + { 0x9E, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0x9F, "GET_BYTE" }, + { 0xA0, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0xA1, "BIT_OR" }, + { 0xA2, "ADD_ARRAY" }, + { 0xA3, "WAITTILLMATCH2" }, + { 0xA4, "WAITTILLMATCH" }, + { 0xA5, "GET_LOCAL_FUNC" }, + { 0xA6, "GET_NUSHORT" }, + { 0xA7, "SHIFT_RIGHT" }, + { 0xA8, "CALL_BUILTIN_METHOD_0" }, + { 0xA9, "CALL_BUILTIN_METHOD_1" }, + { 0xAA, "CALL_BUILTIN_METHOD_2" }, + { 0xAB, "CALL_BUILTIN_METHOD_3" }, + { 0xAC, "CALL_BUILTIN_METHOD_4" }, + { 0xAD, "CALL_BUILTIN_METHOD_5" }, + { 0xAE, "CALL_BUILTIN_METHOD" }, + { 0xAF, "JMP_FALSE" }, }}; -const std::array function_list +const std::array, 807> function_list {{ { 0x001, "_func_001" }, { 0x002, "_func_002" }, @@ -1132,7 +1174,7 @@ const std::array function_list { 0x327, "_func_327" }, }}; -const std::array method_list +const std::array, 1500> method_list {{ { 0x8000, "_meth_8000" }, { 0x8001, "_meth_8001" }, @@ -2636,14 +2678,18 @@ const std::array method_list { 0x85DB, "_meth_85DB" }, }}; -const std::array file_list +const std::array, 1> file_list {{ - { 0, "DUMMY" }, + { 0, "null" }, }}; -const std::array token_list +const std::array, 5> token_list {{ - { 0, "DUMMY" }, + { 0x0000, "" }, + { 0x0001, "pl#" }, + { 0x0002, "-" }, + { 0x0003, "radius`" }, + { 0x0004, "note:" }, }}; struct __init__ @@ -2667,32 +2713,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/iw7/xsk/resolver.hpp b/src/iw7/xsk/resolver.hpp index 449cb6b..2e920b0 100644 --- a/src/iw7/xsk/resolver.hpp +++ b/src/iw7/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::iw7 diff --git a/src/iw8/stdafx.hpp b/src/iw8/stdafx.hpp index 266b991..fd3fbc4 100644 --- a/src/iw8/stdafx.hpp +++ b/src/iw8/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/iw8/xsk/assembler.cpp b/src/iw8/xsk/assembler.cpp index 9c82f0c..ede195d 100644 --- a/src/iw8/xsk/assembler.cpp +++ b/src/iw8/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -433,24 +447,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -459,9 +461,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -477,96 +478,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint32_t file_id = 0; - std::uint32_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); -} - -void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - script_->write(static_cast(inst->opcode)); - - std::int32_t addr = resolve_label(inst->data[0]); - - if (expr) - { - script_->write(addr - inst->index - 3); - } - else if (back) - { - script_->write((inst->index + 3) - addr); - } - else - { - script_->write(addr - inst->index - 5); - } -} - -void assembler::assemble_field_variable(const instruction::ptr& inst) -{ - script_->write(static_cast(inst->opcode)); - - std::uint32_t field_id = 0; - - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); - - if (field_id == 0) - { - field_id = 0xFFFFFFFF; - } - } - - script_->write(field_id); - - if (field_id > 0x13738) - { - stack_->write(0); - stack_->write_c_string(inst->data[0]); - } -} - -void assembler::assemble_formal_params(const instruction::ptr& inst) -{ - script_->write(static_cast(inst->opcode)); - - auto size = std::stoi(inst->data[0]); - - script_->write(static_cast(size)); - - for (auto i = 1; i <= size; i++) - { - script_->write(static_cast(std::stoi(inst->data[i]))); - } + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -575,22 +505,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -604,29 +525,81 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } +void assembler::assemble_field_variable(const instruction::ptr& inst) +{ + script_->write(static_cast(inst->opcode)); + + auto id = resolver::token_id(inst->data[0]); + + if (id == 0) id = 0xFFFFFFFF; + + script_->write(id); + + if (id > max_string_id) + { + stack_->write(0); + stack_->write_c_string(inst->data[0]); + } +} + +void assembler::assemble_formal_params(const instruction::ptr& inst) +{ + script_->write(static_cast(inst->opcode)); + + const auto count = std::stoi(inst->data[0]); + + script_->write(static_cast(count)); + + for (auto i = 1; i <= count; i++) + { + script_->write(static_cast(std::stoi(inst->data[i]))); + } +} + +void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + script_->write(static_cast(inst->opcode)); + + const auto addr = resolve_label(inst->data[0]); + + if (expr) + { + script_->write(addr - inst->index - 3); + } + else if (back) + { + script_->write((inst->index + 3) - addr); + } + else + { + script_->write(addr - inst->index - 5); + } +} + void assembler::assemble_offset(std::int32_t offset) { std::array bytes = {}; @@ -640,24 +613,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/iw8/xsk/assembler.hpp b/src/iw8/xsk/assembler.hpp index 72752b0..80b80b5 100644 --- a/src/iw8/xsk/assembler.hpp +++ b/src/iw8/xsk/assembler.hpp @@ -28,14 +28,14 @@ private: void assemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void assemble_local_call(const instruction::ptr& inst, bool thread); void assemble_far_call(const instruction::ptr& inst, bool thread); - void assemble_formal_params(const instruction::ptr& inst); void assemble_switch(const instruction::ptr& inst); void assemble_end_switch(const instruction::ptr& inst); void assemble_field_variable(const instruction::ptr& inst); + void assemble_formal_params(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::iw8 diff --git a/src/iw8/xsk/compiler.cpp b/src/iw8/xsk/compiler.cpp index 72326e6..517cc06 100644 --- a/src/iw8/xsk/compiler.cpp +++ b/src/iw8/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = iw8__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -393,9 +393,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -534,7 +534,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -588,7 +588,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -734,7 +734,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -755,9 +755,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -847,7 +847,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -897,7 +897,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1061,7 +1061,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1115,7 +1115,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1396,10 +1396,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1416,7 +1416,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1432,7 +1432,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1514,10 +1514,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1534,7 +1534,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1550,7 +1550,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1675,7 +1675,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1842,7 +1842,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -1897,10 +1897,10 @@ void compiler::emit_expr_local(const ast::expr_identifier::ptr& expr, const bloc case 3: emit_opcode(opcode::OP_EvalLocalVariableCached3); break; - case 4: + case 4: emit_opcode(opcode::OP_EvalLocalVariableCached4); break; - case 5: + case 5: emit_opcode(opcode::OP_EvalLocalVariableCached5); break; default: @@ -2133,7 +2133,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2145,7 +2145,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2158,7 +2158,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2275,7 +2275,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2312,7 +2312,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2355,7 +2355,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2485,7 +2485,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2757,7 +2757,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2786,7 +2786,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/iw8/xsk/compiler.hpp b/src/iw8/xsk/compiler.hpp index 02d7912..4ea6868 100644 --- a/src/iw8/xsk/compiler.hpp +++ b/src/iw8/xsk/compiler.hpp @@ -88,7 +88,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/iw8/xsk/decompiler.cpp b/src/iw8/xsk/decompiler.cpp index bd46270..9efcee6 100644 --- a/src/iw8/xsk/decompiler.cpp +++ b/src/iw8/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1365,7 +1365,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1877,7 +1877,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1952,7 +1952,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2088,7 +2088,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2195,11 +2195,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2597,7 +2597,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2716,7 +2716,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3113,7 +3113,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/iw8/xsk/disassembler.cpp b/src/iw8/xsk/disassembler.cpp index a097204..a774bb4 100644 --- a/src/iw8/xsk/disassembler.cpp +++ b/src/iw8/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// IW8 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -70,7 +70,7 @@ void disassembler::dissasemble_function(const function::ptr& func) { func->instructions.push_back(std::make_unique()); - auto& inst = func->instructions.back(); + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); @@ -181,7 +181,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -363,19 +363,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -394,101 +389,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint32_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0x13738) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); -} - -void disassembler::disassemble_formal_params(const instruction::ptr& inst) -{ - auto size = script_->read(); - - inst->size += size; - inst->data.push_back(utils::string::va("%i", size)); - - for (auto i = 0u; i < size; i++) - { - inst->data.push_back(utils::string::va("%d", script_->read())); - } + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x80000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -496,24 +433,77 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_formal_params(const instruction::ptr& inst) +{ + const auto count = script_->read(); + + inst->size += count; + inst->data.push_back(utils::string::va("%i", count)); + + for (auto i = 0u; i < count; i++) + { + inst->data.push_back(utils::string::va("%d", script_->read())); + } +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -523,7 +513,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 8; @@ -532,9 +522,9 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { @@ -546,7 +536,7 @@ void disassembler::resolve_local_functions() case opcode::OP_ScriptLocalChildThreadCall: case opcode::OP_ScriptLocalMethodThreadCall: case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); + inst->data[0] = resolve_function(inst->data[0]); break; default: break; @@ -578,9 +568,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -598,40 +588,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/iw8/xsk/disassembler.hpp b/src/iw8/xsk/disassembler.hpp index 81ec864..006d136 100644 --- a/src/iw8/xsk/disassembler.hpp +++ b/src/iw8/xsk/disassembler.hpp @@ -28,11 +28,11 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); - void disassemble_formal_params(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_formal_params(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/iw8/xsk/iw8.hpp b/src/iw8/xsk/iw8.hpp index f38d0e4..48e8339 100644 --- a/src/iw8/xsk/iw8.hpp +++ b/src/iw8/xsk/iw8.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::iw8 { +constexpr std::uint32_t max_string_id = 0x13738; + enum class opcode : std::uint8_t { OP_CastFieldObject = 0x0, diff --git a/src/iw8/xsk/lexer.cpp b/src/iw8/xsk/lexer.cpp index 9ff442a..87108eb 100644 --- a/src/iw8/xsk/lexer.cpp +++ b/src/iw8/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 113 -#define YY_END_OF_BUFFER 114 +#define YY_NUM_RULES 114 +#define YY_END_OF_BUFFER 115 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[346] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 114, 112, - 1, 2, 97, 112, 112, 96, 100, 112, 57, 58, - 94, 92, 63, 93, 64, 95, 111, 111, 66, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 115, 113, + 1, 2, 97, 113, 113, 96, 100, 113, 57, 58, + 94, 92, 63, 93, 64, 95, 112, 112, 66, 67, 81, 91, 82, 68, 103, 103, 61, 62, 101, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 59, 99, 60, 98, 5, - 6, 5, 12, 13, 12, 112, 94, 95, 78, 0, + 6, 5, 12, 13, 12, 113, 94, 95, 78, 0, 105, 0, 15, 0, 0, 0, 0, 87, 0, 76, 0, 89, 0, 0, 8, 85, 69, 83, 70, 84, - 107, 0, 11, 4, 3, 86, 107, 111, 108, 0, + 108, 0, 11, 4, 3, 86, 108, 112, 109, 0, 0, 0, 0, 65, 73, 79, 77, 80, 74, 103, 103, 90, 103, 103, 103, 103, 103, 103, 29, 103, 103, 103, 103, 103, 27, 33, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 88, 75, 7, 14, 10, 9, 0, 105, 0, 0, 0, 0, 0, - 0, 104, 0, 0, 0, 0, 105, 0, 107, 0, - 3, 107, 107, 108, 109, 110, 102, 71, 72, 103, + 0, 104, 0, 0, 0, 0, 105, 0, 108, 0, + 3, 108, 108, 109, 110, 111, 102, 71, 72, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 31, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 106, 0, 0, 0, 0, @@ -596,7 +596,7 @@ static const flex_int16_t yy_accept[346] = 103, 103, 103, 103, 103, 103, 103, 103, 30, 0, 0, 0, 0, 0, 103, 56, 103, 103, 103, 103, 103, 21, 103, 103, 39, 34, 103, 43, 103, 103, - 103, 106, 0, 0, 16, 0, 103, 103, 103, 103, + 103, 107, 0, 0, 16, 0, 103, 103, 103, 103, 36, 32, 103, 103, 103, 103, 103, 103, 0, 17, 0, 103, 103, 103, 38, 103, 42, 103, 103, 103, @@ -1211,11 +1211,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1274,592 +1274,597 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw iw8::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw iw8::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw iw8::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return iw8::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw iw8::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return iw8::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw iw8::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw iw8::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return iw8::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return iw8::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return iw8::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return iw8::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return iw8::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return iw8::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return iw8::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return iw8::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return iw8::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return iw8::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return iw8::parser::make_WAITFRAME(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return iw8::parser::make_IF(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return iw8::parser::make_ELSE(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return iw8::parser::make_DO(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return iw8::parser::make_WHILE(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return iw8::parser::make_FOR(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return iw8::parser::make_FOREACH(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return iw8::parser::make_IN(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return iw8::parser::make_SWITCH(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return iw8::parser::make_CASE(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return iw8::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return iw8::parser::make_BREAK(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return iw8::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return iw8::parser::make_RETURN(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return iw8::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return iw8::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return iw8::parser::make_PROFEND(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return iw8::parser::make_THREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return iw8::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return iw8::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return iw8::parser::make_CALL(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return iw8::parser::make_TRUE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return iw8::parser::make_FALSE(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return iw8::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return iw8::parser::make_SIZE(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return iw8::parser::make_GAME(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return iw8::parser::make_SELF(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return iw8::parser::make_ANIM(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return iw8::parser::make_LEVEL(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return iw8::parser::make_ISDEFINED(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return iw8::parser::make_ISTRUE(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return iw8::parser::make_LPAREN(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return iw8::parser::make_RPAREN(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return iw8::parser::make_LBRACE(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return iw8::parser::make_RBRACE(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return iw8::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return iw8::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return iw8::parser::make_COMMA(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return iw8::parser::make_DOT(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return iw8::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return iw8::parser::make_COLON(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return iw8::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return iw8::parser::make_QMARK(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return iw8::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return iw8::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return iw8::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return iw8::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return iw8::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return iw8::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return iw8::parser::make_OR(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return iw8::parser::make_AND(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return iw8::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return iw8::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return iw8::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return iw8::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return iw8::parser::make_LESS(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return iw8::parser::make_GREATER(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return iw8::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return iw8::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return iw8::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return iw8::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return iw8::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return iw8::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return iw8::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return iw8::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return iw8::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return iw8::parser::make_ADD(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return iw8::parser::make_SUB(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return iw8::parser::make_MUL(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return iw8::parser::make_DIV(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return iw8::parser::make_MOD(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return iw8::parser::make_NOT(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return iw8::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" +#line 157 "lexer.lpp" { return iw8::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" +#line 158 "lexer.lpp" { return iw8::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 101: YY_RULE_SETUP -#line 158 "lexer.lpp" +#line 159 "lexer.lpp" { return iw8::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 102: YY_RULE_SETUP -#line 159 "lexer.lpp" -{ return iw8::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 160 "lexer.lpp" +{ return iw8::parser::make_PATH(xsk::gsc::iw8::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 103: YY_RULE_SETUP -#line 160 "lexer.lpp" -{ return iw8::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 161 "lexer.lpp" +{ return iw8::parser::make_IDENTIFIER(xsk::gsc::iw8::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 104: /* rule 104 can match eol */ YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return iw8::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 162 "lexer.lpp" +{ return iw8::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: /* rule 105 can match eol */ YY_RULE_SETUP -#line 162 "lexer.lpp" +#line 163 "lexer.lpp" { return iw8::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return iw8::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 164 "lexer.lpp" +{ return iw8::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return iw8::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return iw8::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return iw8::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 166 "lexer.lpp" +{ return iw8::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 109: YY_RULE_SETUP -#line 166 "lexer.lpp" -{ return iw8::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 167 "lexer.lpp" +{ return iw8::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 110: YY_RULE_SETUP -#line 167 "lexer.lpp" -{ return iw8::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 168 "lexer.lpp" +{ return iw8::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 111: YY_RULE_SETUP -#line 168 "lexer.lpp" -{ return iw8::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 169 "lexer.lpp" -{ if(ctx->header_top > 0) iw8_pop_header(ctx); else return iw8::parser::make_IW8EOF(ctx->loc); } +{ return iw8::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 112: -/* rule 112 can match eol */ YY_RULE_SETUP #line 170 "lexer.lpp" -{ throw iw8::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return iw8::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 171 "lexer.lpp" +{ if(ctx->header_top > 0) iw8_pop_header(ctx); else return iw8::parser::make_IW8EOF(ctx->loc); } YY_BREAK case 113: +/* rule 113 can match eol */ YY_RULE_SETUP #line 172 "lexer.lpp" +{ throw iw8::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 174 "lexer.lpp" ECHO; YY_BREAK -#line 1862 "lexer.cpp" +#line 1867 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2989,65 +2994,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 172 "lexer.lpp" +#line 174 "lexer.lpp" void iw8_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3055,9 +3060,9 @@ void iw8_push_header(xsk::gsc::context* ctx, const std::string& file) void iw8_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/iw8/xsk/lexer.hpp b/src/iw8/xsk/lexer.hpp index 28cd4dc..3675f05 100644 --- a/src/iw8/xsk/lexer.hpp +++ b/src/iw8/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 172 "lexer.lpp" +#line 174 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/iw8/xsk/parser.cpp b/src/iw8/xsk/parser.cpp index 037245f..b942472 100644 --- a/src/iw8/xsk/parser.cpp +++ b/src/iw8/xsk/parser.cpp @@ -506,10 +506,7 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -818,10 +815,7 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1130,10 +1124,7 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1441,10 +1432,7 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -2007,10 +1995,7 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -2035,1345 +2020,1327 @@ namespace xsk { namespace gsc { namespace iw8 { switch (yyn) { case 2: // root: program -#line 258 "parser.ypp" +#line 255 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2041 "parser.cpp" +#line 2026 "parser.cpp" break; case 3: // root: %empty -#line 259 "parser.ypp" +#line 256 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 2047 "parser.cpp" +#line 2032 "parser.cpp" break; case 4: // program: program inline -#line 264 "parser.ypp" +#line 261 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2053 "parser.cpp" +#line 2038 "parser.cpp" break; case 5: // program: program include -#line 266 "parser.ypp" +#line 263 "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 2059 "parser.cpp" +#line 2044 "parser.cpp" break; case 6: // program: program declaration -#line 268 "parser.ypp" +#line 265 "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 2065 "parser.cpp" +#line 2050 "parser.cpp" break; case 7: // program: inline -#line 270 "parser.ypp" +#line 267 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2071 "parser.cpp" +#line 2056 "parser.cpp" break; case 8: // program: include -#line 272 "parser.ypp" +#line 269 "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 2077 "parser.cpp" +#line 2062 "parser.cpp" break; case 9: // program: declaration -#line 274 "parser.ypp" +#line 271 "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 2083 "parser.cpp" +#line 2068 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 278 "parser.ypp" +#line 275 "parser.ypp" { iw8_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2089 "parser.cpp" +#line 2074 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2095 "parser.cpp" +#line 2080 "parser.cpp" break; case 12: // declaration: "/#" -#line 287 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2101 "parser.cpp" +#line 2086 "parser.cpp" break; case 13: // declaration: "#/" -#line 288 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2107 "parser.cpp" +#line 2092 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 289 "parser.ypp" +#line 286 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2113 "parser.cpp" +#line 2098 "parser.cpp" break; case 15: // declaration: decl_constant -#line 290 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2119 "parser.cpp" +#line 2104 "parser.cpp" break; case 16: // declaration: decl_thread -#line 291 "parser.ypp" +#line 288 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2125 "parser.cpp" +#line 2110 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 296 "parser.ypp" +#line 293 "parser.ypp" { ctx->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 2131 "parser.cpp" +#line 2116 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 301 "parser.ypp" +#line 298 "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 2137 "parser.cpp" +#line 2122 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 306 "parser.ypp" +#line 303 "parser.ypp" { ctx->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 2143 "parser.cpp" +#line 2128 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2149 "parser.cpp" +#line 2134 "parser.cpp" break; case 21: // stmt: stmt_block -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2155 "parser.cpp" +#line 2140 "parser.cpp" break; case 22: // stmt: stmt_call -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2161 "parser.cpp" +#line 2146 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2167 "parser.cpp" +#line 2152 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2173 "parser.cpp" +#line 2158 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2179 "parser.cpp" +#line 2164 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2185 "parser.cpp" +#line 2170 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2191 "parser.cpp" +#line 2176 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2197 "parser.cpp" +#line 2182 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2203 "parser.cpp" +#line 2188 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } -#line 2209 "parser.cpp" +#line 2194 "parser.cpp" break; case 31: // stmt: stmt_if -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2215 "parser.cpp" +#line 2200 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2221 "parser.cpp" +#line 2206 "parser.cpp" break; case 33: // stmt: stmt_while -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2227 "parser.cpp" +#line 2212 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2233 "parser.cpp" +#line 2218 "parser.cpp" break; case 35: // stmt: stmt_for -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2239 "parser.cpp" +#line 2224 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2245 "parser.cpp" +#line 2230 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2251 "parser.cpp" +#line 2236 "parser.cpp" break; case 38: // stmt: stmt_case -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2257 "parser.cpp" +#line 2242 "parser.cpp" break; case 39: // stmt: stmt_default -#line 329 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2263 "parser.cpp" +#line 2248 "parser.cpp" break; case 40: // stmt: stmt_break -#line 330 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2269 "parser.cpp" +#line 2254 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 331 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2275 "parser.cpp" +#line 2260 "parser.cpp" break; case 42: // stmt: stmt_return -#line 332 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2281 "parser.cpp" +#line 2266 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 333 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2287 "parser.cpp" +#line 2272 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 334 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } -#line 2293 "parser.cpp" +#line 2278 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 335 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } -#line 2299 "parser.cpp" +#line 2284 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 339 "parser.ypp" +#line 336 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2305 "parser.cpp" +#line 2290 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 340 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2311 "parser.cpp" +#line 2296 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 344 "parser.ypp" +#line 341 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2317 "parser.cpp" +#line 2302 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 345 "parser.ypp" +#line 342 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2323 "parser.cpp" +#line 2308 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 350 "parser.ypp" +#line 347 "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 2329 "parser.cpp" +#line 2314 "parser.cpp" break; case 51: // stmt_list: stmt -#line 352 "parser.ypp" +#line 349 "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 2335 "parser.cpp" +#line 2320 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 357 "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 2341 "parser.cpp" +#line 2326 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 359 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2347 "parser.cpp" +#line 2332 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 361 "parser.ypp" +#line 358 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2353 "parser.cpp" +#line 2338 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 363 "parser.ypp" +#line 360 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2359 "parser.cpp" +#line 2344 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 368 "parser.ypp" +#line 365 "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 2365 "parser.cpp" +#line 2350 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 370 "parser.ypp" +#line 367 "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 2371 "parser.cpp" +#line 2356 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 375 "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 2377 "parser.cpp" +#line 2362 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 377 "parser.ypp" +#line 374 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2383 "parser.cpp" +#line 2368 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 379 "parser.ypp" +#line 376 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2389 "parser.cpp" +#line 2374 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 384 "parser.ypp" +#line 381 "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 2395 "parser.cpp" +#line 2380 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 389 "parser.ypp" +#line 386 "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 2401 "parser.cpp" +#line 2386 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 391 "parser.ypp" +#line 388 "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 2407 "parser.cpp" +#line 2392 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 396 "parser.ypp" +#line 393 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2413 "parser.cpp" +#line 2398 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 401 "parser.ypp" +#line 398 "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 2419 "parser.cpp" +#line 2404 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 403 "parser.ypp" +#line 400 "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 2425 "parser.cpp" +#line 2410 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 408 "parser.ypp" +#line 405 "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 2431 "parser.cpp" +#line 2416 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 410 "parser.ypp" +#line 407 "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 2437 "parser.cpp" +#line 2422 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 415 "parser.ypp" +#line 412 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2443 "parser.cpp" +#line 2428 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 420 "parser.ypp" +#line 417 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2449 "parser.cpp" +#line 2434 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 422 "parser.ypp" +#line 419 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2455 "parser.cpp" +#line 2440 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 427 "parser.ypp" +#line 424 "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 2461 "parser.cpp" +#line 2446 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 432 "parser.ypp" +#line 429 "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 2467 "parser.cpp" +#line 2452 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 437 "parser.ypp" +#line 434 "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 2473 "parser.cpp" +#line 2458 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 442 "parser.ypp" +#line 439 "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 2479 "parser.cpp" +#line 2464 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 447 "parser.ypp" +#line 444 "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 2485 "parser.cpp" +#line 2470 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 452 "parser.ypp" +#line 449 "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 2491 "parser.cpp" +#line 2476 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 454 "parser.ypp" +#line 451 "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 2497 "parser.cpp" +#line 2482 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 459 "parser.ypp" +#line 456 "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 2503 "parser.cpp" +#line 2488 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 464 "parser.ypp" +#line 461 "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 2509 "parser.cpp" +#line 2494 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 466 "parser.ypp" +#line 463 "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 2515 "parser.cpp" +#line 2500 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 471 "parser.ypp" +#line 468 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2521 "parser.cpp" +#line 2506 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 476 "parser.ypp" +#line 473 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2527 "parser.cpp" +#line 2512 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 481 "parser.ypp" +#line 478 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2533 "parser.cpp" +#line 2518 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 486 "parser.ypp" +#line 483 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2539 "parser.cpp" +#line 2524 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 488 "parser.ypp" +#line 485 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2545 "parser.cpp" +#line 2530 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 493 "parser.ypp" +#line 490 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2551 "parser.cpp" +#line 2536 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 498 "parser.ypp" +#line 495 "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 2557 "parser.cpp" +#line 2542 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 503 "parser.ypp" +#line 500 "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 2563 "parser.cpp" +#line 2548 "parser.cpp" break; case 90: // expr: expr_ternary -#line 507 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2569 "parser.cpp" +#line 2554 "parser.cpp" break; case 91: // expr: expr_binary -#line 508 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2575 "parser.cpp" +#line 2560 "parser.cpp" break; case 92: // expr: expr_primitive -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2581 "parser.cpp" +#line 2566 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 513 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2587 "parser.cpp" +#line 2572 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 514 "parser.ypp" +#line 511 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2593 "parser.cpp" +#line 2578 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2599 "parser.cpp" +#line 2584 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2605 "parser.cpp" +#line 2590 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2611 "parser.cpp" +#line 2596 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2617 "parser.cpp" +#line 2602 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 527 "parser.ypp" +#line 524 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2623 "parser.cpp" +#line 2608 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 529 "parser.ypp" +#line 526 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2629 "parser.cpp" +#line 2614 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 531 "parser.ypp" +#line 528 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2635 "parser.cpp" +#line 2620 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 533 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2641 "parser.cpp" +#line 2626 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 535 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2647 "parser.cpp" +#line 2632 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 537 "parser.ypp" +#line 534 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2653 "parser.cpp" +#line 2638 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 539 "parser.ypp" +#line 536 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2659 "parser.cpp" +#line 2644 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 544 "parser.ypp" +#line 541 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2665 "parser.cpp" +#line 2650 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 546 "parser.ypp" +#line 543 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2671 "parser.cpp" +#line 2656 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 551 "parser.ypp" +#line 548 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2677 "parser.cpp" +#line 2662 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 553 "parser.ypp" +#line 550 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2683 "parser.cpp" +#line 2668 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 558 "parser.ypp" +#line 555 "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 2689 "parser.cpp" +#line 2674 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2695 "parser.cpp" +#line 2680 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2701 "parser.cpp" +#line 2686 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2707 "parser.cpp" +#line 2692 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2713 "parser.cpp" +#line 2698 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2719 "parser.cpp" +#line 2704 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2725 "parser.cpp" +#line 2710 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2731 "parser.cpp" +#line 2716 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2737 "parser.cpp" +#line 2722 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2743 "parser.cpp" +#line 2728 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2749 "parser.cpp" +#line 2734 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2755 "parser.cpp" +#line 2740 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 585 "parser.ypp" +#line 582 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2761 "parser.cpp" +#line 2746 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2767 "parser.cpp" +#line 2752 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2773 "parser.cpp" +#line 2758 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2779 "parser.cpp" +#line 2764 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2785 "parser.cpp" +#line 2770 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 595 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2791 "parser.cpp" +#line 2776 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2797 "parser.cpp" +#line 2782 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2803 "parser.cpp" +#line 2788 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2809 "parser.cpp" +#line 2794 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2815 "parser.cpp" +#line 2800 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2821 "parser.cpp" +#line 2806 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2827 "parser.cpp" +#line 2812 "parser.cpp" break; case 134: // expr_primitive: expr_isdefined -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } -#line 2833 "parser.cpp" +#line 2818 "parser.cpp" break; case 135: // expr_primitive: expr_istrue -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } -#line 2839 "parser.cpp" +#line 2824 "parser.cpp" break; case 136: // expr_primitive: expr_reference -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2845 "parser.cpp" +#line 2830 "parser.cpp" break; case 137: // expr_primitive: expr_array -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2851 "parser.cpp" +#line 2836 "parser.cpp" break; case 138: // expr_primitive: expr_field -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2857 "parser.cpp" +#line 2842 "parser.cpp" break; case 139: // expr_primitive: expr_size -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2863 "parser.cpp" +#line 2848 "parser.cpp" break; case 140: // expr_primitive: expr_paren -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2869 "parser.cpp" +#line 2854 "parser.cpp" break; case 141: // expr_primitive: expr_thisthread -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2875 "parser.cpp" +#line 2860 "parser.cpp" break; case 142: // expr_primitive: expr_empty_array -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2881 "parser.cpp" +#line 2866 "parser.cpp" break; case 143: // expr_primitive: expr_undefined -#line 615 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2887 "parser.cpp" +#line 2872 "parser.cpp" break; case 144: // expr_primitive: expr_game -#line 616 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2893 "parser.cpp" +#line 2878 "parser.cpp" break; case 145: // expr_primitive: expr_self -#line 617 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2899 "parser.cpp" +#line 2884 "parser.cpp" break; case 146: // expr_primitive: expr_anim -#line 618 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2905 "parser.cpp" +#line 2890 "parser.cpp" break; case 147: // expr_primitive: expr_level -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2911 "parser.cpp" +#line 2896 "parser.cpp" break; case 148: // expr_primitive: expr_animation -#line 620 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2917 "parser.cpp" +#line 2902 "parser.cpp" break; case 149: // expr_primitive: expr_animtree -#line 621 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2923 "parser.cpp" +#line 2908 "parser.cpp" break; case 150: // expr_primitive: expr_identifier -#line 622 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2929 "parser.cpp" +#line 2914 "parser.cpp" break; case 151: // expr_primitive: expr_istring -#line 623 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2935 "parser.cpp" +#line 2920 "parser.cpp" break; case 152: // expr_primitive: expr_string -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2941 "parser.cpp" +#line 2926 "parser.cpp" break; case 153: // expr_primitive: expr_color -#line 625 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2947 "parser.cpp" +#line 2932 "parser.cpp" break; case 154: // expr_primitive: expr_vector -#line 626 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2953 "parser.cpp" +#line 2938 "parser.cpp" break; case 155: // expr_primitive: expr_float -#line 627 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2959 "parser.cpp" +#line 2944 "parser.cpp" break; case 156: // expr_primitive: expr_integer -#line 628 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2965 "parser.cpp" +#line 2950 "parser.cpp" break; case 157: // expr_primitive: expr_false -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2971 "parser.cpp" +#line 2956 "parser.cpp" break; case 158: // expr_primitive: expr_true -#line 630 "parser.ypp" +#line 627 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2977 "parser.cpp" +#line 2962 "parser.cpp" break; case 159: // expr_complement: "~" expr -#line 635 "parser.ypp" +#line 632 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2983 "parser.cpp" +#line 2968 "parser.cpp" break; case 160: // expr_not: "!" expr -#line 640 "parser.ypp" +#line 637 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2989 "parser.cpp" +#line 2974 "parser.cpp" break; case 161: // expr_call: expr_function -#line 644 "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 2995 "parser.cpp" +#line 2980 "parser.cpp" break; case 162: // expr_call: expr_pointer -#line 645 "parser.ypp" +#line 642 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 3001 "parser.cpp" +#line 2986 "parser.cpp" break; case 163: // expr_method: expr_object expr_function -#line 648 "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 3007 "parser.cpp" +#line 2992 "parser.cpp" break; case 164: // expr_method: expr_object expr_pointer -#line 649 "parser.ypp" +#line 646 "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 3013 "parser.cpp" +#line 2998 "parser.cpp" break; case 165: // expr_function: expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 651 "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 3019 "parser.cpp" +#line 3004 "parser.cpp" break; case 166: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 653 "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 3025 "parser.cpp" +#line 3010 "parser.cpp" break; case 167: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 658 "parser.ypp" +#line 655 "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 3031 "parser.cpp" +#line 3016 "parser.cpp" break; case 168: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 660 "parser.ypp" +#line 657 "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 3037 "parser.cpp" +#line 3022 "parser.cpp" break; case 169: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 662 "parser.ypp" +#line 659 "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 3043 "parser.cpp" +#line 3028 "parser.cpp" break; case 170: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 664 "parser.ypp" +#line 661 "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 3049 "parser.cpp" +#line 3034 "parser.cpp" break; case 171: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 669 "parser.ypp" +#line 666 "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 3055 "parser.cpp" +#line 3040 "parser.cpp" break; case 172: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 671 "parser.ypp" +#line 668 "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 3061 "parser.cpp" +#line 3046 "parser.cpp" break; case 173: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 673 "parser.ypp" +#line 670 "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 3067 "parser.cpp" +#line 3052 "parser.cpp" break; case 174: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 675 "parser.ypp" +#line 672 "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 3073 "parser.cpp" +#line 3058 "parser.cpp" break; case 175: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 680 "parser.ypp" +#line 677 "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 3079 "parser.cpp" +#line 3064 "parser.cpp" break; case 176: // expr_parameters: expr_parameters "," expr_identifier -#line 685 "parser.ypp" +#line 682 "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 3085 "parser.cpp" +#line 3070 "parser.cpp" break; case 177: // expr_parameters: expr_identifier -#line 687 "parser.ypp" +#line 684 "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 3091 "parser.cpp" +#line 3076 "parser.cpp" break; case 178: // expr_parameters: %empty -#line 689 "parser.ypp" +#line 686 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3097 "parser.cpp" +#line 3082 "parser.cpp" break; case 179: // expr_arguments: expr_arguments_no_empty -#line 694 "parser.ypp" +#line 691 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3103 "parser.cpp" +#line 3088 "parser.cpp" break; case 180: // expr_arguments: %empty -#line 696 "parser.ypp" +#line 693 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3109 "parser.cpp" +#line 3094 "parser.cpp" break; case 181: // expr_arguments_no_empty: expr_arguments "," expr -#line 701 "parser.ypp" +#line 698 "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 3115 "parser.cpp" +#line 3100 "parser.cpp" break; case 182: // expr_arguments_no_empty: expr -#line 703 "parser.ypp" +#line 700 "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 3121 "parser.cpp" +#line 3106 "parser.cpp" break; case 183: // expr_isdefined: "isdefined" "(" expr ")" -#line 708 "parser.ypp" +#line 705 "parser.ypp" { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3127 "parser.cpp" +#line 3112 "parser.cpp" break; case 184: // expr_istrue: "istrue" "(" expr ")" -#line 713 "parser.ypp" +#line 710 "parser.ypp" { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3133 "parser.cpp" +#line 3118 "parser.cpp" break; case 185: // expr_reference: "::" expr_identifier -#line 718 "parser.ypp" +#line 715 "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 3139 "parser.cpp" +#line 3124 "parser.cpp" break; case 186: // expr_reference: expr_path "::" expr_identifier -#line 720 "parser.ypp" +#line 717 "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 3145 "parser.cpp" +#line 3130 "parser.cpp" break; case 187: // expr_array: expr_object "[" expr "]" -#line 725 "parser.ypp" +#line 722 "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 3151 "parser.cpp" +#line 3136 "parser.cpp" break; case 188: // expr_field: expr_object "." expr_identifier -#line 730 "parser.ypp" +#line 727 "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 3157 "parser.cpp" +#line 3142 "parser.cpp" break; case 189: // expr_size: expr_object ".size" -#line 735 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3163 "parser.cpp" +#line 3148 "parser.cpp" break; case 190: // expr_paren: "(" expr ")" -#line 740 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3169 "parser.cpp" +#line 3154 "parser.cpp" break; case 191: // expr_object: expr_call -#line 744 "parser.ypp" +#line 741 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3175 "parser.cpp" +#line 3160 "parser.cpp" break; case 192: // expr_object: expr_method -#line 745 "parser.ypp" +#line 742 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3181 "parser.cpp" +#line 3166 "parser.cpp" break; case 193: // expr_object: expr_array -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3187 "parser.cpp" +#line 3172 "parser.cpp" break; case 194: // expr_object: expr_field -#line 747 "parser.ypp" +#line 744 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3193 "parser.cpp" +#line 3178 "parser.cpp" break; case 195: // expr_object: expr_game -#line 748 "parser.ypp" +#line 745 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3199 "parser.cpp" +#line 3184 "parser.cpp" break; case 196: // expr_object: expr_self -#line 749 "parser.ypp" +#line 746 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3205 "parser.cpp" +#line 3190 "parser.cpp" break; case 197: // expr_object: expr_anim -#line 750 "parser.ypp" +#line 747 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3211 "parser.cpp" +#line 3196 "parser.cpp" break; case 198: // expr_object: expr_level -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3217 "parser.cpp" +#line 3202 "parser.cpp" break; case 199: // expr_object: expr_identifier -#line 752 "parser.ypp" +#line 749 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3223 "parser.cpp" +#line 3208 "parser.cpp" break; case 200: // expr_thisthread: "thisthread" -#line 757 "parser.ypp" +#line 754 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3229 "parser.cpp" +#line 3214 "parser.cpp" break; case 201: // expr_empty_array: "[" "]" -#line 762 "parser.ypp" +#line 759 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3235 "parser.cpp" +#line 3220 "parser.cpp" break; case 202: // expr_undefined: "undefined" -#line 767 "parser.ypp" +#line 764 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3241 "parser.cpp" +#line 3226 "parser.cpp" break; case 203: // expr_game: "game" -#line 772 "parser.ypp" +#line 769 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3247 "parser.cpp" +#line 3232 "parser.cpp" break; case 204: // expr_self: "self" -#line 777 "parser.ypp" +#line 774 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3253 "parser.cpp" +#line 3238 "parser.cpp" break; case 205: // expr_anim: "anim" -#line 782 "parser.ypp" +#line 779 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3259 "parser.cpp" +#line 3244 "parser.cpp" break; case 206: // expr_level: "level" -#line 787 "parser.ypp" +#line 784 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3265 "parser.cpp" +#line 3250 "parser.cpp" break; case 207: // expr_animation: "%" "identifier" -#line 792 "parser.ypp" +#line 789 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3271 "parser.cpp" +#line 3256 "parser.cpp" break; case 208: // expr_animtree: "#animtree" -#line 797 "parser.ypp" +#line 794 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3277 "parser.cpp" +#line 3262 "parser.cpp" break; case 209: // expr_identifier: "identifier" -#line 802 "parser.ypp" +#line 799 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3283 "parser.cpp" +#line 3268 "parser.cpp" break; case 210: // expr_path: "path" -#line 807 "parser.ypp" +#line 804 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3289 "parser.cpp" +#line 3274 "parser.cpp" break; case 211: // expr_path: expr_identifier -#line 809 "parser.ypp" +#line 806 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3295 "parser.cpp" +#line 3280 "parser.cpp" break; case 212: // expr_istring: "localized string" -#line 814 "parser.ypp" +#line 811 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3301 "parser.cpp" +#line 3286 "parser.cpp" break; case 213: // expr_string: "string literal" -#line 819 "parser.ypp" +#line 816 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3307 "parser.cpp" +#line 3292 "parser.cpp" break; case 214: // expr_color: "color" -#line 824 "parser.ypp" +#line 821 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3313 "parser.cpp" +#line 3298 "parser.cpp" break; case 215: // expr_vector: "(" expr "," expr "," expr ")" -#line 829 "parser.ypp" +#line 826 "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 3319 "parser.cpp" +#line 3304 "parser.cpp" break; case 216: // expr_float: "-" "float" -#line 834 "parser.ypp" +#line 831 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3325 "parser.cpp" +#line 3310 "parser.cpp" break; case 217: // expr_float: "float" -#line 836 "parser.ypp" +#line 833 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3331 "parser.cpp" +#line 3316 "parser.cpp" break; - case 218: // expr_integer: "-" "int" -#line 841 "parser.ypp" + case 218: // expr_integer: "-" "integer" +#line 838 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3337 "parser.cpp" +#line 3322 "parser.cpp" break; - case 219: // expr_integer: "int" -#line 843 "parser.ypp" + case 219: // expr_integer: "integer" +#line 840 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3343 "parser.cpp" +#line 3328 "parser.cpp" break; - case 220: // expr_integer: "octal int" + case 220: // expr_false: "false" #line 845 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3349 "parser.cpp" - break; - - case 221: // expr_integer: "binary int" -#line 847 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3355 "parser.cpp" - break; - - case 222: // expr_integer: "hexadecimal int" -#line 849 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3361 "parser.cpp" - break; - - case 223: // expr_false: "false" -#line 854 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3367 "parser.cpp" +#line 3334 "parser.cpp" break; - case 224: // expr_true: "true" -#line 859 "parser.ypp" + case 221: // expr_true: "true" +#line 850 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3373 "parser.cpp" +#line 3340 "parser.cpp" break; -#line 3377 "parser.cpp" +#line 3344 "parser.cpp" default: break; @@ -3569,28 +3536,27 @@ namespace xsk { namespace gsc { namespace iw8 { "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", "localized string", "color", "float", - "int", "octal int", "binary int", "hexadecimal int", "ADD_ARRAY", "THEN", - "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", "POSTINC", "POSTDEC", - "$accept", "root", "program", "inline", "include", "declaration", - "decl_usingtree", "decl_constant", "decl_thread", "stmt", "stmt_dev", - "stmt_block", "stmt_list", "stmt_expr", "stmt_call", "stmt_assign", - "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", - "stmt_waittillmatch", "stmt_waittillframeend", "stmt_waitframe", - "stmt_if", "stmt_ifelse", "stmt_while", "stmt_dowhile", "stmt_for", - "stmt_foreach", "stmt_switch", "stmt_case", "stmt_default", "stmt_break", - "stmt_continue", "stmt_return", "stmt_breakpoint", "stmt_prof_begin", - "stmt_prof_end", "expr", "expr_or_empty", "expr_assign", - "expr_increment", "expr_decrement", "expr_ternary", "expr_binary", - "expr_primitive", "expr_complement", "expr_not", "expr_call", - "expr_method", "expr_function", "expr_pointer", "expr_add_array", - "expr_parameters", "expr_arguments", "expr_arguments_no_empty", - "expr_isdefined", "expr_istrue", "expr_reference", "expr_array", - "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier", "expr_path", "expr_istring", - "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", - "expr_false", "expr_true", YY_NULLPTR + "integer", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", "PREINC", + "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", "inline", + "include", "declaration", "decl_usingtree", "decl_constant", + "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", + "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", + "stmt_wait", "stmt_waittill", "stmt_waittillmatch", + "stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse", + "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", + "stmt_case", "stmt_default", "stmt_break", "stmt_continue", + "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", + "expr", "expr_or_empty", "expr_assign", "expr_increment", + "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", + "expr_complement", "expr_not", "expr_call", "expr_method", + "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", + "expr_arguments", "expr_arguments_no_empty", "expr_isdefined", + "expr_istrue", "expr_reference", "expr_array", "expr_field", "expr_size", + "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", + "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", + "expr_animation", "expr_animtree", "expr_identifier", "expr_path", + "expr_istring", "expr_string", "expr_color", "expr_vector", "expr_float", + "expr_integer", "expr_false", "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3855,59 +3821,58 @@ namespace xsk { namespace gsc { namespace iw8 { } - const short parser::yypact_ninf_ = -273; + const short parser::yypact_ninf_ = -276; const short parser::yytable_ninf_ = -212; const short parser::yypact_[] = { - 15, -273, -273, -40, -40, -33, -273, 27, 15, -273, - -273, -273, -273, -273, -273, -35, -273, -273, -25, -17, - -48, -273, -273, -273, -273, -45, 888, -273, -273, -273, - 19, 43, -273, -273, -21, -8, -273, 17, -273, -273, - -273, -273, -273, -273, -273, 28, 31, 888, 749, -45, - 888, 888, -34, -14, -273, -273, -273, -273, -273, -273, - -273, 2040, -273, -273, -273, -273, -273, 11, 325, -273, - -273, -273, -273, -273, -273, 515, 520, -273, -273, 601, - -273, -273, -273, 623, 775, 849, 913, -273, -273, 408, - 26, -273, -273, -273, -273, -273, -273, -273, -273, 41, - 56, -45, 62, 60, 67, 74, 93, 78, 80, 888, - 888, 1294, 749, -273, 2123, 88, 91, -273, -273, -273, - -273, -273, -273, -273, 888, 888, 888, 888, 888, 888, - 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, - 888, 888, 888, -273, 957, -45, -273, -273, 103, 96, - 888, -45, -273, 1055, -273, -273, 888, 888, -45, 888, - 888, -45, 888, 1460, 1494, -273, 888, 1806, 888, -273, - 953, 97, 97, 2154, 2164, 2246, 2246, 157, 157, 157, - 157, 2195, 2236, 2205, -30, -30, -273, -273, -273, 1846, - -273, -45, 44, -273, 117, 1108, 888, 100, -18, 118, - 1253, 120, 127, 129, 130, -11, 122, 132, 137, 819, - 138, 150, 152, -273, 153, 139, 139, -273, -273, -273, - 1154, -273, -273, -273, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, 151, 154, 155, 158, 163, - -273, -273, 672, -273, -273, -273, -273, -22, 1886, 46, - 162, 1926, 47, 167, 1966, -273, -273, 2005, 172, 2123, - 888, -273, 117, -273, 888, -273, 1207, 2075, -273, 177, - -273, 888, 190, 888, 76, -45, 888, 128, 178, 180, - -273, -273, -273, -273, 2110, -273, 888, 888, 888, -273, - -273, 22, 22, -273, -273, -273, -273, -273, -273, -273, - 186, 191, 196, 202, -273, -273, 888, 888, 888, 888, - 888, 888, 888, 888, 888, 888, 888, 198, -273, 888, - 204, -273, 888, 205, 888, 211, 2123, 53, -273, -273, - 207, 1528, 213, 1562, 208, -273, -273, -273, 1257, 4, - 1596, -273, -273, -273, 63, 73, 1806, 888, 888, 888, - 888, 2123, 2123, 2123, 2123, 2123, 2123, 2123, 2123, 2123, - 2123, 2123, 214, 75, 220, 84, 222, 1630, 888, -273, - -273, 1253, 888, 1253, 888, 888, -45, 56, 209, 216, - 1664, 1338, 1382, 1426, 888, -273, 888, -273, 888, -273, - 86, 253, 1698, -273, 2123, 217, 1732, 257, -273, -273, - -273, 224, 225, 888, 227, 888, 231, 888, 94, 110, - 113, -273, 1253, 232, 76, 1253, 888, -273, -273, 244, - -273, 245, -273, 246, -273, -273, -273, -273, -273, 247, - -273, 1766, 239, 240, 241, 1253, 1253, -273, -273, -273, - -273, -273 + 23, -276, -276, -40, -40, -30, -276, 54, 23, -276, + -276, -276, -276, -276, -276, -8, -276, -276, -1, 16, + -57, -276, -276, -276, -276, -17, 1128, -276, -276, -276, + 44, -15, -276, -276, -35, -33, -276, 43, -276, -276, + -276, -276, -276, -276, -276, 48, 57, 1128, 996, -17, + 1128, 1128, -31, 25, -276, -276, -276, -276, 2050, -276, + -276, -276, -276, -276, 305, 699, -276, -276, -276, -276, + -276, -276, 722, 1019, -276, -276, 1029, -276, -276, -276, + 1092, 1154, 1224, 1271, -276, -276, 588, 64, -276, -276, + -276, -276, -276, -276, -276, -276, 69, 78, -17, 87, + 82, 91, 93, 101, 95, 103, 1128, 1128, 1266, 996, + -276, 2133, 99, 128, -276, -276, -276, -276, -276, -276, + -276, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, + 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, + -276, 1194, -17, -276, -276, 119, 121, 1128, -17, -276, + 81, -276, -276, 1128, 1128, -17, 1128, 1128, -17, 1128, + 1434, 1468, -276, 1128, 1780, 1128, -276, 2015, 164, 164, + 2164, 2174, 2246, 2246, -42, -42, -42, -42, 2205, 717, + 2215, 45, 45, -276, -276, -276, 1820, -276, -17, 27, + -276, 135, 823, 1128, 127, -3, 141, 968, 144, 147, + 149, 153, -20, 154, 146, 148, 1062, 152, 168, 169, + -276, 160, 503, 503, -276, -276, -276, 869, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, + -276, -276, 165, 166, 170, 174, 175, -276, -276, 635, + -276, -276, -276, -276, -23, 1860, 36, 178, 1900, 38, + 179, 1940, -276, -276, 1979, 181, 2133, 1128, -276, 135, + -276, 1128, -276, 922, 2085, -276, 189, -276, 1128, 197, + 1128, 28, -17, 1128, 140, 184, 185, -276, -276, -276, + -276, 2120, -276, 1128, 1128, 1128, -276, -276, -11, -11, + -276, -276, -276, -276, -276, -276, -276, 196, 200, 201, + 202, -276, -276, 1128, 1128, 1128, 1128, 1128, 1128, 1128, + 1128, 1128, 1128, 1128, 192, -276, 1128, 205, -276, 1128, + 206, 1128, 214, 2133, 80, -276, -276, 207, 1502, 216, + 1536, 208, -276, -276, -276, 1220, -2, 1570, -276, -276, + -276, 89, 110, 1780, 1128, 1128, 1128, 1128, 2133, 2133, + 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 219, + 112, 220, 114, 222, 1604, 1128, -276, -276, 968, 1128, + 968, 1128, 1128, -17, 78, 221, 227, 1638, 1312, 1356, + 1400, 1128, -276, 1128, -276, 1128, -276, 116, 255, 1672, + -276, 2133, 229, 1706, 248, -276, -276, -276, 230, 232, + 1128, 234, 1128, 237, 1128, 122, 124, 130, -276, 968, + 238, 28, 968, 1128, -276, -276, 231, -276, 250, -276, + 261, -276, -276, -276, -276, -276, 262, -276, 1740, 239, + 246, 254, 968, 968, -276, -276, -276, -276, -276 }; const unsigned char @@ -3916,473 +3881,466 @@ namespace xsk { namespace gsc { namespace iw8 { 3, 12, 13, 0, 0, 0, 209, 0, 2, 7, 8, 9, 14, 15, 16, 0, 210, 211, 0, 0, 0, 1, 4, 5, 6, 178, 0, 10, 11, 213, - 0, 0, 177, 208, 0, 0, 200, 0, 224, 223, + 0, 0, 177, 208, 0, 0, 200, 0, 221, 220, 202, 203, 204, 205, 206, 0, 0, 0, 180, 0, - 0, 0, 0, 0, 212, 214, 217, 219, 220, 221, - 222, 0, 90, 91, 92, 129, 130, 131, 132, 161, - 162, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 0, 151, 152, 153, 154, 155, 156, 157, 158, 0, - 0, 0, 0, 211, 0, 0, 211, 0, 0, 0, - 0, 0, 180, 201, 182, 0, 179, 185, 160, 159, - 216, 218, 207, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 212, 214, 217, 219, 0, 90, + 91, 92, 129, 130, 131, 132, 161, 162, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 0, 151, 152, + 153, 154, 155, 156, 157, 158, 0, 0, 0, 0, + 211, 0, 0, 211, 0, 0, 0, 0, 0, 180, + 201, 182, 0, 179, 185, 160, 159, 216, 218, 207, + 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 189, 0, 0, 163, 164, 211, 0, - 180, 0, 17, 0, 19, 176, 0, 180, 0, 0, - 180, 0, 0, 0, 0, 190, 0, 182, 0, 175, - 0, 122, 123, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 124, 125, 126, 127, 128, 0, - 188, 0, 0, 179, 186, 0, 0, 0, 0, 0, + 189, 0, 0, 163, 164, 211, 0, 180, 0, 17, + 0, 19, 176, 0, 180, 0, 0, 180, 0, 0, + 0, 0, 190, 0, 182, 0, 175, 0, 122, 123, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 124, 125, 126, 127, 128, 0, 188, 0, 0, + 179, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 49, 0, 0, 0, 51, 20, 21, - 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 191, 192, - 193, 194, 0, 195, 196, 197, 198, 199, 0, 0, - 0, 0, 0, 0, 0, 183, 184, 0, 0, 181, - 0, 187, 0, 165, 180, 47, 0, 0, 69, 0, - 70, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 82, 83, 84, 86, 0, 87, 180, 180, 0, 191, - 192, 106, 108, 48, 50, 58, 59, 60, 56, 57, - 0, 0, 0, 0, 107, 109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 167, 180, - 0, 169, 180, 0, 0, 0, 110, 0, 46, 64, - 0, 0, 0, 0, 0, 52, 53, 54, 0, 0, - 0, 81, 80, 85, 0, 0, 0, 0, 0, 0, - 0, 95, 101, 102, 103, 104, 105, 96, 97, 98, - 100, 99, 0, 0, 0, 0, 0, 0, 180, 166, - 71, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 180, 168, 180, 170, 180, 215, - 0, 72, 0, 74, 93, 0, 0, 0, 79, 88, - 89, 0, 0, 180, 0, 180, 0, 180, 0, 0, - 0, 171, 0, 0, 55, 0, 0, 61, 63, 179, - 66, 179, 68, 179, 172, 173, 174, 73, 75, 0, - 77, 0, 0, 0, 0, 0, 0, 62, 65, 67, - 76, 78 + 49, 0, 0, 0, 51, 20, 21, 0, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 0, 0, 0, 191, 192, 193, 194, 0, + 195, 196, 197, 198, 199, 0, 0, 0, 0, 0, + 0, 0, 183, 184, 0, 0, 181, 0, 187, 0, + 165, 180, 47, 0, 0, 69, 0, 70, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 82, 83, 84, + 86, 0, 87, 180, 180, 0, 191, 192, 106, 108, + 48, 50, 58, 59, 60, 56, 57, 0, 0, 0, + 0, 107, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 167, 180, 0, 169, 180, + 0, 0, 0, 110, 0, 46, 64, 0, 0, 0, + 0, 0, 52, 53, 54, 0, 0, 0, 81, 80, + 85, 0, 0, 0, 0, 0, 0, 0, 95, 101, + 102, 103, 104, 105, 96, 97, 98, 100, 99, 0, + 0, 0, 0, 0, 0, 180, 166, 71, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 180, 168, 180, 170, 180, 215, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 180, 0, 180, 0, 180, 0, 0, 0, 171, 0, + 0, 55, 0, 0, 61, 63, 179, 66, 179, 68, + 179, 172, 173, 174, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 62, 65, 67, 76, 78 }; const short parser::yypgoto_[] = { - -273, -273, -273, 292, 295, 297, -273, -273, -273, -184, - -273, -98, 109, -118, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, -273, -273, -273, 203, -273, - -272, -270, -269, -273, -273, -273, -273, -273, -147, -72, - -74, -62, -273, -273, -127, -47, -273, -273, -273, 193, - 219, -273, -273, 265, -273, -273, -273, 296, 315, 351, - 452, -273, -273, 0, 6, -273, -13, -273, -273, -273, - 105, -273, -273 + -276, -276, -276, 303, 304, 306, -276, -276, -276, -184, + -276, -95, 142, -108, -276, -276, -276, -276, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, 194, -276, + -275, -269, -267, -276, -276, -276, -276, -276, -12, -6, + -71, -65, -276, -276, 13, -47, -276, -276, -276, 79, + 253, -276, -276, 279, -276, -276, -276, 345, 373, 380, + 390, -276, -276, 0, 6, -276, -13, -276, -276, -276, + 134, -276, -276 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 217, - 218, 219, 220, 344, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 114, 405, - 245, 246, 247, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 31, 115, 193, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 214, + 215, 216, 217, 341, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 111, 402, + 242, 243, 244, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 31, 112, 190, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95 }; const short parser::yytable_[] = { - 15, 116, 154, 17, 17, 146, 248, 30, 15, 18, - 19, 25, 345, 20, 346, 347, 282, 147, 1, 2, - 3, 4, 5, 192, 150, 32, 385, 21, 279, 102, - 259, 27, -211, 262, 103, 106, 304, 26, 280, 28, - 104, 107, 105, -191, -191, 29, -191, 6, 248, 117, - -191, 16, 6, 248, 34, 35, 386, 37, 140, 141, - 142, -191, 120, 121, -191, 116, 99, 108, 299, 299, - 16, 6, 144, 248, 109, 145, 287, 110, 122, 148, - 151, 249, 29, 16, 6, 149, 57, 58, 59, 60, - 100, 273, 304, 328, 331, 101, 168, 152, 168, 168, - 379, 155, -191, -191, 153, 168, 157, 6, 34, 35, - 388, 37, 156, 16, 6, 168, 41, 42, 43, 44, - 389, 158, 395, 249, 159, 168, 214, 168, 249, 248, - 162, 397, 161, 421, 215, 216, 168, 299, 168, 160, - 168, 434, 169, 300, 300, 190, 168, 337, 249, 150, - 191, 194, 345, 257, 346, 347, 278, 435, 260, 149, - 436, 263, 168, 274, 281, 168, 283, 16, 6, 354, - 355, 34, 35, 284, 37, 285, 286, 290, 146, 41, - 42, 43, 44, 138, 139, 140, 141, 142, 291, 214, - 147, 272, 288, 292, 295, 257, 296, 401, 297, 403, - 257, 149, 373, 298, 249, 375, 149, 305, 329, 342, - 306, 307, 300, 332, 308, 257, 257, 125, 126, 309, - 257, 149, 149, 335, 340, 121, 149, 146, 146, 61, - 16, 6, 357, 351, 248, 352, 248, 358, 437, 147, - 147, 440, 359, 138, 139, 140, 141, 142, 360, 372, - 111, 400, 148, 118, 119, 374, 376, 378, 149, 382, - 394, 450, 451, 380, 384, 409, 396, 418, 398, 419, - 422, 420, 410, 424, 146, 248, 257, 299, 248, 426, - 427, 428, 149, 430, 257, 349, 147, 432, 438, 408, - 149, 442, 443, 444, 445, 447, 448, 449, 248, 248, - 22, 148, 148, 23, 276, 24, 439, 149, 149, 249, - 289, 249, 163, 164, 0, 167, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 250, 189, 148, 0, - 249, 0, 300, 249, 149, 0, 0, -192, -192, 258, - -192, 0, 261, 0, -192, 264, 429, 0, 431, 267, - 433, 269, 251, 249, 249, -192, 0, 0, -192, 0, - 0, 257, 0, 257, 0, 0, 407, 149, 250, 149, - 0, 0, 0, 250, 0, 0, 0, 0, 0, 277, - 0, 0, 0, 0, 0, 0, 0, 0, 250, 250, - 0, 0, 294, 250, 251, 0, -192, -192, 252, 251, - 0, 0, 257, 0, 257, 257, 0, 0, 149, 0, - 149, 149, 0, 0, 251, 251, 0, 0, 0, 251, - -199, -199, 0, -199, 0, 257, 257, -199, 0, 253, - 0, 149, 149, 0, 150, 0, 0, 0, -199, 0, - 252, -199, -211, 0, 0, 252, 0, 0, 254, 250, - 0, 0, 0, 336, 0, 0, 0, 250, 0, 0, - 301, 302, 0, 0, 341, 252, 343, 0, 0, 350, - 0, 253, 0, 0, 0, 251, 253, 0, 0, -199, - -199, 356, 0, 251, 255, 0, 0, 0, 0, 0, - 254, 253, 253, 0, 0, 254, 253, 0, 0, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 254, 254, 0, 0, 0, 254, 0, 377, 0, 0, - 0, 252, 0, 0, 0, 0, 255, -193, -193, 348, - -193, 255, -194, -194, -193, -194, 0, 0, 0, -194, - 390, 391, 392, 393, 0, -193, 255, 255, -193, 0, - -194, 255, 253, -194, 250, 0, 250, 0, 0, 0, - 253, 0, 0, 0, 0, 402, 0, 404, 406, 0, - 0, 254, 0, 0, 0, 0, 0, 0, 0, 254, - 251, 0, 251, 0, 0, 256, -193, -193, 0, 0, - 0, -194, -194, 0, 0, 250, 0, 250, 250, 0, - 0, 0, 0, 0, 0, 0, 0, 255, 0, 441, - 0, 0, 0, 34, 35, 255, 37, 0, 250, 250, - 143, 251, 0, 251, 251, 0, 252, 256, 252, 0, - 0, 144, 256, 0, 145, -195, -195, 0, -195, 0, - 0, 0, -195, 0, 251, 251, 0, 256, 256, 0, - 0, 0, 256, -195, 0, 0, -195, 253, 0, 253, - 0, 310, 311, 0, 312, 313, 0, 252, 0, 348, - 252, 0, 16, 6, 0, 0, 254, 0, 254, 0, - 0, 0, 0, 0, 34, 35, 0, 37, 0, 0, - 252, 252, 0, 0, -195, -195, 0, 0, 253, 0, - 253, 253, 144, 0, 0, 145, 0, 0, 256, 0, - 314, 315, 255, 0, 255, 0, 256, 254, 0, 254, - 254, 253, 253, 0, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 0, 0, 33, 0, 0, - 254, 254, 0, 16, 6, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 0, 255, 255, 0, 0, 0, - 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, - 42, 43, 44, 45, 46, 47, 255, 255, 0, 112, - 113, 0, 0, 49, 0, 0, 0, -196, -196, 0, - -196, 0, 0, 0, -196, 0, 0, 0, 0, 50, - 51, 0, 0, 0, 0, -196, 0, 33, -196, 0, - 0, 0, 0, 256, 0, 256, 52, 0, 0, 53, - 16, 6, 29, 54, 55, 56, 57, 58, 59, 60, - 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, - 42, 43, 44, 45, 46, 47, -196, -196, 0, 48, - 0, 0, 0, 49, 256, 293, 256, 256, 0, 0, - 0, -197, -197, 0, -197, 0, 0, 0, -197, 50, - 51, 0, 0, 0, 0, 0, 33, 256, 256, -197, - 0, 0, -197, 0, 0, 0, 52, 0, 0, 53, - 16, 6, 29, 54, 55, 56, 57, 58, 59, 60, + 15, 113, 151, 17, 17, 143, 342, 30, 15, 18, + 19, 144, 343, 279, 344, 99, 20, 102, 122, 123, + 382, 34, 35, 147, 37, 32, 1, 2, 3, 4, + 5, -211, 97, 301, 100, 103, 29, 98, 25, 141, + 101, 104, 142, 276, 135, 136, 137, 138, 139, 114, + 383, 16, 6, 277, 21, 27, 16, 6, 16, 6, + 34, 35, 113, 37, 26, 117, 118, 284, 41, 42, + 43, 44, 28, 29, 270, 6, 145, 57, 211, 165, + 16, 6, 146, 325, 192, 328, 212, 213, 165, 301, + 165, 96, 193, 105, 106, 194, 195, 196, 152, 197, + 198, 199, 200, 107, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 34, 35, 6, 37, 119, 148, 16, + 6, 41, 42, 43, 44, 149, 150, 376, 154, 150, + 210, 211, 165, 137, 138, 139, 385, 153, 245, 212, + 213, 165, 187, 156, 246, 155, 342, 157, 191, 158, + 254, 165, 343, 159, 344, 257, 146, 386, 260, 392, + 189, 394, 165, 418, 165, 147, 165, 256, 165, 431, + 259, 432, 16, 6, 165, 188, 165, 433, 143, 166, + 245, 271, 165, 275, 144, 245, 246, 278, 269, 285, + 280, 246, 254, 281, 398, 282, 400, 254, 146, 283, + 296, 296, 288, 146, 289, 245, 297, 297, 292, 287, + 295, 246, 254, 254, 293, 294, 339, 254, 146, 146, + 58, 302, 303, 146, 326, 329, 304, 143, 143, 247, + 305, 306, 332, 144, 144, 434, 337, 118, 437, 348, + 349, 108, 354, 369, 115, 116, 355, 356, 357, 145, + 135, 136, 137, 138, 139, 146, 371, 373, 447, 448, + 375, 245, 379, 377, 381, 391, 393, 246, 395, 296, + 423, 247, 419, 254, 143, 297, 247, 406, 439, 146, + 144, 254, 346, 407, 334, 421, 424, 146, 425, 405, + 427, 247, 247, 429, 435, 444, 247, 440, 145, 145, + 160, 161, 445, 164, 146, 146, 351, 352, 441, 442, + 446, 22, 23, 436, 24, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 273, 186, 286, -191, -191, 370, + -191, 0, 372, 0, -191, 145, 0, 255, 0, 0, + 258, 146, 247, 261, 0, -191, 0, 264, -191, 266, + 247, 0, 0, 426, 0, 428, 245, 430, 245, 0, + 0, 0, 246, 0, 246, 0, 0, 0, 254, 0, + 254, 0, 0, 404, 146, 0, 146, 274, 397, 0, + 0, 0, 0, 0, 0, 0, -191, -191, 0, 0, + 291, 0, 0, 248, 415, 0, 416, 245, 417, 296, + 245, 0, 0, 246, 0, 297, 246, 0, 0, 254, + 0, 254, 254, 0, 0, 146, 0, 146, 146, 249, + 245, 245, 0, 0, 0, 0, 246, 246, 0, 0, + 0, 0, 254, 254, 0, 248, 0, 0, 146, 146, + 248, 0, 0, 0, 0, 0, 0, 247, 0, 247, + 0, 333, 0, 0, 0, 248, 248, 0, 0, 0, + 248, 249, 338, 0, 340, 0, 249, 347, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, + 0, 298, 299, 0, 0, 250, 249, 0, 247, 0, + 247, 247, 0, 0, 0, 0, 0, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 0, 0, + 0, 247, 247, 251, 0, 374, 248, 0, 0, 0, + 252, 0, 0, 0, 248, 34, 35, 250, 37, 0, + 253, 0, 250, 41, 42, 43, 44, 0, 387, 388, + 389, 390, 249, 211, 0, 0, 0, 250, 250, 0, + 345, 0, 250, 0, 0, 251, 0, 0, 0, 0, + 251, 0, 252, 399, 0, 401, 403, 252, 0, 0, + 0, 0, 253, 0, 0, 251, 251, 253, 0, 0, + 251, 0, 252, 252, 16, 6, 0, 252, 0, 0, + 0, 0, 253, 253, 0, 0, 0, 253, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 438, 250, 0, + -199, -199, 0, -199, 0, 0, 250, -199, 0, 0, + 0, 248, 0, 248, 147, 0, 0, 0, -199, 0, + 0, -199, -211, 0, 307, 308, 251, 309, 310, 0, + 0, 0, 0, 252, 251, 0, 0, 249, 0, 249, + 0, 252, 0, 253, 0, 0, 0, 34, 35, 0, + 37, 253, 248, 0, 248, 248, 0, 0, 0, -199, + -199, 0, 0, 0, 0, 141, 0, 0, 142, 0, + 0, 0, 0, 311, 312, 248, 248, 0, 249, 0, + 345, 249, 0, 0, 0, 0, 0, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 0, 0, + 0, 249, 249, 250, 0, 250, 16, 6, 0, 0, + 0, -192, -192, 0, -192, 0, 0, 0, -192, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -192, + 0, 251, -192, 251, -193, -193, 0, -193, 252, 0, + 252, -193, 0, 0, 250, 0, 250, 250, 253, 0, + 253, 0, -193, 0, 0, -193, 0, 122, 123, 0, + 0, 126, 127, 128, 129, 130, 131, 250, 250, 0, + -192, -192, 251, 0, 251, 251, 0, 0, 0, 252, + 0, 252, 252, 135, 136, 137, 138, 139, 0, 253, + 0, 253, 253, -193, -193, 251, 251, 0, 0, 0, + 0, 0, 252, 252, 0, 0, 192, 272, 0, 0, + 0, 0, 253, 253, 193, 0, 0, 194, 195, 196, + 0, 197, 198, 199, 200, 0, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 34, 35, 0, 37, 0, + 0, 0, 0, 41, 42, 43, 44, 0, 0, 0, + 0, 150, 192, 211, 0, 0, 0, 0, 0, 0, + 193, 212, 213, 194, 195, 196, 0, 197, 198, 199, + 200, 0, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 34, 35, 0, 37, 0, 0, 0, 0, 41, + 42, 43, 44, 0, 16, 6, 0, 150, 300, 211, + 0, 0, 0, 0, 0, 192, 335, 212, 213, 0, + 0, 0, 0, 193, 0, 0, 194, 195, 196, 0, + 197, 198, 199, 200, 0, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 34, 35, 0, 37, 0, 0, + 16, 6, 41, 42, 43, 44, 0, 0, 0, 0, + 150, 192, 211, 0, 0, 0, 0, 0, 0, 193, + 212, 213, 194, 195, 196, 0, 197, 198, 199, 200, + 0, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 34, 35, 0, 37, 33, 0, 0, 0, 41, 42, + 43, 44, 0, 16, 6, 0, 150, 0, 211, 0, + 0, 0, 0, 0, 0, 0, 212, 213, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, + 45, 46, 47, 0, 0, 0, 109, 110, 0, 0, + 49, -194, -194, 0, -194, 0, 0, 0, -194, 16, + 6, 34, 35, 0, 37, 0, 50, 51, 140, -194, + 33, 0, -194, 0, 0, 0, 0, 0, 0, 141, + 0, 0, 142, 52, 0, 0, 53, 16, 6, 29, + 54, 55, 56, 57, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 43, 44, 45, 46, 47, 0, + -194, -194, 48, 0, 0, 0, 49, 0, 290, 0, + 16, 6, 0, 0, -195, -195, 0, -195, 0, 0, + 0, -195, 50, 51, 0, 0, 33, 0, 0, 0, + 0, 0, -195, 0, 0, -195, 0, 0, 0, 52, + 0, 0, 53, 16, 6, 29, 54, 55, 56, 57, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 48, 0, - -197, -197, 49, 0, 0, -198, -198, 0, -198, 0, - 0, 0, -198, 0, 0, 0, 0, 0, 50, 51, - 0, 0, 0, -198, 0, 33, -198, 0, 0, 0, + 0, 0, 49, -195, -195, 0, -196, -196, 0, -196, + 0, 0, 0, -196, 0, 0, 0, 0, 50, 51, + 0, 0, 33, 0, -196, 0, 0, -196, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 53, 16, - 6, 29, 54, 55, 56, 57, 58, 59, 60, 34, - 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 44, 45, 46, 47, -198, -198, 0, 112, 270, 0, - 124, 49, 0, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 0, 0, 0, 0, 50, 51, 0, - 0, 0, 0, 0, 0, 0, 135, 136, 137, 138, - 139, 140, 141, 142, 52, 0, 0, 53, 16, 6, - 29, 54, 55, 56, 57, 58, 59, 60, 195, 0, - 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, - 198, 199, 0, 200, 201, 202, 203, 0, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 34, 35, 0, - 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, - 0, 0, 0, 153, 213, 214, 0, 0, 0, 0, - 0, 195, 275, 215, 216, 0, 0, 0, 0, 196, - 0, 0, 197, 198, 199, 0, 200, 201, 202, 203, - 0, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 34, 35, 0, 37, 0, 0, 16, 6, 41, 42, - 43, 44, 0, 0, 0, 0, 153, 195, 214, 0, - 0, 0, 0, 0, 0, 196, 215, 216, 197, 198, - 199, 0, 200, 201, 202, 203, 0, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 34, 35, 0, 37, - 0, 0, 0, 0, 41, 42, 43, 44, 0, 16, - 6, 0, 153, 303, 214, 0, 0, 0, 0, 0, - 195, 338, 215, 216, 0, 0, 0, 0, 196, 0, - 0, 197, 198, 199, 0, 200, 201, 202, 203, 0, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 34, - 35, 0, 37, 0, 0, 16, 6, 41, 42, 43, - 44, 0, 0, 0, 0, 153, 195, 214, 0, 0, - 0, 0, 0, 0, 196, 215, 216, 197, 198, 199, - 0, 200, 201, 202, 203, 0, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 34, 35, 0, 37, 34, - 35, 0, 37, 41, 42, 43, 44, 0, 16, 6, - 0, 153, 0, 214, 0, 0, 0, 144, 0, 0, - 145, 215, 216, 0, 0, 314, 315, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 0, 165, 0, 0, 16, 6, 166, 0, 16, 6, - 0, 124, 0, 0, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 412, 0, 0, 0, 0, - 413, 0, 0, 0, 0, 124, 0, 0, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 0, 0, + 6, 29, 54, 55, 56, 57, 34, 35, 36, 37, + 38, 39, 40, 0, 41, 42, 43, 44, 45, 46, + 47, 0, 0, 0, 109, -196, -196, 0, 49, 0, + 0, 0, 34, 35, 0, 37, -197, -197, 0, -197, + 0, 0, 0, -197, 50, 51, 0, 0, 0, 0, + 141, 0, 0, 142, -197, 0, 0, -197, 311, 312, + 0, 52, 0, 0, 53, 16, 6, 29, 54, 55, + 56, 57, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, -198, -198, 0, -198, 0, 0, 0, + -198, 16, 6, 162, 0, -197, -197, 0, 163, 0, + 0, -198, 0, 121, -198, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 0, 0, 409, + 0, 0, -198, -198, 410, 0, 0, 0, 0, 121, + 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 411, 0, 0, 0, 0, 412, 0, + 0, 0, 0, 121, 0, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 413, 0, 0, + 0, 0, 414, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 135, 136, 137, 138, 139, 140, 141, 142, 414, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 124, - 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 135, 136, 137, 138, 139, - 140, 141, 142, 416, 0, 0, 0, 0, 417, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 0, 262, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 121, 0, 0, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 263, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 121, 0, 0, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 378, + 0, 132, 133, 134, 135, 136, 137, 138, 139, 121, + 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 380, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 121, 0, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 384, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 266, 0, 135, 136, 137, 138, 139, 140, 141, - 142, 124, 0, 0, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 381, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 124, 0, 0, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, - 0, 135, 136, 137, 138, 139, 140, 141, 142, 124, - 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 387, 0, 135, 136, 137, 138, 139, - 140, 141, 142, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 399, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 0, 396, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 121, 0, 0, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 408, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 121, 0, 0, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 420, + 0, 132, 133, 134, 135, 136, 137, 138, 139, 121, + 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 422, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 121, 0, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 443, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 411, 0, 135, 136, 137, 138, 139, 140, 141, - 142, 124, 0, 0, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 423, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 124, 0, 0, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 425, - 0, 135, 136, 137, 138, 139, 140, 141, 142, 124, - 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 446, 0, 135, 136, 137, 138, 139, - 140, 141, 142, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 268, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 271, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 327, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 330, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 333, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 334, 0, 0, - 0, 0, 124, 0, 0, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 135, 136, - 137, 138, 139, 140, 141, 142, 123, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 265, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 135, 136, 137, 138, 139, 140, 141, - 142, 339, 124, 0, 0, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 135, 136, - 137, 138, 139, 140, 141, 142, 353, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 124, 0, 0, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 0, 0, 0, 0, 0, 135, 136, 137, 138, - 139, 140, 141, 142, 125, 126, 0, 128, 129, 130, - 131, 132, 133, 134, 125, 126, 0, 0, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 0, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 125, 126, 0, 0, 129, - 130, 131, 132, 133, 134, 125, 126, 0, 0, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 136, - 137, 138, 139, 140, 141, 142, 0, 0, 0, 136, - 0, 138, 139, 140, 141, 142, 125, 126, 0, 0, - 129, 130, 131, 132, 133, 134, 125, 126, 0, 0, - 0, 0, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 138, 139, 140, 141, 142, 0, 0, 0, - 0, 0, 138, 139, 140, 141, 142 + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 268, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 324, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 327, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 330, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 331, 0, 0, 0, 0, 121, 0, 0, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 132, 133, 134, 135, 136, 137, 138, 139, + 267, 0, 121, 0, 0, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 132, 133, + 134, 135, 136, 137, 138, 139, 120, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 336, 121, 0, 0, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 132, 133, + 134, 135, 136, 137, 138, 139, 350, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 121, 0, 0, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 0, 0, 0, 0, 0, 132, 133, 134, 135, + 136, 137, 138, 139, 122, 123, 0, 125, 126, 127, + 128, 129, 130, 131, 122, 123, 0, 0, 126, 127, + 128, 129, 130, 131, 0, 0, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 0, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 122, 123, 0, 0, 126, + 127, 128, 129, 130, 131, 122, 123, 0, 0, 126, + 127, 128, 129, 130, 131, 0, 0, 0, 0, 133, + 134, 135, 136, 137, 138, 139, 0, 0, 0, 133, + 0, 135, 136, 137, 138, 139, 122, 123, 0, 0, + 0, 0, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 135, 136, 137, 138, 139 }; const short parser::yycheck_[] = { - 0, 48, 100, 3, 4, 79, 153, 20, 8, 3, - 4, 46, 284, 46, 284, 284, 200, 79, 3, 4, - 5, 6, 7, 150, 46, 25, 22, 0, 46, 50, - 157, 56, 54, 160, 34, 35, 220, 72, 56, 56, - 34, 35, 50, 32, 33, 93, 35, 92, 195, 49, - 39, 91, 92, 200, 32, 33, 52, 35, 88, 89, - 90, 50, 96, 97, 53, 112, 47, 50, 215, 216, - 91, 92, 50, 220, 46, 53, 87, 46, 92, 79, - 54, 153, 93, 91, 92, 79, 97, 98, 99, 100, - 47, 47, 276, 47, 47, 52, 52, 56, 52, 52, - 47, 101, 91, 92, 48, 52, 46, 92, 32, 33, - 47, 35, 50, 91, 92, 52, 40, 41, 42, 43, - 47, 54, 47, 195, 50, 52, 50, 52, 200, 276, - 50, 47, 54, 47, 58, 59, 52, 284, 52, 46, - 52, 47, 51, 215, 216, 145, 52, 274, 220, 46, - 54, 151, 424, 153, 424, 424, 56, 47, 158, 153, - 47, 161, 52, 46, 46, 52, 46, 91, 92, 296, - 297, 32, 33, 46, 35, 46, 46, 55, 252, 40, - 41, 42, 43, 86, 87, 88, 89, 90, 56, 50, - 252, 191, 205, 56, 56, 195, 46, 381, 46, 383, - 200, 195, 329, 50, 276, 332, 200, 56, 46, 19, - 56, 56, 284, 46, 56, 215, 216, 60, 61, 56, - 220, 215, 216, 51, 47, 97, 220, 301, 302, 26, - 91, 92, 46, 55, 381, 55, 383, 46, 422, 301, - 302, 425, 46, 86, 87, 88, 89, 90, 46, 51, - 47, 378, 252, 50, 51, 51, 51, 46, 252, 46, - 46, 445, 446, 56, 56, 56, 46, 394, 46, 396, - 17, 398, 56, 56, 348, 422, 276, 424, 425, 22, - 56, 56, 276, 56, 284, 285, 348, 56, 56, 387, - 284, 47, 47, 47, 47, 56, 56, 56, 445, 446, - 8, 301, 302, 8, 195, 8, 424, 301, 302, 381, - 205, 383, 109, 110, -1, 112, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 153, 144, 348, -1, - 422, -1, 424, 425, 348, -1, -1, 32, 33, 156, - 35, -1, 159, -1, 39, 162, 413, -1, 415, 166, - 417, 168, 153, 445, 446, 50, -1, -1, 53, -1, - -1, 381, -1, 383, -1, -1, 386, 381, 195, 383, - -1, -1, -1, 200, -1, -1, -1, -1, -1, 196, - -1, -1, -1, -1, -1, -1, -1, -1, 215, 216, - -1, -1, 209, 220, 195, -1, 91, 92, 153, 200, - -1, -1, 422, -1, 424, 425, -1, -1, 422, -1, - 424, 425, -1, -1, 215, 216, -1, -1, -1, 220, - 32, 33, -1, 35, -1, 445, 446, 39, -1, 153, - -1, 445, 446, -1, 46, -1, -1, -1, 50, -1, - 195, 53, 54, -1, -1, 200, -1, -1, 153, 276, - -1, -1, -1, 270, -1, -1, -1, 284, -1, -1, - 215, 216, -1, -1, 281, 220, 283, -1, -1, 286, - -1, 195, -1, -1, -1, 276, 200, -1, -1, 91, - 92, 298, -1, 284, 153, -1, -1, -1, -1, -1, - 195, 215, 216, -1, -1, 200, 220, -1, -1, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 215, 216, -1, -1, -1, 220, -1, 334, -1, -1, - -1, 276, -1, -1, -1, -1, 195, 32, 33, 284, - 35, 200, 32, 33, 39, 35, -1, -1, -1, 39, - 357, 358, 359, 360, -1, 50, 215, 216, 53, -1, - 50, 220, 276, 53, 381, -1, 383, -1, -1, -1, - 284, -1, -1, -1, -1, 382, -1, 384, 385, -1, - -1, 276, -1, -1, -1, -1, -1, -1, -1, 284, - 381, -1, 383, -1, -1, 153, 91, 92, -1, -1, - -1, 91, 92, -1, -1, 422, -1, 424, 425, -1, - -1, -1, -1, -1, -1, -1, -1, 276, -1, 426, - -1, -1, -1, 32, 33, 284, 35, -1, 445, 446, - 39, 422, -1, 424, 425, -1, 381, 195, 383, -1, - -1, 50, 200, -1, 53, 32, 33, -1, 35, -1, - -1, -1, 39, -1, 445, 446, -1, 215, 216, -1, - -1, -1, 220, 50, -1, -1, 53, 381, -1, 383, - -1, 9, 10, -1, 12, 13, -1, 422, -1, 424, - 425, -1, 91, 92, -1, -1, 381, -1, 383, -1, - -1, -1, -1, -1, 32, 33, -1, 35, -1, -1, - 445, 446, -1, -1, 91, 92, -1, -1, 422, -1, - 424, 425, 50, -1, -1, 53, -1, -1, 276, -1, - 58, 59, 381, -1, 383, -1, 284, 422, -1, 424, - 425, 445, 446, -1, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, -1, -1, 8, -1, -1, - 445, 446, -1, 91, 92, -1, -1, -1, -1, -1, - -1, -1, -1, 422, -1, 424, 425, -1, -1, -1, - -1, 32, 33, 34, 35, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, 46, 445, 446, -1, 50, - 51, -1, -1, 54, -1, -1, -1, 32, 33, -1, - 35, -1, -1, -1, 39, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, 50, -1, 8, 53, -1, - -1, -1, -1, 381, -1, 383, 87, -1, -1, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - -1, 32, 33, 34, 35, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, 46, 91, 92, -1, 50, - -1, -1, -1, 54, 422, 56, 424, 425, -1, -1, - -1, 32, 33, -1, 35, -1, -1, -1, 39, 70, - 71, -1, -1, -1, -1, -1, 8, 445, 446, 50, - -1, -1, 53, -1, -1, -1, 87, -1, -1, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 0, 48, 97, 3, 4, 76, 281, 20, 8, 3, + 4, 76, 281, 197, 281, 50, 46, 50, 60, 61, + 22, 32, 33, 46, 35, 25, 3, 4, 5, 6, + 7, 54, 47, 217, 34, 35, 93, 52, 46, 50, + 34, 35, 53, 46, 86, 87, 88, 89, 90, 49, + 52, 91, 92, 56, 0, 56, 91, 92, 91, 92, + 32, 33, 109, 35, 72, 96, 97, 87, 40, 41, + 42, 43, 56, 93, 47, 92, 76, 97, 50, 52, + 91, 92, 76, 47, 3, 47, 58, 59, 52, 273, + 52, 47, 11, 50, 46, 14, 15, 16, 98, 18, + 19, 20, 21, 46, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 92, 35, 92, 54, 91, + 92, 40, 41, 42, 43, 56, 48, 47, 46, 48, + 49, 50, 52, 88, 89, 90, 47, 50, 150, 58, + 59, 52, 142, 50, 150, 54, 421, 46, 148, 54, + 150, 52, 421, 50, 421, 155, 150, 47, 158, 47, + 147, 47, 52, 47, 52, 46, 52, 154, 52, 47, + 157, 47, 91, 92, 52, 54, 52, 47, 249, 51, + 192, 46, 52, 56, 249, 197, 192, 46, 188, 202, + 46, 197, 192, 46, 378, 46, 380, 197, 192, 46, + 212, 213, 56, 197, 56, 217, 212, 213, 56, 55, + 50, 217, 212, 213, 46, 46, 19, 217, 212, 213, + 26, 56, 56, 217, 46, 46, 56, 298, 299, 150, + 56, 56, 51, 298, 299, 419, 47, 97, 422, 55, + 55, 47, 46, 51, 50, 51, 46, 46, 46, 249, + 86, 87, 88, 89, 90, 249, 51, 51, 442, 443, + 46, 273, 46, 56, 56, 46, 46, 273, 46, 281, + 22, 192, 17, 273, 345, 281, 197, 56, 47, 273, + 345, 281, 282, 56, 271, 56, 56, 281, 56, 384, + 56, 212, 213, 56, 56, 56, 217, 47, 298, 299, + 106, 107, 56, 109, 298, 299, 293, 294, 47, 47, + 56, 8, 8, 421, 8, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 192, 141, 202, 32, 33, 326, + 35, -1, 329, -1, 39, 345, -1, 153, -1, -1, + 156, 345, 273, 159, -1, 50, -1, 163, 53, 165, + 281, -1, -1, 410, -1, 412, 378, 414, 380, -1, + -1, -1, 378, -1, 380, -1, -1, -1, 378, -1, + 380, -1, -1, 383, 378, -1, 380, 193, 375, -1, + -1, -1, -1, -1, -1, -1, 91, 92, -1, -1, + 206, -1, -1, 150, 391, -1, 393, 419, 395, 421, + 422, -1, -1, 419, -1, 421, 422, -1, -1, 419, + -1, 421, 422, -1, -1, 419, -1, 421, 422, 150, + 442, 443, -1, -1, -1, -1, 442, 443, -1, -1, + -1, -1, 442, 443, -1, 192, -1, -1, 442, 443, + 197, -1, -1, -1, -1, -1, -1, 378, -1, 380, + -1, 267, -1, -1, -1, 212, 213, -1, -1, -1, + 217, 192, 278, -1, 280, -1, 197, 283, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 295, + -1, 212, 213, -1, -1, 150, 217, -1, 419, -1, + 421, 422, -1, -1, -1, -1, -1, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, -1, -1, + -1, 442, 443, 150, -1, 331, 273, -1, -1, -1, + 150, -1, -1, -1, 281, 32, 33, 192, 35, -1, + 150, -1, 197, 40, 41, 42, 43, -1, 354, 355, + 356, 357, 273, 50, -1, -1, -1, 212, 213, -1, + 281, -1, 217, -1, -1, 192, -1, -1, -1, -1, + 197, -1, 192, 379, -1, 381, 382, 197, -1, -1, + -1, -1, 192, -1, -1, 212, 213, 197, -1, -1, + 217, -1, 212, 213, 91, 92, -1, 217, -1, -1, + -1, -1, 212, 213, -1, -1, -1, 217, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 423, 273, -1, + 32, 33, -1, 35, -1, -1, 281, 39, -1, -1, + -1, 378, -1, 380, 46, -1, -1, -1, 50, -1, + -1, 53, 54, -1, 9, 10, 273, 12, 13, -1, + -1, -1, -1, 273, 281, -1, -1, 378, -1, 380, + -1, 281, -1, 273, -1, -1, -1, 32, 33, -1, + 35, 281, 419, -1, 421, 422, -1, -1, -1, 91, + 92, -1, -1, -1, -1, 50, -1, -1, 53, -1, + -1, -1, -1, 58, 59, 442, 443, -1, 419, -1, + 421, 422, -1, -1, -1, -1, -1, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, + -1, 442, 443, 378, -1, 380, 91, 92, -1, -1, + -1, 32, 33, -1, 35, -1, -1, -1, 39, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, + -1, 378, 53, 380, 32, 33, -1, 35, 378, -1, + 380, 39, -1, -1, 419, -1, 421, 422, 378, -1, + 380, -1, 50, -1, -1, 53, -1, 60, 61, -1, + -1, 64, 65, 66, 67, 68, 69, 442, 443, -1, + 91, 92, 419, -1, 421, 422, -1, -1, -1, 419, + -1, 421, 422, 86, 87, 88, 89, 90, -1, 419, + -1, 421, 422, 91, 92, 442, 443, -1, -1, -1, + -1, -1, 442, 443, -1, -1, 3, 4, -1, -1, + -1, -1, 442, 443, 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, -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, 91, 92, -1, 48, 49, 50, + -1, -1, -1, -1, -1, 3, 4, 58, 59, -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, + 91, 92, 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, 91, 92, -1, 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, 91, + 92, 32, 33, -1, 35, -1, 70, 71, 39, 50, + 8, -1, 53, -1, -1, -1, -1, -1, -1, 50, + -1, -1, 53, 87, -1, -1, 90, 91, 92, 93, + 94, 95, 96, 97, 32, 33, 34, 35, 36, 37, + 38, -1, 40, 41, 42, 43, 44, 45, 46, -1, + 91, 92, 50, -1, -1, -1, 54, -1, 56, -1, + 91, 92, -1, -1, 32, 33, -1, 35, -1, -1, + -1, 39, 70, 71, -1, -1, 8, -1, -1, -1, + -1, -1, 50, -1, -1, 53, -1, -1, -1, 87, + -1, -1, 90, 91, 92, 93, 94, 95, 96, 97, 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, 46, -1, -1, -1, 50, -1, - 91, 92, 54, -1, -1, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, 70, 71, - -1, -1, -1, 50, -1, 8, 53, -1, -1, -1, + -1, -1, 54, 91, 92, -1, 32, 33, -1, 35, + -1, -1, -1, 39, -1, -1, -1, -1, 70, 71, + -1, -1, 8, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, 87, -1, -1, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 32, - 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, - 43, 44, 45, 46, 91, 92, -1, 50, 55, -1, - 57, 54, -1, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, -1, -1, -1, -1, 70, 71, -1, - -1, -1, -1, -1, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 87, -1, -1, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 3, -1, - -1, -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, -1, -1, 40, 41, 42, 43, -1, - -1, -1, -1, 48, 49, 50, -1, -1, -1, -1, - -1, 3, 4, 58, 59, -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, 91, 92, 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, 91, - 92, -1, 48, 49, 50, -1, -1, -1, -1, -1, - 3, 4, 58, 59, -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, 91, 92, 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, 32, - 33, -1, 35, 40, 41, 42, 43, -1, 91, 92, - -1, 48, -1, 50, -1, -1, -1, 50, -1, -1, - 53, 58, 59, -1, -1, 58, 59, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - -1, 47, -1, -1, 91, 92, 52, -1, 91, 92, - -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, + 92, 93, 94, 95, 96, 97, 32, 33, 34, 35, + 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, + 46, -1, -1, -1, 50, 91, 92, -1, 54, -1, + -1, -1, 32, 33, -1, 35, 32, 33, -1, 35, + -1, -1, -1, 39, 70, 71, -1, -1, -1, -1, + 50, -1, -1, 53, 50, -1, -1, 53, 58, 59, + -1, 87, -1, -1, 90, 91, 92, 93, 94, 95, + 96, 97, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 32, 33, -1, 35, -1, -1, -1, + 39, 91, 92, 47, -1, 91, 92, -1, 52, -1, + -1, 50, -1, 57, 53, -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, -1, -1, 47, + -1, -1, 91, 92, 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, 47, -1, 83, - 84, 85, 86, 87, 88, 89, 90, 57, -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, 47, -1, 83, 84, 85, 86, 87, 88, 89, @@ -4415,29 +4373,36 @@ namespace xsk { namespace gsc { namespace iw8 { -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, -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, -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, -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, -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, -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, -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, + -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, -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, -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, -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, -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, -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, -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, -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, @@ -4461,89 +4426,87 @@ namespace xsk { namespace gsc { namespace iw8 { 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, - 64, 65, 66, 67, 68, 69, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, -1, -1, -1, -1, - -1, -1, 86, 87, 88, 89, 90, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, 90 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 92, 111, 112, 113, - 114, 115, 116, 117, 118, 183, 91, 183, 184, 184, - 46, 0, 113, 114, 115, 46, 72, 56, 56, 93, - 186, 163, 183, 8, 32, 33, 34, 35, 36, 37, + 0, 3, 4, 5, 6, 7, 92, 108, 109, 110, + 111, 112, 113, 114, 115, 180, 91, 180, 181, 181, + 46, 0, 110, 111, 112, 46, 72, 56, 56, 93, + 183, 160, 180, 8, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 50, 54, - 70, 71, 87, 90, 94, 95, 96, 97, 98, 99, - 100, 148, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 166, 167, 168, 169, 170, 171, 172, 173, + 70, 71, 87, 90, 94, 95, 96, 97, 145, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 163, + 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, 191, 192, 47, - 47, 52, 50, 183, 184, 50, 183, 184, 50, 46, - 46, 148, 50, 51, 148, 164, 165, 183, 148, 148, - 96, 97, 92, 56, 57, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 83, 84, 85, 86, 87, - 88, 89, 90, 39, 50, 53, 160, 161, 183, 184, - 46, 54, 56, 48, 121, 183, 50, 46, 54, 50, - 46, 54, 50, 148, 148, 47, 52, 148, 52, 51, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 183, 54, 164, 165, 183, 3, 11, 14, 15, 16, - 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 49, 50, 58, 59, 119, 120, 121, - 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 184, 185, 186, 187, 188, 189, 47, 47, 52, 50, + 180, 181, 50, 180, 181, 50, 46, 46, 145, 50, + 51, 145, 161, 162, 180, 145, 145, 96, 97, 92, + 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 83, 84, 85, 86, 87, 88, 89, 90, + 39, 50, 53, 157, 158, 180, 181, 46, 54, 56, + 48, 118, 180, 50, 46, 54, 50, 46, 54, 50, + 145, 145, 47, 52, 145, 52, 51, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 180, 54, 161, + 162, 180, 3, 11, 14, 15, 16, 18, 19, 20, + 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 49, 50, 58, 59, 116, 117, 118, 119, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 150, 151, 152, 158, 159, - 169, 170, 173, 177, 178, 179, 180, 183, 148, 164, - 183, 148, 164, 183, 148, 47, 47, 148, 51, 148, - 55, 51, 183, 47, 46, 4, 122, 148, 56, 46, - 56, 46, 119, 46, 46, 46, 46, 87, 186, 190, - 55, 56, 56, 56, 148, 56, 46, 46, 50, 158, - 159, 173, 173, 49, 119, 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, 148, 164, 4, 56, - 47, 148, 19, 148, 123, 150, 151, 152, 173, 183, - 148, 55, 55, 56, 164, 164, 148, 46, 46, 46, - 46, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 51, 164, 51, 164, 51, 148, 46, 47, - 56, 47, 46, 47, 56, 22, 52, 47, 47, 47, - 148, 148, 148, 148, 46, 47, 46, 47, 46, 47, - 164, 119, 148, 119, 148, 149, 148, 183, 121, 56, - 56, 47, 47, 52, 47, 52, 47, 52, 164, 164, - 164, 47, 17, 47, 56, 47, 22, 56, 56, 165, - 56, 165, 56, 165, 47, 47, 47, 119, 56, 123, - 119, 148, 47, 47, 47, 47, 47, 56, 56, 56, - 119, 119 + 143, 144, 147, 148, 149, 155, 156, 166, 167, 170, + 174, 175, 176, 177, 180, 145, 161, 180, 145, 161, + 180, 145, 47, 47, 145, 51, 145, 55, 51, 180, + 47, 46, 4, 119, 145, 56, 46, 56, 46, 116, + 46, 46, 46, 46, 87, 183, 187, 55, 56, 56, + 56, 145, 56, 46, 46, 50, 155, 156, 170, 170, + 49, 116, 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, 145, 161, 4, 56, 47, 145, 19, + 145, 120, 147, 148, 149, 170, 180, 145, 55, 55, + 56, 161, 161, 145, 46, 46, 46, 46, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 51, + 161, 51, 161, 51, 145, 46, 47, 56, 47, 46, + 47, 56, 22, 52, 47, 47, 47, 145, 145, 145, + 145, 46, 47, 46, 47, 46, 47, 161, 116, 145, + 116, 145, 146, 145, 180, 118, 56, 56, 47, 47, + 52, 47, 52, 47, 52, 161, 161, 161, 47, 17, + 47, 56, 47, 22, 56, 56, 162, 56, 162, 56, + 162, 47, 47, 47, 116, 56, 120, 116, 145, 47, + 47, 47, 47, 47, 56, 56, 56, 116, 116 }; const unsigned char parser::yyr1_[] = { - 0, 110, 111, 111, 112, 112, 112, 112, 112, 112, - 113, 114, 115, 115, 115, 115, 115, 116, 117, 118, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 120, 120, 121, 121, - 122, 122, 123, 123, 123, 123, 124, 124, 125, 125, - 125, 126, 127, 127, 128, 129, 129, 130, 130, 131, - 132, 132, 133, 134, 135, 136, 137, 138, 138, 139, - 140, 140, 141, 142, 143, 144, 144, 145, 146, 147, - 148, 148, 148, 149, 149, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 151, 151, 152, 152, - 153, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 154, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, - 157, 158, 158, 159, 159, 160, 160, 160, 160, 160, - 160, 161, 161, 161, 161, 162, 163, 163, 163, 164, - 164, 165, 165, 166, 167, 168, 168, 169, 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, - 190, 190, 190, 191, 192 + 0, 107, 108, 108, 109, 109, 109, 109, 109, 109, + 110, 111, 112, 112, 112, 112, 112, 113, 114, 115, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 117, 117, 118, 118, + 119, 119, 120, 120, 120, 120, 121, 121, 122, 122, + 122, 123, 124, 124, 125, 126, 126, 127, 127, 128, + 129, 129, 130, 131, 132, 133, 134, 135, 135, 136, + 137, 137, 138, 139, 140, 141, 141, 142, 143, 144, + 145, 145, 145, 146, 146, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 148, 148, 149, 149, + 150, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, + 154, 155, 155, 156, 156, 157, 157, 157, 157, 157, + 157, 158, 158, 158, 158, 159, 160, 160, 160, 161, + 161, 162, 162, 163, 164, 165, 165, 166, 167, 168, + 169, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 181, 182, 183, 184, 185, 186, 186, 187, 187, + 188, 189 }; const signed char @@ -4571,7 +4534,7 @@ namespace xsk { namespace gsc { namespace iw8 { 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, 1, - 1, 1, 1, 1, 1 + 1, 1 }; @@ -4581,29 +4544,29 @@ namespace xsk { namespace gsc { namespace iw8 { const short parser::yyrline_[] = { - 0, 258, 258, 259, 263, 265, 267, 269, 271, 273, - 278, 282, 287, 288, 289, 290, 291, 295, 300, 305, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 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, 734, - 739, 744, 745, 746, 747, 748, 749, 750, 751, 752, - 756, 761, 766, 771, 776, 781, 786, 791, 796, 801, - 806, 808, 813, 818, 823, 828, 833, 835, 840, 842, - 844, 846, 848, 853, 858 + 0, 255, 255, 256, 260, 262, 264, 266, 268, 270, + 275, 279, 284, 285, 286, 287, 288, 292, 297, 302, + 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, 332, 336, 337, 341, 342, + 346, 348, 353, 355, 357, 360, 364, 366, 371, 373, + 375, 380, 385, 387, 392, 397, 399, 404, 406, 411, + 416, 418, 423, 428, 433, 438, 443, 448, 450, 455, + 460, 462, 467, 472, 477, 482, 484, 489, 494, 499, + 504, 505, 506, 510, 511, 515, 517, 519, 521, 523, + 525, 527, 529, 531, 533, 535, 540, 542, 547, 549, + 554, 559, 561, 563, 565, 567, 569, 571, 573, 575, + 577, 579, 581, 583, 585, 587, 589, 591, 593, 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, 625, 626, 627, 631, + 636, 641, 642, 645, 646, 650, 652, 654, 656, 658, + 660, 665, 667, 669, 671, 676, 681, 683, 686, 690, + 693, 697, 699, 704, 709, 714, 716, 721, 726, 731, + 736, 741, 742, 743, 744, 745, 746, 747, 748, 749, + 753, 758, 763, 768, 773, 778, 783, 788, 793, 798, + 803, 805, 810, 815, 820, 825, 830, 832, 837, 839, + 844, 849 }; void @@ -4636,9 +4599,9 @@ namespace xsk { namespace gsc { namespace iw8 { #line 13 "parser.ypp" } } } // xsk::gsc::iw8 -#line 4640 "parser.cpp" +#line 4603 "parser.cpp" -#line 862 "parser.ypp" +#line 853 "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 04a93ed..22c2d86 100644 --- a/src/iw8/xsk/parser.hpp +++ b/src/iw8/xsk/parser.hpp @@ -630,10 +630,7 @@ namespace xsk { namespace gsc { namespace iw8 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy69[sizeof (std::string)]; }; @@ -780,19 +777,16 @@ namespace xsk { namespace gsc { namespace iw8 { ISTRING = 94, // "localized string" COLOR = 95, // "color" FLOAT = 96, // "float" - INT_DEC = 97, // "int" - INT_OCT = 98, // "octal int" - INT_BIN = 99, // "binary int" - INT_HEX = 100, // "hexadecimal int" - ADD_ARRAY = 101, // ADD_ARRAY - THEN = 102, // THEN - TERN = 103, // TERN - NEG = 104, // NEG - ANIMREF = 105, // ANIMREF - PREINC = 106, // PREINC - PREDEC = 107, // PREDEC - POSTINC = 108, // POSTINC - POSTDEC = 109 // POSTDEC + INTEGER = 97, // "integer" + ADD_ARRAY = 98, // ADD_ARRAY + THEN = 99, // THEN + TERN = 100, // TERN + NEG = 101, // NEG + ANIMREF = 102, // ANIMREF + PREINC = 103, // PREINC + PREDEC = 104, // PREDEC + POSTINC = 105, // POSTINC + POSTDEC = 106 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -809,7 +803,7 @@ namespace xsk { namespace gsc { namespace iw8 { { enum symbol_kind_type { - YYNTOKENS = 110, ///< Number of tokens. + YYNTOKENS = 107, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -908,102 +902,99 @@ namespace xsk { namespace gsc { namespace iw8 { S_ISTRING = 94, // "localized string" S_COLOR = 95, // "color" S_FLOAT = 96, // "float" - S_INT_DEC = 97, // "int" - S_INT_OCT = 98, // "octal int" - S_INT_BIN = 99, // "binary int" - S_INT_HEX = 100, // "hexadecimal int" - S_ADD_ARRAY = 101, // ADD_ARRAY - S_THEN = 102, // THEN - S_TERN = 103, // TERN - S_NEG = 104, // NEG - S_ANIMREF = 105, // ANIMREF - S_PREINC = 106, // PREINC - S_PREDEC = 107, // PREDEC - S_POSTINC = 108, // POSTINC - S_POSTDEC = 109, // POSTDEC - S_YYACCEPT = 110, // $accept - S_root = 111, // root - S_program = 112, // program - S_inline = 113, // inline - S_include = 114, // include - S_declaration = 115, // declaration - S_decl_usingtree = 116, // decl_usingtree - S_decl_constant = 117, // decl_constant - S_decl_thread = 118, // decl_thread - S_stmt = 119, // stmt - S_stmt_dev = 120, // stmt_dev - S_stmt_block = 121, // stmt_block - S_stmt_list = 122, // stmt_list - S_stmt_expr = 123, // stmt_expr - S_stmt_call = 124, // stmt_call - S_stmt_assign = 125, // stmt_assign - S_stmt_endon = 126, // stmt_endon - S_stmt_notify = 127, // stmt_notify - S_stmt_wait = 128, // stmt_wait - S_stmt_waittill = 129, // stmt_waittill - S_stmt_waittillmatch = 130, // stmt_waittillmatch - S_stmt_waittillframeend = 131, // stmt_waittillframeend - S_stmt_waitframe = 132, // stmt_waitframe - S_stmt_if = 133, // stmt_if - S_stmt_ifelse = 134, // stmt_ifelse - S_stmt_while = 135, // stmt_while - S_stmt_dowhile = 136, // stmt_dowhile - S_stmt_for = 137, // stmt_for - S_stmt_foreach = 138, // stmt_foreach - S_stmt_switch = 139, // stmt_switch - S_stmt_case = 140, // stmt_case - S_stmt_default = 141, // stmt_default - S_stmt_break = 142, // stmt_break - S_stmt_continue = 143, // stmt_continue - S_stmt_return = 144, // stmt_return - S_stmt_breakpoint = 145, // stmt_breakpoint - S_stmt_prof_begin = 146, // stmt_prof_begin - S_stmt_prof_end = 147, // stmt_prof_end - S_expr = 148, // expr - S_expr_or_empty = 149, // expr_or_empty - S_expr_assign = 150, // expr_assign - S_expr_increment = 151, // expr_increment - S_expr_decrement = 152, // expr_decrement - S_expr_ternary = 153, // expr_ternary - S_expr_binary = 154, // expr_binary - S_expr_primitive = 155, // expr_primitive - S_expr_complement = 156, // expr_complement - S_expr_not = 157, // expr_not - S_expr_call = 158, // expr_call - S_expr_method = 159, // expr_method - S_expr_function = 160, // expr_function - S_expr_pointer = 161, // expr_pointer - S_expr_add_array = 162, // expr_add_array - S_expr_parameters = 163, // expr_parameters - S_expr_arguments = 164, // expr_arguments - S_expr_arguments_no_empty = 165, // expr_arguments_no_empty - S_expr_isdefined = 166, // expr_isdefined - S_expr_istrue = 167, // expr_istrue - 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 + S_INTEGER = 97, // "integer" + S_ADD_ARRAY = 98, // ADD_ARRAY + S_THEN = 99, // THEN + S_TERN = 100, // TERN + S_NEG = 101, // NEG + S_ANIMREF = 102, // ANIMREF + S_PREINC = 103, // PREINC + S_PREDEC = 104, // PREDEC + S_POSTINC = 105, // POSTINC + S_POSTDEC = 106, // POSTDEC + S_YYACCEPT = 107, // $accept + S_root = 108, // root + S_program = 109, // program + S_inline = 110, // inline + S_include = 111, // include + S_declaration = 112, // declaration + S_decl_usingtree = 113, // decl_usingtree + S_decl_constant = 114, // decl_constant + S_decl_thread = 115, // decl_thread + S_stmt = 116, // stmt + S_stmt_dev = 117, // stmt_dev + S_stmt_block = 118, // stmt_block + S_stmt_list = 119, // stmt_list + S_stmt_expr = 120, // stmt_expr + S_stmt_call = 121, // stmt_call + S_stmt_assign = 122, // stmt_assign + S_stmt_endon = 123, // stmt_endon + S_stmt_notify = 124, // stmt_notify + S_stmt_wait = 125, // stmt_wait + S_stmt_waittill = 126, // stmt_waittill + S_stmt_waittillmatch = 127, // stmt_waittillmatch + S_stmt_waittillframeend = 128, // stmt_waittillframeend + S_stmt_waitframe = 129, // stmt_waitframe + S_stmt_if = 130, // stmt_if + S_stmt_ifelse = 131, // stmt_ifelse + S_stmt_while = 132, // stmt_while + S_stmt_dowhile = 133, // stmt_dowhile + S_stmt_for = 134, // stmt_for + S_stmt_foreach = 135, // stmt_foreach + S_stmt_switch = 136, // stmt_switch + S_stmt_case = 137, // stmt_case + S_stmt_default = 138, // stmt_default + S_stmt_break = 139, // stmt_break + S_stmt_continue = 140, // stmt_continue + S_stmt_return = 141, // stmt_return + S_stmt_breakpoint = 142, // stmt_breakpoint + S_stmt_prof_begin = 143, // stmt_prof_begin + S_stmt_prof_end = 144, // stmt_prof_end + S_expr = 145, // expr + S_expr_or_empty = 146, // expr_or_empty + S_expr_assign = 147, // expr_assign + S_expr_increment = 148, // expr_increment + S_expr_decrement = 149, // expr_decrement + S_expr_ternary = 150, // expr_ternary + S_expr_binary = 151, // expr_binary + S_expr_primitive = 152, // expr_primitive + S_expr_complement = 153, // expr_complement + S_expr_not = 154, // expr_not + S_expr_call = 155, // expr_call + S_expr_method = 156, // expr_method + S_expr_function = 157, // expr_function + S_expr_pointer = 158, // expr_pointer + S_expr_add_array = 159, // expr_add_array + S_expr_parameters = 160, // expr_parameters + S_expr_arguments = 161, // expr_arguments + S_expr_arguments_no_empty = 162, // expr_arguments_no_empty + S_expr_isdefined = 163, // expr_isdefined + S_expr_istrue = 164, // expr_istrue + S_expr_reference = 165, // expr_reference + S_expr_array = 166, // expr_array + S_expr_field = 167, // expr_field + S_expr_size = 168, // expr_size + S_expr_paren = 169, // expr_paren + S_expr_object = 170, // expr_object + S_expr_thisthread = 171, // expr_thisthread + S_expr_empty_array = 172, // expr_empty_array + S_expr_undefined = 173, // expr_undefined + S_expr_game = 174, // expr_game + S_expr_self = 175, // expr_self + S_expr_anim = 176, // expr_anim + S_expr_level = 177, // expr_level + S_expr_animation = 178, // expr_animation + S_expr_animtree = 179, // expr_animtree + S_expr_identifier = 180, // expr_identifier + S_expr_path = 181, // expr_path + S_expr_istring = 182, // expr_istring + S_expr_string = 183, // expr_string + S_expr_color = 184, // expr_color + S_expr_vector = 185, // expr_vector + S_expr_float = 186, // expr_float + S_expr_integer = 187, // expr_integer + S_expr_false = 188, // expr_false + S_expr_true = 189 // expr_true }; }; @@ -1330,10 +1321,7 @@ namespace xsk { namespace gsc { namespace iw8 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2638,10 +2626,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2751,7 +2736,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - IW8_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + IW8_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4259,61 +4244,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -5114,10 +5054,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5440,10 +5377,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5510,7 +5444,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::iw8 -#line 5514 "parser.hpp" +#line 5448 "parser.hpp" diff --git a/src/iw8/xsk/resolver.cpp b/src/iw8/xsk/resolver.cpp index 6617b2b..3603b1a 100644 --- a/src/iw8/xsk/resolver.cpp +++ b/src/iw8/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::iw8 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint32_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +125,19 @@ auto resolver::file_name(std::uint32_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint32_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +154,16 @@ auto resolver::token_name(std::uint32_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -164,201 +188,219 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 190> opcode_list {{ - { std::uint8_t(opcode::OP_CastFieldObject), "CAST_FIELD_OBJECT" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached), "SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_plus), "PLUS" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables), "REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef), "EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall), "SCRIPT_FAR_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetGameRef), "GET_GAME_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable), "EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef), "EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_GetThisthread), "GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_greater), "GREATER" }, - { std::uint8_t(opcode::OP_waittillmatch), "WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_shift_right), "SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_dec), "DECREMENT" }, - { std::uint8_t(opcode::OP_JumpOnTrue), "JUMP_ON_TRUE" }, - { std::uint8_t(opcode::OP_bit_or), "BIT_OR" }, - { std::uint8_t(opcode::OP_equality), "EQUALITY" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0), "CLEAR_LOCAL_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_notify), "NOTIFY" }, - { std::uint8_t(opcode::OP_GetVector), "GET_VECTOR" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer), "SCRIPT_METHOD_CHILD_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_PreScriptCall), "PRE_SCRIPT_CALL" }, - { std::uint8_t(opcode::OP_GetByte), "GET_BYTE" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall), "SCRIPT_FAR_THREAD_CALL" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField), "SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr), "JUMP_ON_FALSE_EXPR" }, - { std::uint8_t(opcode::OP_GetUndefined), "GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_jumpback), "JUMP_BACK" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr), "JUMP_ON_TRUE_EXPR" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0), "SET_LOCAL_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_ClearFieldVariable), "CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_GetLevel), "GET_LEVEL" }, - { std::uint8_t(opcode::OP_size), "SIZE" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached), "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall), "SCRIPT_LOCAL_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_AddArray), "ADD_ARRAY" }, - { std::uint8_t(opcode::OP_endon), "ENDON" }, - { std::uint8_t(opcode::OP_EvalFieldVariable), "EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_shift_left), "SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0), "EVAL_LOCAL_ARRAY_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_Return), "RETURN" }, - { std::uint8_t(opcode::OP_CreateLocalVariable), "CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0), "SAFE_SET_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction), "GET_BUILTIN_FUNCTION" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall), "SCRIPT_LOCAL_METHOD_CALL" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer), "CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall), "SCRIPT_LOCAL_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetSelfObject), "GET_SELF_OBJECT" }, - { std::uint8_t(opcode::OP_GetGame), "GET_GAME" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField), "SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_EvalArray), "EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_GetSelf), "GET_SELF" }, - { std::uint8_t(opcode::OP_End), "END" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable), "EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_less_equal), "LESS_EQUAL" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0), "EVAL_LOCAL_VARIABLE_CACHED_0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1), "EVAL_LOCAL_VARIABLE_CACHED_1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2), "EVAL_LOCAL_VARIABLE_CACHED_2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3), "EVAL_LOCAL_VARIABLE_CACHED_3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4), "EVAL_LOCAL_VARIABLE_CACHED_4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5), "EVAL_LOCAL_VARIABLE_CACHED_5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached), "EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0), "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer), "SCRIPT_CHILD_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached), "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall), "SCRIPT_LOCAL_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetInteger), "GET_INTEGER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer), "SCRIPT_METHOD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_checkclearparams), "CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField), "SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_waittillmatch2), "WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_minus), "MINUS" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2), "SCRIPT_LOCAL_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort), "GET_NEG_USHORT" }, - { std::uint8_t(opcode::OP_GetNegByte), "GET_NEG_BYTE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached), "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_greater_equal), "GREATER_EQUAL" }, - { std::uint8_t(opcode::OP_vector), "VECTOR" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod), "GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_endswitch), "END_SWITCH" }, - { std::uint8_t(opcode::OP_ClearArray), "CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_DecTop), "DECREMENT_TOP" }, - { std::uint8_t(opcode::OP_CastBool), "CAST_BOOL" }, - { std::uint8_t(opcode::OP_EvalArrayRef), "EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0), "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_GetZero), "GET_ZERO" }, - { std::uint8_t(opcode::OP_wait), "WAIT" }, - { std::uint8_t(opcode::OP_waittill), "WAITTILL" }, - { std::uint8_t(opcode::OP_GetIString), "GET_ISTRING" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall), "SCRIPT_FAR_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_GetAnimObject), "GET_ANIM_OBJECT" }, - { std::uint8_t(opcode::OP_GetAnimTree), "GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached), "EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_mod), "MOD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall), "SCRIPT_FAR_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetUnsignedShort), "GET_USHORT" }, - { std::uint8_t(opcode::OP_clearparams), "CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer), "SCRIPT_METHOD_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer), "SCRIPT_FUNCTION_CALL_POINTER" }, - { std::uint8_t(opcode::OP_EmptyArray), "EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached), "SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearVariableField), "CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef), "EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall), "SCRIPT_LOCAL_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0), "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_GetFloat), "GET_FLOAT" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached), "EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_JumpOnFalse), "JUMP_ON_FALSE" }, - { std::uint8_t(opcode::OP_BoolComplement), "BOOL_COMPLEMENT" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer), "SCRIPT_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2), "SCRIPT_FAR_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_less), "LESS" }, - { std::uint8_t(opcode::OP_BoolNot), "BOOL_NOT" }, - { std::uint8_t(opcode::OP_waittillFrameEnd), "WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_waitframe), "WAITFRAME" }, - { std::uint8_t(opcode::OP_GetString), "GET_STRING" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable), "EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_GetLevelObject), "GET_LEVEL_OBJECT" }, - { std::uint8_t(opcode::OP_inc), "INCREMENT" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetAnim), "GET_ANIM" }, - { std::uint8_t(opcode::OP_switch), "SWITCH" }, - { std::uint8_t(opcode::OP_SetVariableField), "SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_divide), "DIV" }, - { std::uint8_t(opcode::OP_GetLocalFunction), "GET_LOCAL_FUNCTION" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall), "SCRIPT_FAR_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_multiply), "MUL" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached), "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef), "EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached), "EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0), "EVAL_LOCAL_VARIABLE_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_bit_and), "BIT_AND" }, - { std::uint8_t(opcode::OP_GetAnimation), "GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetFarFunction), "GET_FAR_FUNCTION" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer), "CALL_BUILTIN_POINTER" }, - { std::uint8_t(opcode::OP_jump), "JUMP" }, - { std::uint8_t(opcode::OP_voidCodepos), "VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall), "SCRIPT_FAR_METHOD_CALL" }, - { std::uint8_t(opcode::OP_inequality), "INEQUALITY" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall), "SCRIPT_LOCAL_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_bit_ex_or), "BIT_EXOR" }, - { std::uint8_t(opcode::OP_NOP), "NOP" }, - { std::uint8_t(opcode::OP_abort), "ABORT" }, - { std::uint8_t(opcode::OP_object), "OBJECT" }, - { std::uint8_t(opcode::OP_thread_object), "THREAD_OBJECT" }, - { std::uint8_t(opcode::OP_EvalLocalVariable), "EVAL_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRef), "EVAL_LOCAL_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_prof_begin), "PROF_BEGIN" }, - { std::uint8_t(opcode::OP_prof_end), "PROF_END" }, - { std::uint8_t(opcode::OP_breakpoint), "BREAKPOINT" }, - { std::uint8_t(opcode::OP_assignmentBreakpoint), "ASSIGN_BREAKPOINT" }, - { std::uint8_t(opcode::OP_manualAndAssignmentBreakpoint), "MANUAL_AND_ASSIGN_BREAKPOINT" }, - { std::uint8_t(opcode::OP_BoolNotAfterAnd), "BOOL_NOT_AFTER_AND" }, - { std::uint8_t(opcode::OP_FormalParams), "FORMAL_PARAMS" }, - { std::uint8_t(opcode::OP_IsDefined), "IS_DEFINED" }, - { std::uint8_t(opcode::OP_IsTrue), "IS_TRUE" }, - { std::uint8_t(opcode::OP_NativeGetLocalFunction), "NATIVE_GET_LOCAL_FUNCTION" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionCall), "NATIVE_LOCAL_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionCall2), "NATIVE_LOCAL_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_NativeLocalMethodCall), "NATIVE_LOCAL_METHOD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionThreadCall), "NATIVE_LOCAL_FUNCTION_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalMethodThreadCall), "NATIVE_LOCAL_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionChildThreadCall), "NATIVE_LOCAL_FUNCTION_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalMethodChildThreadCall), "NATIVE_LOCAL_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeGetFarFunction), "NATIVE_GET_FAR_FUNCTION" }, - { std::uint8_t(opcode::OP_NativeFarFunctionCall), "NATIVE_FAR_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_NativeFarFunctionCall2), "NATIVE_FAR_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_NativeFarMethodCall), "NATIVE_FAR_METHOD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarFunctionThreadCall), "NATIVE_FAR_FUNCTION_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarMethodThreadCall), "NATIVE_FAR_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarFunctionChildThreadCall), "NATIVE_FAR_FUNCTION_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarMethodChildThreadCall), "NATIVE_FAR_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0_Precompiled), "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0_PRECOMPILED" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0_Precompiled), "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0_PRECOMPILED" }, - { std::uint8_t(opcode::OP_CreateLocalVariable_Precompiled), "CREATE_LOCAL_VARIABLE_PRECOMPILED" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached_Precompiled), "SAFE_CREATE_VARIABLE_FIELD_CACHED_PRECOMPILED" }, - { std::uint8_t(opcode::OP_FormalParams_Precompiled), "FORMAL_PARAMS_PRECOMPILED" }, + { 0x00, "CAST_FIELD_OBJECT" }, + { 0x01, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x02, "PLUS" }, + { 0x03, "REMOVE_LOCAL_VARIABLES" }, + { 0x04, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x05, "SCRIPT_FAR_METHOD_CHILD_THREAD_CALL" }, + { 0x06, "GET_GAME_REF" }, + { 0x07, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x08, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x09, "GET_THISTHREAD" }, + { 0x0A, "GREATER" }, + { 0x0B, "WAITTILLMATCH" }, + { 0x0C, "SHIFT_RIGHT" }, + { 0x0D, "DECREMENT" }, + { 0x0E, "JUMP_ON_TRUE" }, + { 0x0F, "BIT_OR" }, + { 0x10, "EQUALITY" }, + { 0x11, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED_0" }, + { 0x12, "NOTIFY" }, + { 0x13, "GET_VECTOR" }, + { 0x14, "SCRIPT_METHOD_CHILD_THREAD_CALL_POINTER" }, + { 0x15, "PRE_SCRIPT_CALL" }, + { 0x16, "GET_BYTE" }, + { 0x17, "SCRIPT_FAR_THREAD_CALL" }, + { 0x18, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x19, "JUMP_ON_FALSE_EXPR" }, + { 0x1A, "GET_UNDEFINED" }, + { 0x1B, "JUMP_BACK" }, + { 0x1C, "JUMP_ON_TRUE_EXPR" }, + { 0x1D, "CALL_BUILTIN_FUNC_0" }, + { 0x1E, "CALL_BUILTIN_FUNC_1" }, + { 0x1F, "CALL_BUILTIN_FUNC_2" }, + { 0x20, "CALL_BUILTIN_FUNC_3" }, + { 0x21, "CALL_BUILTIN_FUNC_4" }, + { 0x22, "CALL_BUILTIN_FUNC_5" }, + { 0x23, "CALL_BUILTIN_FUNC" }, + { 0x24, "SET_LOCAL_VARIABLE_FIELD_CACHED_0" }, + { 0x25, "CLEAR_FIELD_VARIABLE" }, + { 0x26, "GET_LEVEL" }, + { 0x27, "SIZE" }, + { 0x28, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x29, "SCRIPT_LOCAL_METHOD_THREAD_CALL" }, + { 0x2A, "ADD_ARRAY" }, + { 0x2B, "ENDON" }, + { 0x2C, "EVAL_FIELD_VARIABLE" }, + { 0x2D, "SHIFT_LEFT" }, + { 0x2E, "EVAL_LOCAL_ARRAY_REF_CACHED_0" }, + { 0x2F, "RETURN" }, + { 0x30, "CREATE_LOCAL_VARIABLE" }, + { 0x31, "SAFE_SET_VARIABLE_FIELD_CACHED_0" }, + { 0x32, "GET_BUILTIN_FUNCTION" }, + { 0x33, "SCRIPT_LOCAL_METHOD_CALL" }, + { 0x34, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x35, "SCRIPT_LOCAL_CHILD_THREAD_CALL" }, + { 0x36, "GET_SELF_OBJECT" }, + { 0x37, "GET_GAME" }, + { 0x38, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x39, "EVAL_ARRAY" }, + { 0x3A, "GET_SELF" }, + { 0x3B, "END" }, + { 0x3C, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x3D, "LESS_EQUAL" }, + { 0x3E, "EVAL_LOCAL_VARIABLE_CACHED_0" }, + { 0x3F, "EVAL_LOCAL_VARIABLE_CACHED_1" }, + { 0x40, "EVAL_LOCAL_VARIABLE_CACHED_2" }, + { 0x41, "EVAL_LOCAL_VARIABLE_CACHED_3" }, + { 0x42, "EVAL_LOCAL_VARIABLE_CACHED_4" }, + { 0x43, "EVAL_LOCAL_VARIABLE_CACHED_5" }, + { 0x44, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x45, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0" }, + { 0x46, "SCRIPT_CHILD_THREAD_CALL_POINTER" }, + { 0x47, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x48, "SCRIPT_LOCAL_THREAD_CALL" }, + { 0x49, "GET_INTEGER" }, + { 0x4A, "SCRIPT_METHOD_CALL_POINTER" }, + { 0x4B, "CHECK_CLEAR_PARAMS" }, + { 0x4C, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x4D, "WAITTILLMATCH2" }, + { 0x4E, "MINUS" }, + { 0x4F, "SCRIPT_LOCAL_FUNCTION_CALL2" }, + { 0x50, "GET_NEG_USHORT" }, + { 0x51, "GET_NEG_BYTE" }, + { 0x52, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x53, "GREATER_EQUAL" }, + { 0x54, "VECTOR" }, + { 0x55, "GET_BUILTIN_METHOD" }, + { 0x56, "END_SWITCH" }, + { 0x57, "CLEAR_ARRAY" }, + { 0x58, "DECREMENT_TOP" }, + { 0x59, "CAST_BOOL" }, + { 0x5A, "EVAL_ARRAY_REF" }, + { 0x5B, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0" }, + { 0x5C, "GET_ZERO" }, + { 0x5D, "WAIT" }, + { 0x5E, "WAITTILL" }, + { 0x5F, "GET_ISTRING" }, + { 0x60, "SCRIPT_FAR_FUNCTION_CALL" }, + { 0x61, "GET_ANIM_OBJECT" }, + { 0x62, "GET_ANIMTREE" }, + { 0x63, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0x64, "MOD" }, + { 0x65, "SCRIPT_FAR_METHOD_THREAD_CALL" }, + { 0x66, "GET_USHORT" }, + { 0x67, "CLEAR_PARAMS" }, + { 0x68, "SCRIPT_METHOD_THREAD_CALL_POINTER" }, + { 0x69, "SCRIPT_FUNCTION_CALL_POINTER" }, + { 0x6A, "EMPTY_ARRAY" }, + { 0x6B, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x6C, "CLEAR_VARIABLE_FIELD" }, + { 0x6D, "EVAL_FIELD_VARIABLE_REF" }, + { 0x6E, "SCRIPT_LOCAL_METHOD_CHILD_THREAD_CALL" }, + { 0x6F, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED_0" }, + { 0x70, "GET_FLOAT" }, + { 0x71, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x72, "JUMP_ON_FALSE" }, + { 0x73, "BOOL_COMPLEMENT" }, + { 0x74, "SCRIPT_THREAD_CALL_POINTER" }, + { 0x75, "SCRIPT_FAR_FUNCTION_CALL2" }, + { 0x76, "LESS" }, + { 0x77, "BOOL_NOT" }, + { 0x78, "WAITTILLFRAMEEND" }, + { 0x79, "WAITFRAME" }, + { 0x7A, "GET_STRING" }, + { 0x7B, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x7C, "GET_LEVEL_OBJECT" }, + { 0x7D, "INCREMENT" }, + { 0x7E, "CALL_BUILTIN_METHOD_0" }, + { 0x7F, "CALL_BUILTIN_METHOD_1" }, + { 0x80, "CALL_BUILTIN_METHOD_2" }, + { 0x81, "CALL_BUILTIN_METHOD_3" }, + { 0x82, "CALL_BUILTIN_METHOD_4" }, + { 0x83, "CALL_BUILTIN_METHOD_5" }, + { 0x84, "CALL_BUILTIN_METHOD" }, + { 0x85, "GET_ANIM" }, + { 0x86, "SWITCH" }, + { 0x87, "SET_VARIABLE_FIELD" }, + { 0x88, "DIV" }, + { 0x89, "GET_LOCAL_FUNCTION" }, + { 0x8A, "SCRIPT_FAR_CHILD_THREAD_CALL" }, + { 0x8B, "MUL" }, + { 0x8C, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x8D, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x8E, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x8F, "EVAL_LOCAL_VARIABLE_REF_CACHED_0" }, + { 0x90, "BIT_AND" }, + { 0x91, "GET_ANIMATION" }, + { 0x92, "GET_FAR_FUNCTION" }, + { 0x93, "CALL_BUILTIN_POINTER" }, + { 0x94, "JUMP" }, + { 0x95, "VOIDCODEPOS" }, + { 0x96, "SCRIPT_FAR_METHOD_CALL" }, + { 0x97, "INEQUALITY" }, + { 0x98, "SCRIPT_LOCAL_FUNCTION_CALL" }, + { 0x99, "BIT_EXOR" }, + { 0x9A, "NOP" }, + { 0x9B, "ABORT" }, + { 0x9C, "OBJECT" }, + { 0x9D, "THREAD_OBJECT" }, + { 0x9E, "EVAL_LOCAL_VARIABLE" }, + { 0x9F, "EVAL_LOCAL_VARIABLE_REF" }, + { 0xA0, "PROF_BEGIN" }, + { 0xA1, "PROF_END" }, + { 0xA2, "BREAKPOINT" }, + { 0xA3, "ASSIGN_BREAKPOINT" }, + { 0xA4, "MANUAL_AND_ASSIGN_BREAKPOINT" }, + { 0xA5, "BOOL_NOT_AFTER_AND" }, + { 0xA6, "FORMAL_PARAMS" }, + { 0xA7, "IS_DEFINED" }, + { 0xA8, "IS_TRUE" }, + { 0xA9, "NATIVE_GET_LOCAL_FUNCTION" }, + { 0xAA, "NATIVE_LOCAL_FUNCTION_CALL" }, + { 0xAB, "NATIVE_LOCAL_FUNCTION_CALL2" }, + { 0xAC, "NATIVE_LOCAL_METHOD_CALL" }, + { 0xAD, "NATIVE_LOCAL_FUNCTION_THREAD_CALL" }, + { 0xAE, "NATIVE_LOCAL_METHOD_THREAD_CALL" }, + { 0xAF, "NATIVE_LOCAL_FUNCTION_CHILD_THREAD_CALL" }, + { 0xB0, "NATIVE_LOCAL_METHOD_CHILD_THREAD_CALL" }, + { 0xB1, "NATIVE_GET_FAR_FUNCTION" }, + { 0xB2, "NATIVE_FAR_FUNCTION_CALL" }, + { 0xB3, "NATIVE_FAR_FUNCTION_CALL2" }, + { 0xB4, "NATIVE_FAR_METHOD_CALL" }, + { 0xB5, "NATIVE_FAR_FUNCTION_THREAD_CALL" }, + { 0xB6, "NATIVE_FAR_METHOD_THREAD_CALL" }, + { 0xB7, "NATIVE_FAR_FUNCTION_CHILD_THREAD_CALL" }, + { 0xB8, "NATIVE_FAR_METHOD_CHILD_THREAD_CALL" }, + { 0xB9, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0_PRECOMPILED" }, + { 0xBA, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0_PRECOMPILED" }, + { 0xBB, "CREATE_LOCAL_VARIABLE_PRECOMPILED" }, + { 0xBC, "SAFE_CREATE_VARIABLE_FIELD_CACHED_PRECOMPILED" }, + { 0xBD, "FORMAL_PARAMS_PRECOMPILED" }, }}; -const std::array function_list +const std::array, 1065> function_list {{ { 0x001, "abs" }, { 0x002, "acos" }, @@ -1427,7 +1469,7 @@ const std::array function_list { 0x429, "_func_429" }, }}; -const std::array method_list +const std::array, 2032> method_list {{ { 0x8000, "addaieventlistener" }, { 0x8001, "addontoviewmodel" }, @@ -3463,7 +3505,7 @@ const std::array method_list { 0x87EF, "_meth_87EF" }, }}; -const std::array file_list +const std::array, 1467> file_list {{ { 0x0005, "scripts/aitypes/bt_util" }, { 0x0006, "scripts/asm/asm" }, @@ -4934,7 +4976,7 @@ const std::array file_list { 0xE361, "scripts/cp_mp/vehicles/customization/battle_tracks" }, }}; -const std::array token_list +const std::array, 70546> token_list {{ { 0x00, "" }, // VOID { 0x01, "pl#" }, // PL @@ -75509,32 +75551,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/iw8/xsk/resolver.hpp b/src/iw8/xsk/resolver.hpp index e3ab856..b691399 100644 --- a/src/iw8/xsk/resolver.hpp +++ b/src/iw8/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::iw8 diff --git a/src/s1/stdafx.hpp b/src/s1/stdafx.hpp index 45502c5..946c655 100644 --- a/src/s1/stdafx.hpp +++ b/src/s1/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/s1/xsk/assembler.cpp b/src/s1/xsk/assembler.cpp index 2fc7ec4..638593e 100644 --- a/src/s1/xsk/assembler.cpp +++ b/src/s1/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -379,24 +393,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -405,9 +407,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -423,33 +424,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint16_t file_id = 0; - std::uint16_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -458,22 +451,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -487,25 +471,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -514,25 +499,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = (std::uint16_t)std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFF; - if (field_id == 0) - { - field_id = 0xFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 0xA7DC) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -543,7 +516,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -572,24 +545,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/s1/xsk/assembler.hpp b/src/s1/xsk/assembler.hpp index fcc64dc..390b782 100644 --- a/src/s1/xsk/assembler.hpp +++ b/src/s1/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::s1 diff --git a/src/s1/xsk/compiler.cpp b/src/s1/xsk/compiler.cpp index 172cd17..4ed93b2 100644 --- a/src/s1/xsk/compiler.cpp +++ b/src/s1/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = s1__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -393,9 +393,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -534,7 +534,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -588,7 +588,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -734,7 +734,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -755,9 +755,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -847,7 +847,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -897,7 +897,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1055,7 +1055,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1109,7 +1109,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1372,10 +1372,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1392,7 +1392,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1408,7 +1408,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1490,10 +1490,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1510,7 +1510,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1526,7 +1526,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1548,7 +1548,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1624,7 +1624,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1791,7 +1791,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2082,7 +2082,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2094,7 +2094,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2107,7 +2107,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2224,7 +2224,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2261,7 +2261,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2304,7 +2304,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2434,7 +2434,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2706,7 +2706,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2735,7 +2735,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/s1/xsk/compiler.hpp b/src/s1/xsk/compiler.hpp index 08a3ff6..ec5240f 100644 --- a/src/s1/xsk/compiler.hpp +++ b/src/s1/xsk/compiler.hpp @@ -88,7 +88,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/s1/xsk/decompiler.cpp b/src/s1/xsk/decompiler.cpp index 4d57d27..8c0e0e1 100644 --- a/src/s1/xsk/decompiler.cpp +++ b/src/s1/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1365,7 +1365,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1846,7 +1846,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1921,7 +1921,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2057,7 +2057,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2164,11 +2164,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2566,7 +2566,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2685,7 +2685,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3076,7 +3076,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/s1/xsk/disassembler.cpp b/src/s1/xsk/disassembler.cpp index 180b93a..9b909f3 100644 --- a/src/s1/xsk/disassembler.cpp +++ b/src/s1/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// S1 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,8 +69,8 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); @@ -169,7 +169,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -311,19 +311,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -342,88 +337,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint16_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0xA7DC) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x40000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -431,24 +381,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -458,7 +448,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 10; @@ -467,24 +457,24 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { - case opcode::OP_GetLocalFunction: - case opcode::OP_ScriptLocalFunctionCall: - case opcode::OP_ScriptLocalFunctionCall2: - case opcode::OP_ScriptLocalMethodCall: - case opcode::OP_ScriptLocalThreadCall: - case opcode::OP_ScriptLocalChildThreadCall: - case opcode::OP_ScriptLocalMethodThreadCall: - case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); - break; - default: - break; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = resolve_function(inst->data[0]); + break; + default: + break; } } } @@ -513,9 +503,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -533,40 +523,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/s1/xsk/disassembler.hpp b/src/s1/xsk/disassembler.hpp index eb0df0f..34db4a0 100644 --- a/src/s1/xsk/disassembler.hpp +++ b/src/s1/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/s1/xsk/lexer.cpp b/src/s1/xsk/lexer.cpp index 98f03b5..59a442e 100644 --- a/src/s1/xsk/lexer.cpp +++ b/src/s1/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 111 -#define YY_END_OF_BUFFER 112 +#define YY_NUM_RULES 112 +#define YY_END_OF_BUFFER 113 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[333] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, - 1, 2, 95, 110, 110, 94, 98, 110, 55, 56, - 92, 90, 61, 91, 62, 93, 109, 109, 64, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 111, + 1, 2, 95, 111, 111, 94, 98, 111, 55, 56, + 92, 90, 61, 91, 62, 93, 110, 110, 64, 65, 79, 89, 80, 66, 101, 59, 60, 99, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 57, 97, 58, 96, 5, 6, - 5, 12, 13, 12, 110, 92, 93, 76, 0, 103, + 5, 12, 13, 12, 111, 92, 93, 76, 0, 103, 0, 15, 0, 0, 0, 0, 85, 0, 74, 0, - 87, 0, 0, 8, 83, 67, 81, 68, 82, 105, - 0, 11, 4, 3, 84, 105, 109, 106, 0, 0, + 87, 0, 0, 8, 83, 67, 81, 68, 82, 106, + 0, 11, 4, 3, 84, 106, 110, 107, 0, 0, 0, 0, 63, 71, 77, 75, 78, 72, 101, 88, 101, 101, 101, 101, 101, 101, 29, 101, 101, 101, 101, 101, 27, 33, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 86, 73, 7, 14, 10, 9, 0, 103, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 103, 0, 105, 0, 3, 105, - 105, 106, 107, 108, 100, 69, 70, 101, 101, 101, + 0, 0, 0, 0, 103, 0, 106, 0, 3, 106, + 106, 107, 108, 109, 100, 69, 70, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 31, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 104, 0, 0, 0, 0, 0, 102, 0, 0, @@ -595,7 +595,7 @@ static const flex_int16_t yy_accept[333] = 54, 101, 101, 101, 101, 101, 101, 101, 101, 101, 30, 0, 0, 0, 0, 0, 101, 101, 101, 101, 101, 21, 101, 101, 39, 34, 101, 43, 101, 101, - 101, 104, 0, 0, 16, 0, 101, 101, 101, 36, + 101, 105, 0, 0, 16, 0, 101, 101, 101, 36, 32, 101, 101, 101, 101, 101, 101, 0, 17, 0, 101, 101, 38, 101, 42, 101, 101, 101, 23, 19, @@ -1193,11 +1193,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1256,582 +1256,587 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw s1::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw s1::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw s1::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return s1::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw s1::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return s1::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw s1::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw s1::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return s1::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return s1::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return s1::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return s1::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return s1::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return s1::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return s1::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return s1::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return s1::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return s1::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return s1::parser::make_WAITFRAME(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return s1::parser::make_IF(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return s1::parser::make_ELSE(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return s1::parser::make_DO(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return s1::parser::make_WHILE(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return s1::parser::make_FOR(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return s1::parser::make_FOREACH(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return s1::parser::make_IN(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return s1::parser::make_SWITCH(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return s1::parser::make_CASE(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return s1::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return s1::parser::make_BREAK(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return s1::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return s1::parser::make_RETURN(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return s1::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return s1::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return s1::parser::make_PROFEND(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return s1::parser::make_THREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return s1::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return s1::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return s1::parser::make_CALL(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return s1::parser::make_TRUE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return s1::parser::make_FALSE(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return s1::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return s1::parser::make_SIZE(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return s1::parser::make_GAME(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return s1::parser::make_SELF(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return s1::parser::make_ANIM(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return s1::parser::make_LEVEL(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return s1::parser::make_LPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return s1::parser::make_RPAREN(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return s1::parser::make_LBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return s1::parser::make_RBRACE(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return s1::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return s1::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return s1::parser::make_COMMA(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return s1::parser::make_DOT(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return s1::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return s1::parser::make_COLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return s1::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return s1::parser::make_QMARK(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return s1::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return s1::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return s1::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return s1::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return s1::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return s1::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return s1::parser::make_OR(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return s1::parser::make_AND(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return s1::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return s1::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return s1::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return s1::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return s1::parser::make_LESS(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return s1::parser::make_GREATER(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return s1::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return s1::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return s1::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return s1::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return s1::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return s1::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return s1::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return s1::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return s1::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return s1::parser::make_ADD(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return s1::parser::make_SUB(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return s1::parser::make_MUL(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return s1::parser::make_DIV(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return s1::parser::make_MOD(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return s1::parser::make_NOT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return s1::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return s1::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return s1::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" +#line 157 "lexer.lpp" { return s1::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return s1::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return s1::parser::make_PATH(xsk::gsc::s1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return s1::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 159 "lexer.lpp" +{ return s1::parser::make_IDENTIFIER(xsk::gsc::s1::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" -{ return s1::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 160 "lexer.lpp" +{ return s1::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 103: /* rule 103 can match eol */ YY_RULE_SETUP -#line 160 "lexer.lpp" +#line 161 "lexer.lpp" { return s1::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return s1::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 162 "lexer.lpp" +{ return s1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return s1::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return s1::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return s1::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return s1::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return s1::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return s1::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return s1::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 166 "lexer.lpp" +{ return s1::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 109: YY_RULE_SETUP -#line 166 "lexer.lpp" -{ return s1::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 167 "lexer.lpp" -{ if(ctx->header_top > 0) s1_pop_header(ctx); else return s1::parser::make_S1EOF(ctx->loc); } +{ return s1::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 110: -/* rule 110 can match eol */ YY_RULE_SETUP #line 168 "lexer.lpp" -{ throw s1::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return s1::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 169 "lexer.lpp" +{ if(ctx->header_top > 0) s1_pop_header(ctx); else return s1::parser::make_S1EOF(ctx->loc); } YY_BREAK case 111: +/* rule 111 can match eol */ YY_RULE_SETUP #line 170 "lexer.lpp" +{ throw s1::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 172 "lexer.lpp" ECHO; YY_BREAK -#line 1834 "lexer.cpp" +#line 1839 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2961,65 +2966,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" void s1_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3027,9 +3032,9 @@ void s1_push_header(xsk::gsc::context* ctx, const std::string& file) void s1_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/s1/xsk/lexer.hpp b/src/s1/xsk/lexer.hpp index ac2bc6f..e836529 100644 --- a/src/s1/xsk/lexer.hpp +++ b/src/s1/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/s1/xsk/parser.cpp b/src/s1/xsk/parser.cpp index b496aa8..72c644a 100644 --- a/src/s1/xsk/parser.cpp +++ b/src/s1/xsk/parser.cpp @@ -498,10 +498,7 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -802,10 +799,7 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1106,10 +1100,7 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1409,10 +1400,7 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1967,10 +1955,7 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1995,1321 +1980,1303 @@ namespace xsk { namespace gsc { namespace s1 { switch (yyn) { case 2: // root: program -#line 254 "parser.ypp" +#line 251 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2001 "parser.cpp" +#line 1986 "parser.cpp" break; case 3: // root: %empty -#line 255 "parser.ypp" +#line 252 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 2007 "parser.cpp" +#line 1992 "parser.cpp" break; case 4: // program: program inline -#line 260 "parser.ypp" +#line 257 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2013 "parser.cpp" +#line 1998 "parser.cpp" break; case 5: // program: program include -#line 262 "parser.ypp" +#line 259 "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 2019 "parser.cpp" +#line 2004 "parser.cpp" break; case 6: // program: program declaration -#line 264 "parser.ypp" +#line 261 "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 2025 "parser.cpp" +#line 2010 "parser.cpp" break; case 7: // program: inline -#line 266 "parser.ypp" +#line 263 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2031 "parser.cpp" +#line 2016 "parser.cpp" break; case 8: // program: include -#line 268 "parser.ypp" +#line 265 "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 2037 "parser.cpp" +#line 2022 "parser.cpp" break; case 9: // program: declaration -#line 270 "parser.ypp" +#line 267 "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 2043 "parser.cpp" +#line 2028 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 274 "parser.ypp" +#line 271 "parser.ypp" { s1_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2049 "parser.cpp" +#line 2034 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 279 "parser.ypp" +#line 276 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2055 "parser.cpp" +#line 2040 "parser.cpp" break; case 12: // declaration: "/#" -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2061 "parser.cpp" +#line 2046 "parser.cpp" break; case 13: // declaration: "#/" -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2067 "parser.cpp" +#line 2052 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2073 "parser.cpp" +#line 2058 "parser.cpp" break; case 15: // declaration: decl_constant -#line 286 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2079 "parser.cpp" +#line 2064 "parser.cpp" break; case 16: // declaration: decl_thread -#line 287 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2085 "parser.cpp" +#line 2070 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 292 "parser.ypp" +#line 289 "parser.ypp" { ctx->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 2091 "parser.cpp" +#line 2076 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 297 "parser.ypp" +#line 294 "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 2097 "parser.cpp" +#line 2082 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 302 "parser.ypp" +#line 299 "parser.ypp" { ctx->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 2103 "parser.cpp" +#line 2088 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2109 "parser.cpp" +#line 2094 "parser.cpp" break; case 21: // stmt: stmt_block -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2115 "parser.cpp" +#line 2100 "parser.cpp" break; case 22: // stmt: stmt_call -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2121 "parser.cpp" +#line 2106 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2127 "parser.cpp" +#line 2112 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2133 "parser.cpp" +#line 2118 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2139 "parser.cpp" +#line 2124 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2145 "parser.cpp" +#line 2130 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2151 "parser.cpp" +#line 2136 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2157 "parser.cpp" +#line 2142 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2163 "parser.cpp" +#line 2148 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } -#line 2169 "parser.cpp" +#line 2154 "parser.cpp" break; case 31: // stmt: stmt_if -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2175 "parser.cpp" +#line 2160 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2181 "parser.cpp" +#line 2166 "parser.cpp" break; case 33: // stmt: stmt_while -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2187 "parser.cpp" +#line 2172 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2193 "parser.cpp" +#line 2178 "parser.cpp" break; case 35: // stmt: stmt_for -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2199 "parser.cpp" +#line 2184 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2205 "parser.cpp" +#line 2190 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2211 "parser.cpp" +#line 2196 "parser.cpp" break; case 38: // stmt: stmt_case -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2217 "parser.cpp" +#line 2202 "parser.cpp" break; case 39: // stmt: stmt_default -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2223 "parser.cpp" +#line 2208 "parser.cpp" break; case 40: // stmt: stmt_break -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2229 "parser.cpp" +#line 2214 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2235 "parser.cpp" +#line 2220 "parser.cpp" break; case 42: // stmt: stmt_return -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2241 "parser.cpp" +#line 2226 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 329 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2247 "parser.cpp" +#line 2232 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 330 "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 2253 "parser.cpp" +#line 2238 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 331 "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 2259 "parser.cpp" +#line 2244 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 335 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2265 "parser.cpp" +#line 2250 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 336 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2271 "parser.cpp" +#line 2256 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 340 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2277 "parser.cpp" +#line 2262 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 341 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2283 "parser.cpp" +#line 2268 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 346 "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 2289 "parser.cpp" +#line 2274 "parser.cpp" break; case 51: // stmt_list: stmt -#line 348 "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 2295 "parser.cpp" +#line 2280 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 353 "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 2301 "parser.cpp" +#line 2286 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 355 "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 2307 "parser.cpp" +#line 2292 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 357 "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 2313 "parser.cpp" +#line 2298 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 359 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2319 "parser.cpp" +#line 2304 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 364 "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 2325 "parser.cpp" +#line 2310 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 366 "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 2331 "parser.cpp" +#line 2316 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 371 "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 2337 "parser.cpp" +#line 2322 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 373 "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 2343 "parser.cpp" +#line 2328 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 375 "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 2349 "parser.cpp" +#line 2334 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 380 "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 2355 "parser.cpp" +#line 2340 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 385 "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 2361 "parser.cpp" +#line 2346 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 387 "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 2367 "parser.cpp" +#line 2352 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 392 "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 2373 "parser.cpp" +#line 2358 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 397 "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 2379 "parser.cpp" +#line 2364 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 399 "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 2385 "parser.cpp" +#line 2370 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 404 "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 2391 "parser.cpp" +#line 2376 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 406 "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 2397 "parser.cpp" +#line 2382 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 411 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2403 "parser.cpp" +#line 2388 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 416 "parser.ypp" +#line 413 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2409 "parser.cpp" +#line 2394 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 418 "parser.ypp" +#line 415 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2415 "parser.cpp" +#line 2400 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2421 "parser.cpp" +#line 2406 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 428 "parser.ypp" +#line 425 "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 2427 "parser.cpp" +#line 2412 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2433 "parser.cpp" +#line 2418 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 438 "parser.ypp" +#line 435 "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 2439 "parser.cpp" +#line 2424 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 443 "parser.ypp" +#line 440 "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 2445 "parser.cpp" +#line 2430 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 448 "parser.ypp" +#line 445 "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 2451 "parser.cpp" +#line 2436 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 450 "parser.ypp" +#line 447 "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 2457 "parser.cpp" +#line 2442 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 455 "parser.ypp" +#line 452 "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 2463 "parser.cpp" +#line 2448 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 460 "parser.ypp" +#line 457 "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 2469 "parser.cpp" +#line 2454 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 462 "parser.ypp" +#line 459 "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 2475 "parser.cpp" +#line 2460 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2481 "parser.cpp" +#line 2466 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2487 "parser.cpp" +#line 2472 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 477 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2493 "parser.cpp" +#line 2478 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 482 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2499 "parser.cpp" +#line 2484 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 484 "parser.ypp" +#line 481 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2505 "parser.cpp" +#line 2490 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 489 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2511 "parser.cpp" +#line 2496 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 494 "parser.ypp" +#line 491 "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 2517 "parser.cpp" +#line 2502 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 499 "parser.ypp" +#line 496 "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 2523 "parser.cpp" +#line 2508 "parser.cpp" break; case 90: // expr: expr_ternary -#line 503 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2529 "parser.cpp" +#line 2514 "parser.cpp" break; case 91: // expr: expr_binary -#line 504 "parser.ypp" +#line 501 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2535 "parser.cpp" +#line 2520 "parser.cpp" break; case 92: // expr: expr_primitive -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2541 "parser.cpp" +#line 2526 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2547 "parser.cpp" +#line 2532 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 510 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2553 "parser.cpp" +#line 2538 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2559 "parser.cpp" +#line 2544 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2565 "parser.cpp" +#line 2550 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2571 "parser.cpp" +#line 2556 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2577 "parser.cpp" +#line 2562 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2583 "parser.cpp" +#line 2568 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2589 "parser.cpp" +#line 2574 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 527 "parser.ypp" +#line 524 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2595 "parser.cpp" +#line 2580 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 529 "parser.ypp" +#line 526 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2601 "parser.cpp" +#line 2586 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 531 "parser.ypp" +#line 528 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2607 "parser.cpp" +#line 2592 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 533 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2613 "parser.cpp" +#line 2598 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 535 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2619 "parser.cpp" +#line 2604 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 540 "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 2625 "parser.cpp" +#line 2610 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 542 "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 2631 "parser.cpp" +#line 2616 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 547 "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 2637 "parser.cpp" +#line 2622 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 549 "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 2643 "parser.cpp" +#line 2628 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 554 "parser.ypp" +#line 551 "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 2649 "parser.cpp" +#line 2634 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2655 "parser.cpp" +#line 2640 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2661 "parser.cpp" +#line 2646 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2667 "parser.cpp" +#line 2652 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2673 "parser.cpp" +#line 2658 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2679 "parser.cpp" +#line 2664 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2685 "parser.cpp" +#line 2670 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2691 "parser.cpp" +#line 2676 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2697 "parser.cpp" +#line 2682 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2703 "parser.cpp" +#line 2688 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2709 "parser.cpp" +#line 2694 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2715 "parser.cpp" +#line 2700 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2721 "parser.cpp" +#line 2706 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2727 "parser.cpp" +#line 2712 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 585 "parser.ypp" +#line 582 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2733 "parser.cpp" +#line 2718 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2739 "parser.cpp" +#line 2724 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2745 "parser.cpp" +#line 2730 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2751 "parser.cpp" +#line 2736 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2757 "parser.cpp" +#line 2742 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2763 "parser.cpp" +#line 2748 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2769 "parser.cpp" +#line 2754 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2775 "parser.cpp" +#line 2760 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2781 "parser.cpp" +#line 2766 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2787 "parser.cpp" +#line 2772 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2793 "parser.cpp" +#line 2778 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2799 "parser.cpp" +#line 2784 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2805 "parser.cpp" +#line 2790 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2811 "parser.cpp" +#line 2796 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2817 "parser.cpp" +#line 2802 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2823 "parser.cpp" +#line 2808 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2829 "parser.cpp" +#line 2814 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2835 "parser.cpp" +#line 2820 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2841 "parser.cpp" +#line 2826 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2847 "parser.cpp" +#line 2832 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2853 "parser.cpp" +#line 2838 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2859 "parser.cpp" +#line 2844 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2865 "parser.cpp" +#line 2850 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 615 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2871 "parser.cpp" +#line 2856 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 616 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2877 "parser.cpp" +#line 2862 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 617 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2883 "parser.cpp" +#line 2868 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 618 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2889 "parser.cpp" +#line 2874 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2895 "parser.cpp" +#line 2880 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 620 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2901 "parser.cpp" +#line 2886 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 621 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2907 "parser.cpp" +#line 2892 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 622 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2913 "parser.cpp" +#line 2898 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 623 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2919 "parser.cpp" +#line 2904 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2925 "parser.cpp" +#line 2910 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2931 "parser.cpp" +#line 2916 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 634 "parser.ypp" +#line 631 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2937 "parser.cpp" +#line 2922 "parser.cpp" break; case 159: // expr_call: expr_function -#line 638 "parser.ypp" +#line 635 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2943 "parser.cpp" +#line 2928 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 639 "parser.ypp" +#line 636 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2949 "parser.cpp" +#line 2934 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 642 "parser.ypp" +#line 639 "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 2955 "parser.cpp" +#line 2940 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 643 "parser.ypp" +#line 640 "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 2961 "parser.cpp" +#line 2946 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2967 "parser.cpp" +#line 2952 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 647 "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 2973 "parser.cpp" +#line 2958 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 649 "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 2979 "parser.cpp" +#line 2964 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 651 "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 2985 "parser.cpp" +#line 2970 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 653 "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 2991 "parser.cpp" +#line 2976 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 658 "parser.ypp" +#line 655 "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 2997 "parser.cpp" +#line 2982 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 660 "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 3003 "parser.cpp" +#line 2988 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 665 "parser.ypp" +#line 662 "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 3009 "parser.cpp" +#line 2994 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 667 "parser.ypp" +#line 664 "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 3015 "parser.cpp" +#line 3000 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 669 "parser.ypp" +#line 666 "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 3021 "parser.cpp" +#line 3006 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 674 "parser.ypp" +#line 671 "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 3027 "parser.cpp" +#line 3012 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 679 "parser.ypp" +#line 676 "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 3033 "parser.cpp" +#line 3018 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 681 "parser.ypp" +#line 678 "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 3039 "parser.cpp" +#line 3024 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 683 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3045 "parser.cpp" +#line 3030 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 688 "parser.ypp" +#line 685 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3051 "parser.cpp" +#line 3036 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 690 "parser.ypp" +#line 687 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3057 "parser.cpp" +#line 3042 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 695 "parser.ypp" +#line 692 "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 3063 "parser.cpp" +#line 3048 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 697 "parser.ypp" +#line 694 "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 3069 "parser.cpp" +#line 3054 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 702 "parser.ypp" +#line 699 "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 3075 "parser.cpp" +#line 3060 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3081 "parser.cpp" +#line 3066 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 709 "parser.ypp" +#line 706 "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 3087 "parser.cpp" +#line 3072 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 714 "parser.ypp" +#line 711 "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 3093 "parser.cpp" +#line 3078 "parser.cpp" break; case 185: // expr_size: expr_object ".size" -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3099 "parser.cpp" +#line 3084 "parser.cpp" break; case 186: // expr_paren: "(" expr ")" -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3105 "parser.cpp" +#line 3090 "parser.cpp" break; case 187: // expr_object: expr_call -#line 728 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3111 "parser.cpp" +#line 3096 "parser.cpp" break; case 188: // expr_object: expr_method -#line 729 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3117 "parser.cpp" +#line 3102 "parser.cpp" break; case 189: // expr_object: expr_array -#line 730 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3123 "parser.cpp" +#line 3108 "parser.cpp" break; case 190: // expr_object: expr_field -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3129 "parser.cpp" +#line 3114 "parser.cpp" break; case 191: // expr_object: expr_game -#line 732 "parser.ypp" +#line 729 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3135 "parser.cpp" +#line 3120 "parser.cpp" break; case 192: // expr_object: expr_self -#line 733 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3141 "parser.cpp" +#line 3126 "parser.cpp" break; case 193: // expr_object: expr_anim -#line 734 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3147 "parser.cpp" +#line 3132 "parser.cpp" break; case 194: // expr_object: expr_level -#line 735 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3153 "parser.cpp" +#line 3138 "parser.cpp" break; case 195: // expr_object: expr_identifier -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3159 "parser.cpp" +#line 3144 "parser.cpp" break; case 196: // expr_thisthread: "thisthread" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3165 "parser.cpp" +#line 3150 "parser.cpp" break; case 197: // expr_empty_array: "[" "]" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3171 "parser.cpp" +#line 3156 "parser.cpp" break; case 198: // expr_undefined: "undefined" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3177 "parser.cpp" +#line 3162 "parser.cpp" break; case 199: // expr_game: "game" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3183 "parser.cpp" +#line 3168 "parser.cpp" break; case 200: // expr_self: "self" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3189 "parser.cpp" +#line 3174 "parser.cpp" break; case 201: // expr_anim: "anim" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3195 "parser.cpp" +#line 3180 "parser.cpp" break; case 202: // expr_level: "level" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3201 "parser.cpp" +#line 3186 "parser.cpp" break; case 203: // expr_animation: "%" "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3207 "parser.cpp" +#line 3192 "parser.cpp" break; case 204: // expr_animtree: "#animtree" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3213 "parser.cpp" +#line 3198 "parser.cpp" break; case 205: // expr_identifier: "identifier" -#line 786 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3219 "parser.cpp" +#line 3204 "parser.cpp" break; case 206: // expr_path: "path" -#line 791 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3225 "parser.cpp" +#line 3210 "parser.cpp" break; case 207: // expr_path: expr_identifier -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3231 "parser.cpp" +#line 3216 "parser.cpp" break; case 208: // expr_istring: "localized string" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3237 "parser.cpp" +#line 3222 "parser.cpp" break; case 209: // expr_string: "string literal" -#line 803 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3243 "parser.cpp" +#line 3228 "parser.cpp" break; case 210: // expr_color: "color" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3249 "parser.cpp" +#line 3234 "parser.cpp" break; case 211: // expr_vector: "(" expr "," expr "," expr ")" -#line 813 "parser.ypp" +#line 810 "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 3255 "parser.cpp" +#line 3240 "parser.cpp" break; case 212: // expr_float: "-" "float" -#line 818 "parser.ypp" +#line 815 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3261 "parser.cpp" +#line 3246 "parser.cpp" break; case 213: // expr_float: "float" -#line 820 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3267 "parser.cpp" +#line 3252 "parser.cpp" break; - case 214: // expr_integer: "-" "int" -#line 825 "parser.ypp" + case 214: // expr_integer: "-" "integer" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3273 "parser.cpp" +#line 3258 "parser.cpp" break; - case 215: // expr_integer: "int" -#line 827 "parser.ypp" + case 215: // expr_integer: "integer" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3279 "parser.cpp" +#line 3264 "parser.cpp" break; - case 216: // expr_integer: "octal int" + case 216: // expr_false: "false" #line 829 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3285 "parser.cpp" - break; - - case 217: // expr_integer: "binary int" -#line 831 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3291 "parser.cpp" - break; - - case 218: // expr_integer: "hexadecimal int" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3297 "parser.cpp" - break; - - case 219: // expr_false: "false" -#line 838 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3303 "parser.cpp" +#line 3270 "parser.cpp" break; - case 220: // expr_true: "true" -#line 843 "parser.ypp" + case 217: // expr_true: "true" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3309 "parser.cpp" +#line 3276 "parser.cpp" break; -#line 3313 "parser.cpp" +#line 3280 "parser.cpp" default: break; @@ -3504,25 +3471,24 @@ namespace xsk { namespace gsc { namespace s1 { ">>", "||", "&&", "==", "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", - "localized string", "color", "float", "int", "octal int", "binary int", - "hexadecimal int", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", - "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", - "inline", "include", "declaration", "decl_usingtree", "decl_constant", - "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", - "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", - "stmt_wait", "stmt_waittill", "stmt_waittillmatch", - "stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", + "localized string", "color", "float", "integer", "ADD_ARRAY", "THEN", + "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", "POSTINC", "POSTDEC", + "$accept", "root", "program", "inline", "include", "declaration", + "decl_usingtree", "decl_constant", "decl_thread", "stmt", "stmt_dev", + "stmt_block", "stmt_list", "stmt_expr", "stmt_call", "stmt_assign", + "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", + "stmt_waittillmatch", "stmt_waittillframeend", "stmt_waitframe", + "stmt_if", "stmt_ifelse", "stmt_while", "stmt_dowhile", "stmt_for", + "stmt_foreach", "stmt_switch", "stmt_case", "stmt_default", "stmt_break", + "stmt_continue", "stmt_return", "stmt_breakpoint", "stmt_prof_begin", + "stmt_prof_end", "expr", "expr_or_empty", "expr_assign", + "expr_increment", "expr_decrement", "expr_ternary", "expr_binary", + "expr_primitive", "expr_complement", "expr_not", "expr_call", + "expr_method", "expr_function", "expr_pointer", "expr_add_array", + "expr_parameters", "expr_arguments", "expr_arguments_no_empty", + "expr_reference", "expr_array", "expr_field", "expr_size", "expr_paren", + "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", + "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier", "expr_path", "expr_istring", "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR @@ -3790,58 +3756,57 @@ namespace xsk { namespace gsc { namespace s1 { } - const short parser::yypact_ninf_ = -269; + const short parser::yypact_ninf_ = -261; const short parser::yytable_ninf_ = -208; const short parser::yypact_[] = { - 15, -269, -269, 10, 10, -32, -269, 26, 15, -269, - -269, -269, -269, -269, -269, -20, -269, -269, -24, -21, - -49, -269, -269, -269, -269, -30, 858, -269, -269, -269, - 25, -18, -269, -269, -35, -25, -269, 28, -269, -269, - -269, -269, -269, -269, -269, 858, 724, -30, 858, 858, - 55, -17, -269, -269, -269, -269, -269, -269, -269, 2001, - -269, -269, -269, -269, -269, 198, 435, -269, -269, -269, - -269, 589, 690, -269, -269, 814, -269, -269, -269, 819, - 881, 886, 1084, -269, -269, 552, 67, -269, -269, -269, - -269, -269, -269, -269, -269, 80, 34, -30, 75, 107, - 105, 112, 120, 115, 121, 1287, 724, -269, 2084, 118, - 128, -269, -269, -269, -269, -269, -269, -269, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, -269, 925, -30, - -269, -269, 135, 132, 858, -30, -269, 1021, -269, -269, - 858, 858, -30, 858, 858, -30, 858, -269, 858, 1731, - 858, -269, 1966, 117, 117, 920, 2115, 2166, 2166, 309, - 309, 309, 309, 2125, 632, 2156, 54, 54, -269, -269, - -269, 1771, -269, -30, 13, -269, 141, 1072, 858, 136, - 12, 145, 1225, 147, 150, 153, 155, 33, 156, 152, - 157, 791, 161, 166, 173, -269, 177, 130, 130, -269, - -269, -269, 1123, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, 172, 174, 175, - 178, 180, -269, -269, 36, -269, -269, -269, -269, 7, - 1811, 22, 183, 1851, 29, 192, 1891, 1930, 193, 2084, - 858, -269, 141, -269, 858, -269, 1174, 2036, -269, 200, - -269, 858, 228, 858, -4, -30, 858, 158, 199, 202, - -269, -269, -269, -269, 2071, -269, 858, 858, 858, -269, - -269, 69, 69, -269, -269, -269, -269, -269, -269, -269, - 207, 212, 213, 214, -269, -269, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 210, -269, 858, - 211, -269, 858, 215, 858, 217, 2084, 38, -269, -269, - 209, 1453, 221, 1487, 222, -269, -269, -269, 1251, -7, - 1521, -269, -269, -269, 44, 45, 1731, 858, 858, 858, - 858, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, - 2084, 2084, 223, 46, 225, 53, 227, 1555, 858, -269, - -269, 1225, 858, 1225, 858, 858, -30, 34, 224, 232, - 1589, 1331, 1375, 1419, 858, -269, 858, -269, 858, -269, - 77, 256, 1623, -269, 2084, 235, 1657, 255, -269, -269, - -269, 236, 239, 858, 240, 858, 241, 858, 87, 88, - 98, -269, 1225, 246, -4, 1225, 858, -269, -269, 234, - -269, 254, -269, 257, -269, -269, -269, -269, -269, 258, - -269, 1691, 247, 250, 253, 1225, 1225, -269, -269, -269, - -269, -269 + 24, -261, -261, -71, -71, -23, -261, 39, 24, -261, + -261, -261, -261, -261, -261, -20, -261, -261, -5, -3, + -26, -261, -261, -261, -261, -35, 1143, -261, -261, -261, + 28, 17, -261, -261, -36, -33, -261, 27, -261, -261, + -261, -261, -261, -261, -261, 1143, 1015, -35, 1143, 1143, + -58, 7, -261, -261, -261, -261, 1897, -261, -261, -261, + -261, -261, 345, 435, -261, -261, -261, -261, 581, 609, + -261, -261, 614, -261, -261, -261, 848, 950, 1104, 1168, + -261, -261, 74, 46, -261, -261, -261, -261, -261, -261, + -261, -261, 54, 69, -35, 79, 73, 91, 83, 104, + 101, 110, 1222, 1015, -261, 1980, 111, 116, -261, -261, + -261, -261, -261, -261, -261, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, -261, 1207, -35, -261, -261, 122, + 121, 1143, -35, -261, 785, -261, -261, 1143, 1143, -35, + 1143, 1143, -35, 1143, -261, 1143, 1666, 1143, -261, 1862, + 114, 114, 2011, 2021, 2103, 2103, 53, 53, 53, 53, + 2052, 2093, 2062, 59, 59, -261, -261, -261, 1706, -261, + -35, 18, -261, 130, 836, 1143, 125, -11, 137, 989, + 138, 139, 150, 159, -53, 153, 154, 158, 1079, 160, + 163, 176, -261, 173, 127, 127, -261, -261, -261, 887, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, 168, 171, 174, 179, 180, -261, + -261, 683, -261, -261, -261, -261, 8, 1746, 21, 183, + 1786, 29, 186, 1826, 1010, 182, 1980, 1143, -261, 130, + -261, 1143, -261, 938, 1932, -261, 193, -261, 1143, 220, + 1143, 550, -35, 1143, 145, 191, 195, -261, -261, -261, + -261, 1967, -261, 1143, 1143, 1143, -261, -261, 210, 210, + -261, -261, -261, -261, -261, -261, -261, 202, 208, 212, + 216, -261, -261, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 205, -261, 1143, 213, -261, 1143, + 215, 1143, 222, 1980, 31, -261, -261, 214, 1388, 223, + 1422, 219, -261, -261, -261, 13, -6, 1456, -261, -261, + -261, 32, 50, 1666, 1143, 1143, 1143, 1143, 1980, 1980, + 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 230, + 51, 231, 60, 232, 1490, 1143, -261, -261, 989, 1143, + 989, 1143, 1143, -35, 69, 224, 225, 1524, 1266, 1310, + 1354, 1143, -261, 1143, -261, 1143, -261, 71, 263, 1558, + -261, 1980, 227, 1592, 260, -261, -261, -261, 233, 237, + 1143, 238, 1143, 239, 1143, 78, 84, 85, -261, 989, + 242, 550, 989, 1143, -261, -261, 252, -261, 253, -261, + 256, -261, -261, -261, -261, -261, 278, -261, 1626, 271, + 274, 276, 989, 989, -261, -261, -261, -261, -261 }; const unsigned char @@ -3850,616 +3815,601 @@ namespace xsk { namespace gsc { namespace s1 { 3, 12, 13, 0, 0, 0, 205, 0, 2, 7, 8, 9, 14, 15, 16, 0, 206, 207, 0, 0, 0, 1, 4, 5, 6, 176, 0, 10, 11, 209, - 0, 0, 175, 204, 0, 0, 196, 0, 220, 219, + 0, 0, 175, 204, 0, 0, 196, 0, 217, 216, 198, 199, 200, 201, 202, 0, 178, 0, 0, 0, - 0, 0, 208, 210, 213, 215, 216, 217, 218, 0, - 90, 91, 92, 129, 130, 131, 132, 159, 160, 133, - 134, 135, 136, 137, 138, 0, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 0, 149, 150, 151, - 152, 153, 154, 155, 156, 0, 0, 0, 0, 207, - 0, 0, 207, 0, 0, 0, 178, 197, 180, 0, - 177, 181, 158, 157, 212, 214, 203, 18, 0, 0, + 0, 0, 208, 210, 213, 215, 0, 90, 91, 92, + 129, 130, 131, 132, 159, 160, 133, 134, 135, 136, + 137, 138, 0, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 149, 150, 151, 152, 153, 154, + 155, 156, 0, 0, 0, 0, 207, 0, 0, 207, + 0, 0, 0, 178, 197, 180, 0, 177, 181, 158, + 157, 212, 214, 203, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, - 161, 162, 207, 0, 178, 0, 17, 0, 19, 174, - 0, 178, 0, 0, 178, 0, 0, 186, 0, 180, - 0, 173, 0, 122, 123, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 124, 125, 126, 127, - 128, 0, 184, 0, 0, 177, 182, 0, 0, 0, + 0, 0, 0, 0, 185, 0, 0, 161, 162, 207, + 0, 178, 0, 17, 0, 19, 174, 0, 178, 0, + 0, 178, 0, 0, 186, 0, 180, 0, 173, 0, + 122, 123, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 124, 125, 126, 127, 128, 0, 184, + 0, 0, 177, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 49, 0, 0, 0, 51, - 20, 21, 0, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, - 187, 188, 189, 190, 0, 191, 192, 193, 194, 195, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, - 0, 183, 0, 163, 178, 47, 0, 0, 69, 0, - 70, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 82, 83, 84, 86, 0, 87, 178, 178, 0, 187, - 188, 106, 108, 48, 50, 58, 59, 60, 56, 57, - 0, 0, 0, 0, 107, 109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 165, 178, - 0, 167, 178, 0, 0, 0, 110, 0, 46, 64, - 0, 0, 0, 0, 0, 52, 53, 54, 0, 0, - 0, 81, 80, 85, 0, 0, 0, 0, 0, 0, - 0, 95, 101, 102, 103, 104, 105, 96, 97, 98, - 100, 99, 0, 0, 0, 0, 0, 0, 178, 164, - 71, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 178, 166, 178, 168, 178, 211, - 0, 72, 0, 74, 93, 0, 0, 0, 79, 88, - 89, 0, 0, 178, 0, 178, 0, 178, 0, 0, - 0, 169, 0, 0, 55, 0, 0, 61, 63, 177, - 66, 177, 68, 177, 170, 171, 172, 73, 75, 0, - 77, 0, 0, 0, 0, 0, 0, 62, 65, 67, - 76, 78 + 0, 0, 49, 0, 0, 0, 51, 20, 21, 0, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 0, 0, 0, 187, 188, 189, + 190, 0, 191, 192, 193, 194, 195, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 0, 183, 0, + 163, 178, 47, 0, 0, 69, 0, 70, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 82, 83, 84, + 86, 0, 87, 178, 178, 0, 187, 188, 106, 108, + 48, 50, 58, 59, 60, 56, 57, 0, 0, 0, + 0, 107, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 165, 178, 0, 167, 178, + 0, 0, 0, 110, 0, 46, 64, 0, 0, 0, + 0, 0, 52, 53, 54, 0, 0, 0, 81, 80, + 85, 0, 0, 0, 0, 0, 0, 0, 95, 101, + 102, 103, 104, 105, 96, 97, 98, 100, 99, 0, + 0, 0, 0, 0, 0, 178, 164, 71, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 178, 166, 178, 168, 178, 211, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 178, 0, 178, 0, 178, 0, 0, 0, 169, 0, + 0, 55, 0, 0, 61, 63, 177, 66, 177, 68, + 177, 170, 171, 172, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 62, 65, 67, 76, 78 }; const short parser::yypgoto_[] = { - -269, -269, -269, 273, 319, 321, -269, -269, -269, 163, - -269, -94, 143, -83, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, 190, -269, - -268, -260, -258, -269, -269, -269, -269, -269, -130, -26, - -70, -68, -269, -269, 325, -45, -269, -12, 219, -269, - -269, 245, -269, -269, -269, 252, 300, 335, 369, -269, - -269, 0, 6, -269, -9, -269, -269, -269, 137, -269, - -269 + -261, -261, -261, 321, 323, 324, -261, -261, -261, -183, + -261, -88, 100, -78, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, 187, -261, + -260, -257, -254, -261, -261, -261, -261, -261, -85, -12, + -70, -65, -261, -261, -128, -45, -261, 177, 247, -261, + -261, 257, -261, -261, -261, 275, 332, 359, 365, -261, + -261, 0, 6, -261, 2, -261, -261, -261, 142, -261, + -261 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 209, - 210, 211, 212, 334, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 108, 395, - 237, 238, 239, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 31, 109, 185, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 206, + 207, 208, 209, 331, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 105, 392, + 234, 235, 236, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 31, 106, 182, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 335, 141, 15, 18, - 19, 30, 20, 98, 336, 375, 337, 240, 1, 2, - 3, 4, 5, 101, 25, 32, 21, 96, 34, 35, - 27, 37, 97, 28, 99, 102, 41, 42, 43, 44, - 100, 103, 29, 376, 206, 300, 301, 111, 302, 303, - 26, 144, 207, 208, 16, 6, 269, 240, 263, -207, - 6, 110, 240, 160, 16, 6, 270, 318, 34, 35, - 95, 37, 160, 116, 321, 142, 104, 289, 289, 160, - 147, 143, 240, 369, 138, 16, 6, 139, 160, 378, - 379, 385, 304, 305, 160, 160, 160, 149, 387, 16, - 6, 34, 35, 160, 37, 6, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 138, 277, 145, - 139, 241, 411, 150, 29, 16, 6, 160, 55, 56, - 57, 58, 424, 425, 146, 242, 240, 160, 160, 182, - 134, 135, 136, 426, 289, 186, 335, 249, 160, 114, - 115, 151, 252, 143, 336, 255, 337, 152, 16, 6, - 153, 241, 34, 35, 154, 37, 241, 155, 160, 156, - 41, 42, 43, 44, 140, 242, 141, 161, 206, 144, - 242, 290, 290, 262, 183, 264, 241, 249, 278, 271, - 268, 273, 249, 143, 274, 242, 242, 275, 143, 276, - 242, 132, 133, 134, 135, 136, 281, 249, 249, 280, - 286, 282, 249, 143, 143, 285, 59, 287, 143, 16, - 6, 140, 140, 141, 141, 288, 295, 319, 296, 297, - -187, -187, 298, -187, 299, 105, 322, -187, 112, 113, - 241, 240, 325, 240, 142, 330, -187, 332, 290, -187, - 143, 347, 341, 115, 242, 342, 348, 349, 350, 362, - 364, 368, 242, 370, 366, 372, 249, 384, 140, 386, - 141, 388, 143, 412, 249, 339, 374, 416, 399, 432, - 143, 22, 240, 398, 289, 240, 400, -187, -187, 414, - 417, 142, 142, 418, 420, 422, 159, 143, 143, 433, - 428, 437, 434, 435, 438, 240, 240, 439, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 23, 181, 24, - 266, 429, 0, 0, 279, 0, 0, 0, 142, 0, - 250, 0, 0, 253, 143, 241, 256, 241, 257, 0, - 259, 0, 0, 0, 0, 272, 0, 0, 419, 242, - 421, 242, 423, 0, 0, 0, 243, 119, 120, 0, - 0, 249, 0, 249, 0, 294, 397, 143, 267, 143, - 0, 0, 0, 0, 0, 0, 241, 0, 290, 241, - 0, 284, 244, 132, 133, 134, 135, 136, 0, 245, - 242, 0, 242, 242, 0, 0, 243, 0, 0, 241, - 241, 243, 249, 0, 249, 249, 0, 0, 143, 0, - 143, 143, 0, 242, 242, 0, 243, 243, 0, 294, - 0, 243, 244, 0, 0, 249, 249, 244, 0, 245, - 0, 143, 143, 0, 245, 0, 0, 246, 0, 0, - 326, 0, 291, 292, 0, 0, 0, 244, 0, 245, - 245, 331, 0, 333, 245, 0, 340, -188, -188, 184, - -188, 0, 0, 0, -188, 0, 251, 0, 346, 254, - 0, 0, 247, -188, 0, 243, -188, 246, 0, 0, - 0, 0, 246, 243, 0, 0, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 246, 246, 0, - 0, 244, 246, 0, 367, 0, 248, 0, 245, 338, - 0, 0, 247, 0, -188, -188, 245, 247, 0, 0, - 0, 0, 0, 0, 391, 0, 393, 380, 381, 382, - 383, 0, 247, 247, 0, 0, 0, 247, 0, 0, - 0, 0, 0, 0, 0, 0, 248, 0, 0, 0, - 0, 248, 392, 0, 394, 396, 246, 0, 0, 0, - 0, 0, 0, 0, 246, 427, 248, 248, 430, 0, - 0, 248, 0, 0, -195, -195, 0, -195, 0, 327, - 243, -195, 243, 0, 0, 0, 144, 0, 440, 441, - -195, 247, 0, -195, -207, 0, 431, 0, 0, 247, - 0, 344, 345, 0, 0, 0, 244, 0, 244, 0, - 0, -189, -189, 245, -189, 245, 0, 0, -189, 0, - 0, 243, 0, 243, 243, 248, 0, -189, 0, 0, - -189, -195, -195, 248, 363, 0, 0, 365, 0, 0, - 0, 0, 0, 0, 243, 243, 0, 244, 0, 338, - 244, 0, 0, 0, 245, 0, 245, 245, 0, 0, - 0, 246, 0, 246, 0, 0, 0, 0, -189, -189, - 244, 244, 0, 0, 0, 0, 0, 245, 245, 0, - 119, 120, 0, 390, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 247, 0, 247, 408, - 0, 409, 246, 410, 246, 246, 132, 133, 134, 135, - 136, 0, -190, -190, 0, -190, 0, 0, 0, -190, - 0, 0, 33, 0, 0, 246, 246, 0, -190, 0, - 248, -190, 248, 0, 0, 0, 0, 247, 0, 247, - 247, 0, 0, 0, 0, 0, 34, 35, 36, 37, - 38, 39, 40, 0, 41, 42, 43, 44, 45, 0, - 247, 247, 106, 107, 0, 0, 47, 0, 0, -190, - -190, 248, 0, 248, 248, 0, 0, 0, 0, 0, - 0, 0, 48, 49, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 248, 248, 0, 0, 0, 50, - 0, 0, 51, 16, 6, 29, 52, 53, 54, 55, - 56, 57, 58, 34, 35, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 44, 45, 0, 0, 0, 46, - 0, 0, 0, 47, 0, 283, 34, 35, 0, 37, - 0, -191, -191, 137, -191, 0, 0, 0, -191, 48, - 49, 0, 138, 0, 0, 139, 33, -191, 0, 0, - -191, 0, 0, 0, 0, 0, 50, 0, 0, 51, - 16, 6, 29, 52, 53, 54, 55, 56, 57, 58, - 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, - 43, 44, 45, 16, 6, 0, 46, 0, -191, -191, - 47, 0, 0, -192, -192, 0, -192, 0, -193, -193, - -192, -193, 0, 0, 0, -193, 48, 49, 0, -192, - 0, 0, -192, 33, -193, 0, 0, -193, 0, 0, - 0, 0, 0, 50, 0, 0, 51, 16, 6, 29, - 52, 53, 54, 55, 56, 57, 58, 34, 35, 36, + 15, 107, 137, 17, 17, 145, 269, 138, 15, 18, + 19, 332, 95, 181, 333, 98, 372, 334, 16, 6, + 248, 20, 30, 251, 25, 32, 291, 1, 2, 3, + 4, 5, 274, 266, 96, 99, 111, 112, 29, 21, + 97, 100, 55, 267, 373, 34, 35, 108, 37, 27, + 26, 28, 141, 16, 6, 6, 16, 6, 107, 237, + -207, 135, 93, 260, 136, 29, 315, 94, 157, 301, + 302, 157, 139, 92, 318, 101, 366, 375, 140, 157, + 291, 157, 157, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 146, 376, 382, 113, 142, 237, + 157, 157, 16, 6, 237, 384, -195, -195, 143, -195, + 157, 116, 117, -195, 6, 144, 408, 148, 141, 286, + 286, 157, -195, 421, 237, -195, -207, 147, 157, 422, + 423, 150, 238, 324, 157, 157, 179, 129, 130, 131, + 132, 133, 183, 149, 246, 131, 132, 133, 151, 249, + 140, 332, 252, 152, 333, 341, 342, 334, 153, 34, + 35, 157, 37, -195, -195, 158, 141, 41, 42, 43, + 44, 137, 238, 180, 261, 203, 138, 238, 237, 265, + 259, 268, 270, 271, 246, 388, 286, 390, 360, 246, + 140, 362, 287, 287, 272, 140, 275, 238, 129, 130, + 131, 132, 133, 273, 246, 246, 277, 283, 278, 246, + 140, 140, 279, 56, 282, 140, 16, 6, 137, 137, + 284, 285, 292, 138, 138, 293, 424, 316, 294, 427, + 319, 322, 102, 295, 296, 109, 110, 387, 327, 329, + 112, 139, 34, 35, 338, 37, 344, 140, 339, 437, + 438, 238, 345, 405, 359, 406, 346, 407, 135, 287, + 347, 136, 361, 246, 363, 137, 365, 369, 367, 140, + 138, 246, 336, 371, 381, 383, 385, 140, 396, 397, + 409, 411, 413, 237, 263, 237, 395, 414, 139, 139, + 156, 415, 417, 419, 140, 140, 425, 429, 430, 16, + 6, 431, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 239, 178, 432, 237, 434, 286, 237, 435, 22, + 436, 23, 24, 426, 247, 139, 276, 250, 0, 0, + 253, 140, 254, 0, 256, 0, 0, 237, 237, 0, + 0, 0, 0, 0, 0, 416, 238, 418, 238, 420, + 0, 239, 0, 0, 0, 0, 239, 0, 246, 0, + 246, 0, 264, 394, 140, 0, 140, -187, -187, 0, + -187, 239, 239, 0, -187, 281, 239, 0, 0, 0, + 0, 240, 0, -187, 0, 0, -187, 238, 0, 287, + 238, 241, 0, 0, 0, 0, 0, 0, 0, 246, + 0, 246, 246, 0, 0, 140, 0, 140, 140, 242, + 238, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 240, 246, 246, -187, -187, 240, 0, 140, 140, + 239, 241, 0, 0, 323, 0, 241, 0, 239, 0, + 0, 240, 240, 0, 0, 328, 240, 330, 0, 242, + 337, 288, 289, 0, 242, 0, 241, -188, -188, 0, + -188, 0, 343, 0, -188, 0, 243, 0, 0, 242, + 242, 0, 0, -188, 242, 0, -188, 0, 0, 0, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 0, 0, 244, 0, 0, 0, 0, 364, 245, + 240, 0, 0, 0, 0, 0, 243, 0, 240, 0, + 241, 243, 0, 0, -188, -188, 0, 0, 335, 0, + 0, 377, 378, 379, 380, 0, 243, 243, 242, 0, + 0, 243, 0, 244, 0, 239, 242, 239, 244, 245, + 0, 0, 0, 0, 245, 0, 389, 0, 391, 393, + 0, 0, 0, 244, 244, 0, 0, 0, 244, 245, + 245, 0, 0, 0, 245, 0, 0, 0, 0, 0, + 0, 0, 34, 35, 0, 37, 239, 0, 239, 239, + 41, 42, 43, 44, 0, 243, 0, 0, 203, 0, + 428, 0, 0, 243, 0, 0, 204, 205, 0, 239, + 239, 0, 0, -189, -189, 240, -189, 240, 0, 0, + -189, 0, 244, 0, 0, 241, 0, 241, 245, -189, + 244, 0, -189, 0, 0, 0, 245, 0, 0, 16, + 6, -190, -190, 242, -190, 242, 34, 35, -190, 37, + 0, 0, 0, 134, 0, 0, 240, -190, 240, 240, + -190, 0, 135, 0, 0, 136, 241, 0, 335, 241, + -189, -189, 0, 0, 0, 0, 0, 0, 0, 240, + 240, 0, 0, 0, 242, 0, 242, 242, 0, 241, + 241, 0, 297, 298, 0, 299, 300, 0, -190, -190, + 243, 0, 243, 16, 6, 0, 0, 242, 242, 0, + 0, 0, 0, 0, 0, 34, 35, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 244, 0, 244, + 0, 135, 0, 245, 136, 245, 0, 0, 0, 301, + 302, 243, 0, 243, 243, 0, 0, 0, 0, 0, + 0, 0, 0, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 243, 243, 0, 0, 244, 0, + 244, 244, 16, 6, 245, 0, 245, 245, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, + 0, 244, 244, 0, 0, 0, 185, 245, 245, 186, + 187, 188, 0, 189, 190, 191, 192, 0, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 34, 35, 0, + 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, + 0, 144, 202, 203, 0, 0, 0, 0, 0, 184, + 262, 204, 205, 0, 0, 0, 0, 185, 0, 0, + 186, 187, 188, 0, 189, 190, 191, 192, 0, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 34, 35, + 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, + -191, -191, 144, -191, 203, 0, 0, -191, 0, 0, + 184, 0, 204, 205, 0, 0, -191, 0, 185, -191, + 0, 186, 187, 188, 0, 189, 190, 191, 192, 0, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 34, + 35, 0, 37, 0, 0, 16, 6, 41, 42, 43, + 44, 0, 0, 144, 290, 203, 0, -191, -191, 0, + 0, 184, 325, 204, 205, 0, 0, 0, 0, 185, + 0, 0, 186, 187, 188, 0, 189, 190, 191, 192, + 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 34, 35, 0, 37, 0, 0, 16, 6, 41, 42, + 43, 44, -192, -192, 144, -192, 203, 0, 0, -192, + 0, 0, 184, 0, 204, 205, 0, 0, -192, 0, + 185, -192, 0, 186, 187, 188, 0, 189, 190, 191, + 192, 0, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 34, 35, 33, 37, 0, 0, 16, 6, 41, + 42, 43, 44, 0, 0, 144, 0, 203, 0, -192, + -192, 0, 0, 0, 0, 204, 205, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, - -192, -192, 0, 106, 0, -193, -193, 47, 119, 120, - 0, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 48, 49, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 0, + 321, 0, 0, 103, 104, 115, 0, 47, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 16, 6, + 0, 0, 0, 48, 49, 0, 0, 33, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, - 55, 56, 57, 58, 187, 0, 0, 0, 0, 0, - 0, 0, 188, 0, 0, 189, 190, 191, 0, 192, - 193, 194, 195, 0, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 34, 35, 0, 37, 0, 0, 0, - 0, 41, 42, 43, 44, 0, 0, 147, 205, 206, - 0, 0, 0, 0, 0, 187, 265, 207, 208, 0, - 0, 0, 0, 188, 0, 0, 189, 190, 191, 0, - 192, 193, 194, 195, 0, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 34, 35, 0, 37, 0, 0, - 16, 6, 41, 42, 43, 44, -194, -194, 147, -194, - 206, 0, 0, -194, 0, 0, 187, 0, 207, 208, - 0, 0, -194, 0, 188, -194, 0, 189, 190, 191, - 0, 192, 193, 194, 195, 0, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 34, 35, 0, 37, 0, - 0, 16, 6, 41, 42, 43, 44, 0, 0, 147, - 293, 206, 0, -194, -194, 0, 0, 187, 328, 207, - 208, 0, 0, 0, 0, 188, 0, 0, 189, 190, - 191, 0, 192, 193, 194, 195, 0, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 34, 35, 0, 37, - 0, 0, 16, 6, 41, 42, 43, 44, 0, 0, - 147, 0, 206, 0, 0, 0, 0, 0, 187, 0, - 207, 208, 0, 0, 0, 0, 188, 0, 0, 189, - 190, 191, 0, 192, 193, 194, 195, 0, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 34, 35, 0, - 37, 0, 0, 16, 6, 41, 42, 43, 44, 0, - 0, 147, 0, 206, 0, 0, 0, 0, 0, 0, - 0, 207, 208, 34, 35, 0, 37, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, - 0, 0, 139, 0, 0, 0, 0, 304, 305, 0, - 0, 0, 0, 0, 16, 6, 0, 0, 0, 0, - 0, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 157, 0, 0, 0, 0, 158, 0, 0, - 16, 6, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 402, 0, 0, 0, - 0, 403, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, + 0, 47, 0, 280, 0, 0, -193, -193, 0, -193, + 0, 0, 0, -193, 0, 0, 0, 48, 49, 0, + 0, 33, -193, 0, 0, -193, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 46, 0, -193, -193, 47, 0, 0, 0, 0, + -194, -194, 0, -194, 0, 0, 0, -194, 0, 0, + 0, 48, 49, 0, 0, 33, -194, 0, 0, -194, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 34, + 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, + 44, 45, 0, 0, 0, 103, 0, -194, -194, 47, + 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, + 0, 0, 155, 0, 0, 48, 49, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 50, 0, 0, 51, 16, 6, 29, 52, + 53, 54, 55, 126, 127, 128, 129, 130, 131, 132, + 133, 399, 0, 0, 0, 0, 400, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 401, 0, 0, 0, 0, + 402, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 404, 0, 0, 0, 0, 405, 0, 0, 0, 0, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 406, 0, 0, 0, 0, 407, - 0, 0, 0, 0, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 371, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 373, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 377, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 403, + 0, 0, 0, 0, 404, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 368, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 370, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 389, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 401, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 436, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 374, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 386, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 410, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 433, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 255, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 258, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 314, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 317, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 320, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 257, 0, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 261, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 114, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 126, 127, + 128, 129, 130, 131, 132, 133, 326, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 317, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 320, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 323, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 324, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 260, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 117, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 329, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 343, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 0, 0, 0, 0, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 0, 0, 0, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 0, 0, - 125, 126, 127, 128, 0, 0, 0, 0, 130, 0, - 132, 133, 134, 135, 136, 0, 0, 0, 0, 0, - 132, 133, 134, 135, 136 + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 340, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 116, + 117, 0, 119, 120, 121, 122, 123, 124, 125, 116, + 117, 0, 0, 120, 121, 122, 123, 124, 125, 0, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 127, 128, 129, 130, 131, 132, + 133, 0, 0, 0, 127, 0, 129, 130, 131, 132, + 133, 116, 117, 0, 0, 120, 121, 122, 123, 124, + 125, 116, 117, 0, 0, 0, 0, 122, 123, 124, + 125, 0, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 274, 75, 8, 3, - 4, 20, 44, 48, 274, 22, 274, 147, 3, 4, - 5, 6, 7, 48, 44, 25, 0, 45, 32, 33, - 54, 35, 50, 54, 34, 35, 40, 41, 42, 43, - 34, 35, 91, 50, 48, 9, 10, 47, 12, 13, - 70, 44, 56, 57, 89, 90, 44, 187, 45, 52, - 90, 106, 192, 50, 89, 90, 54, 45, 32, 33, - 45, 35, 50, 90, 45, 75, 48, 207, 208, 50, - 46, 75, 212, 45, 48, 89, 90, 51, 50, 45, - 45, 45, 56, 57, 50, 50, 50, 97, 45, 89, - 90, 32, 33, 50, 35, 90, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 85, 52, - 51, 147, 45, 48, 91, 89, 90, 50, 95, 96, - 97, 98, 45, 45, 54, 147, 266, 50, 50, 139, - 86, 87, 88, 45, 274, 145, 414, 147, 50, 94, - 95, 44, 152, 147, 414, 155, 414, 52, 89, 90, - 48, 187, 32, 33, 44, 35, 192, 52, 50, 48, - 40, 41, 42, 43, 244, 187, 244, 49, 48, 44, - 192, 207, 208, 183, 52, 44, 212, 187, 197, 44, - 54, 44, 192, 187, 44, 207, 208, 44, 192, 44, - 212, 84, 85, 86, 87, 88, 54, 207, 208, 53, - 44, 54, 212, 207, 208, 54, 26, 44, 212, 89, - 90, 291, 292, 291, 292, 48, 54, 44, 54, 54, - 32, 33, 54, 35, 54, 45, 44, 39, 48, 49, - 266, 371, 49, 373, 244, 45, 48, 19, 274, 51, - 244, 44, 53, 95, 266, 53, 44, 44, 44, 49, - 49, 44, 274, 54, 49, 44, 266, 44, 338, 44, - 338, 44, 266, 17, 274, 275, 54, 22, 54, 45, - 274, 8, 412, 377, 414, 415, 54, 89, 90, 54, - 54, 291, 292, 54, 54, 54, 106, 291, 292, 45, - 54, 54, 45, 45, 54, 435, 436, 54, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 8, 138, 8, - 187, 414, -1, -1, 197, -1, -1, -1, 338, -1, - 150, -1, -1, 153, 338, 371, 156, 373, 158, -1, - 160, -1, -1, -1, -1, 192, -1, -1, 403, 371, - 405, 373, 407, -1, -1, -1, 147, 58, 59, -1, - -1, 371, -1, 373, -1, 212, 376, 371, 188, 373, - -1, -1, -1, -1, -1, -1, 412, -1, 414, 415, - -1, 201, 147, 84, 85, 86, 87, 88, -1, 147, - 412, -1, 414, 415, -1, -1, 187, -1, -1, 435, - 436, 192, 412, -1, 414, 415, -1, -1, 412, -1, - 414, 415, -1, 435, 436, -1, 207, 208, -1, 266, - -1, 212, 187, -1, -1, 435, 436, 192, -1, 187, - -1, 435, 436, -1, 192, -1, -1, 147, -1, -1, - 260, -1, 207, 208, -1, -1, -1, 212, -1, 207, - 208, 271, -1, 273, 212, -1, 276, 32, 33, 144, - 35, -1, -1, -1, 39, -1, 151, -1, 288, 154, - -1, -1, 147, 48, -1, 266, 51, 187, -1, -1, - -1, -1, 192, 274, -1, -1, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 207, 208, -1, - -1, 266, 212, -1, 324, -1, 147, -1, 266, 274, - -1, -1, 187, -1, 89, 90, 274, 192, -1, -1, - -1, -1, -1, -1, 371, -1, 373, 347, 348, 349, - 350, -1, 207, 208, -1, -1, -1, 212, -1, -1, - -1, -1, -1, -1, -1, -1, 187, -1, -1, -1, - -1, 192, 372, -1, 374, 375, 266, -1, -1, -1, - -1, -1, -1, -1, 274, 412, 207, 208, 415, -1, - -1, 212, -1, -1, 32, 33, -1, 35, -1, 264, - 371, 39, 373, -1, -1, -1, 44, -1, 435, 436, - 48, 266, -1, 51, 52, -1, 416, -1, -1, 274, - -1, 286, 287, -1, -1, -1, 371, -1, 373, -1, - -1, 32, 33, 371, 35, 373, -1, -1, 39, -1, - -1, 412, -1, 414, 415, 266, -1, 48, -1, -1, - 51, 89, 90, 274, 319, -1, -1, 322, -1, -1, - -1, -1, -1, -1, 435, 436, -1, 412, -1, 414, - 415, -1, -1, -1, 412, -1, 414, 415, -1, -1, - -1, 371, -1, 373, -1, -1, -1, -1, 89, 90, - 435, 436, -1, -1, -1, -1, -1, 435, 436, -1, - 58, 59, -1, 368, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, -1, -1, 371, -1, 373, 384, - -1, 386, 412, 388, 414, 415, 84, 85, 86, 87, - 88, -1, 32, 33, -1, 35, -1, -1, -1, 39, - -1, -1, 8, -1, -1, 435, 436, -1, 48, -1, - 371, 51, 373, -1, -1, -1, -1, 412, -1, 414, - 415, -1, -1, -1, -1, -1, 32, 33, 34, 35, - 36, 37, 38, -1, 40, 41, 42, 43, 44, -1, - 435, 436, 48, 49, -1, -1, 52, -1, -1, 89, - 90, 412, -1, 414, 415, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, -1, -1, -1, -1, 8, - -1, -1, -1, -1, 435, 436, -1, -1, -1, 85, - -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 32, 33, 34, 35, 36, 37, 38, - -1, 40, 41, 42, 43, 44, -1, -1, -1, 48, - -1, -1, -1, 52, -1, 54, 32, 33, -1, 35, - -1, 32, 33, 39, 35, -1, -1, -1, 39, 68, - 69, -1, 48, -1, -1, 51, 8, 48, -1, -1, - 51, -1, -1, -1, -1, -1, 85, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, 89, 90, -1, 48, -1, 89, 90, - 52, -1, -1, 32, 33, -1, 35, -1, 32, 33, - 39, 35, -1, -1, -1, 39, 68, 69, -1, 48, - -1, -1, 51, 8, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 32, 33, 34, - 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, - 89, 90, -1, 48, -1, 89, 90, 52, 58, 59, - -1, 61, 62, 63, 64, 65, 66, 67, -1, -1, - -1, -1, -1, 68, 69, -1, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, - 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 3, -1, -1, -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, -1, - -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, - -1, -1, -1, -1, -1, 3, 4, 56, 57, -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, - 89, 90, 40, 41, 42, 43, 32, 33, 46, 35, - 48, -1, -1, 39, -1, -1, 3, -1, 56, 57, - -1, -1, 48, -1, 11, 51, -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, 89, 90, 40, 41, 42, 43, -1, -1, 46, - 47, 48, -1, 89, 90, -1, -1, 3, 4, 56, - 57, -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, 89, 90, 40, 41, 42, 43, -1, -1, - 46, -1, 48, -1, -1, -1, -1, -1, 3, -1, - 56, 57, -1, -1, -1, -1, 11, -1, -1, 14, + 0, 46, 72, 3, 4, 93, 189, 72, 8, 3, + 4, 271, 48, 141, 271, 48, 22, 271, 89, 90, + 148, 44, 20, 151, 44, 25, 209, 3, 4, 5, + 6, 7, 85, 44, 34, 35, 94, 95, 91, 0, + 34, 35, 95, 54, 50, 32, 33, 47, 35, 54, + 70, 54, 44, 89, 90, 90, 89, 90, 103, 144, + 52, 48, 45, 45, 51, 91, 45, 50, 50, 56, + 57, 50, 72, 45, 45, 48, 45, 45, 72, 50, + 263, 50, 50, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 94, 45, 45, 90, 52, 184, + 50, 50, 89, 90, 189, 45, 32, 33, 54, 35, + 50, 58, 59, 39, 90, 46, 45, 44, 44, 204, + 205, 50, 48, 45, 209, 51, 52, 48, 50, 45, + 45, 48, 144, 261, 50, 50, 136, 84, 85, 86, + 87, 88, 142, 52, 144, 86, 87, 88, 44, 149, + 144, 411, 152, 52, 411, 283, 284, 411, 48, 32, + 33, 50, 35, 89, 90, 49, 44, 40, 41, 42, + 43, 241, 184, 52, 44, 48, 241, 189, 263, 54, + 180, 44, 44, 44, 184, 368, 271, 370, 316, 189, + 184, 319, 204, 205, 44, 189, 194, 209, 84, 85, + 86, 87, 88, 44, 204, 205, 53, 44, 54, 209, + 204, 205, 54, 26, 54, 209, 89, 90, 288, 289, + 44, 48, 54, 288, 289, 54, 409, 44, 54, 412, + 44, 49, 45, 54, 54, 48, 49, 365, 45, 19, + 95, 241, 32, 33, 53, 35, 44, 241, 53, 432, + 433, 263, 44, 381, 49, 383, 44, 385, 48, 271, + 44, 51, 49, 263, 49, 335, 44, 44, 54, 263, + 335, 271, 272, 54, 44, 44, 44, 271, 54, 54, + 17, 54, 22, 368, 184, 370, 374, 54, 288, 289, + 103, 54, 54, 54, 288, 289, 54, 45, 45, 89, + 90, 45, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 144, 135, 45, 409, 54, 411, 412, 54, 8, + 54, 8, 8, 411, 147, 335, 194, 150, -1, -1, + 153, 335, 155, -1, 157, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 400, 368, 402, 370, 404, + -1, 184, -1, -1, -1, -1, 189, -1, 368, -1, + 370, -1, 185, 373, 368, -1, 370, 32, 33, -1, + 35, 204, 205, -1, 39, 198, 209, -1, -1, -1, + -1, 144, -1, 48, -1, -1, 51, 409, -1, 411, + 412, 144, -1, -1, -1, -1, -1, -1, -1, 409, + -1, 411, 412, -1, -1, 409, -1, 411, 412, 144, + 432, 433, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 184, 432, 433, 89, 90, 189, -1, 432, 433, + 263, 184, -1, -1, 257, -1, 189, -1, 271, -1, + -1, 204, 205, -1, -1, 268, 209, 270, -1, 184, + 273, 204, 205, -1, 189, -1, 209, 32, 33, -1, + 35, -1, 285, -1, 39, -1, 144, -1, -1, 204, + 205, -1, -1, 48, 209, -1, 51, -1, -1, -1, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, -1, -1, 144, -1, -1, -1, -1, 321, 144, + 263, -1, -1, -1, -1, -1, 184, -1, 271, -1, + 263, 189, -1, -1, 89, 90, -1, -1, 271, -1, + -1, 344, 345, 346, 347, -1, 204, 205, 263, -1, + -1, 209, -1, 184, -1, 368, 271, 370, 189, 184, + -1, -1, -1, -1, 189, -1, 369, -1, 371, 372, + -1, -1, -1, 204, 205, -1, -1, -1, 209, 204, + 205, -1, -1, -1, 209, -1, -1, -1, -1, -1, + -1, -1, 32, 33, -1, 35, 409, -1, 411, 412, + 40, 41, 42, 43, -1, 263, -1, -1, 48, -1, + 413, -1, -1, 271, -1, -1, 56, 57, -1, 432, + 433, -1, -1, 32, 33, 368, 35, 370, -1, -1, + 39, -1, 263, -1, -1, 368, -1, 370, 263, 48, + 271, -1, 51, -1, -1, -1, 271, -1, -1, 89, + 90, 32, 33, 368, 35, 370, 32, 33, 39, 35, + -1, -1, -1, 39, -1, -1, 409, 48, 411, 412, + 51, -1, 48, -1, -1, 51, 409, -1, 411, 412, + 89, 90, -1, -1, -1, -1, -1, -1, -1, 432, + 433, -1, -1, -1, 409, -1, 411, 412, -1, 432, + 433, -1, 9, 10, -1, 12, 13, -1, 89, 90, + 368, -1, 370, 89, 90, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 48, -1, 368, 51, 370, -1, -1, -1, 56, + 57, 409, -1, 411, 412, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 432, 433, -1, -1, 409, -1, + 411, 412, 89, 90, 409, -1, 411, 412, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, + -1, 432, 433, -1, -1, -1, 11, 432, 433, 14, 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, 89, 90, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - -1, 56, 57, 32, 33, -1, 35, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, - -1, -1, 51, -1, -1, -1, -1, 56, 57, -1, - -1, -1, -1, -1, 89, 90, -1, -1, -1, -1, - -1, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 45, -1, -1, -1, -1, 50, -1, -1, - 89, 90, 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, -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, -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, - 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, + 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, + -1, 46, 47, 48, -1, -1, -1, -1, -1, 3, + 4, 56, 57, -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, 89, 90, 40, 41, 42, 43, + 32, 33, 46, 35, 48, -1, -1, 39, -1, -1, + 3, -1, 56, 57, -1, -1, 48, -1, 11, 51, + -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, 89, 90, 40, 41, 42, + 43, -1, -1, 46, 47, 48, -1, 89, 90, -1, + -1, 3, 4, 56, 57, -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, 89, 90, 40, 41, + 42, 43, 32, 33, 46, 35, 48, -1, -1, 39, + -1, -1, 3, -1, 56, 57, -1, -1, 48, -1, + 11, 51, -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, 89, 90, 40, + 41, 42, 43, -1, -1, 46, -1, 48, -1, 89, + 90, -1, -1, -1, -1, 56, 57, 32, 33, 34, + 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, + 50, -1, -1, 48, 49, 55, -1, 52, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 89, 90, + -1, -1, -1, 68, 69, -1, -1, 8, -1, -1, + -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, + 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 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, 32, 33, -1, 35, + -1, -1, -1, 39, -1, -1, -1, 68, 69, -1, + -1, 8, 48, -1, -1, 51, -1, -1, -1, -1, + -1, -1, -1, -1, 85, -1, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 32, 33, 34, 35, 36, + 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, + -1, 48, -1, 89, 90, 52, -1, -1, -1, -1, + 32, 33, -1, 35, -1, -1, -1, 39, -1, -1, + -1, 68, 69, -1, -1, 8, 48, -1, -1, 51, + -1, -1, -1, -1, -1, -1, -1, -1, 85, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 32, + 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, + 43, 44, -1, -1, -1, 48, -1, 89, 90, 52, + -1, -1, -1, -1, -1, -1, -1, 45, -1, -1, + -1, -1, 50, -1, -1, 68, 69, 55, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, 85, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 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, 54, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 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, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 54, 55, -1, -1, 58, 59, 60, 61, 62, 63, + -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, -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, 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, -1, 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, -1, 82, 83, 84, - 85, 86, 87, 88, 58, 59, -1, -1, 62, 63, - 64, 65, 66, 67, 58, 59, -1, -1, -1, -1, - 64, 65, 66, 67, -1, -1, -1, -1, 82, -1, - 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, - 84, 85, 86, 87, 88 + 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, 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, 53, -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, 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, -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, 58, 59, -1, -1, -1, -1, 64, 65, 66, + 67, -1, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 109, 110, 111, - 112, 113, 114, 115, 116, 179, 89, 179, 180, 180, - 44, 0, 111, 112, 113, 44, 70, 54, 54, 91, - 182, 161, 179, 8, 32, 33, 34, 35, 36, 37, + 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, + 109, 110, 111, 112, 113, 176, 89, 176, 177, 177, + 44, 0, 108, 109, 110, 44, 70, 54, 54, 91, + 179, 158, 176, 8, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 92, 93, 94, 95, 96, 97, 98, 146, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 85, 88, 92, 93, 94, 95, 143, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 161, 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, 187, 188, 45, 45, 50, 48, 179, - 180, 48, 179, 180, 48, 146, 48, 49, 146, 162, - 163, 179, 146, 146, 94, 95, 90, 54, 55, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 81, - 82, 83, 84, 85, 86, 87, 88, 39, 48, 51, - 158, 159, 179, 180, 44, 52, 54, 46, 119, 179, - 48, 44, 52, 48, 44, 52, 48, 45, 50, 146, - 50, 49, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 179, 52, 162, 163, 179, 3, 11, 14, - 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 47, 48, 56, 57, 117, - 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, + 184, 185, 45, 45, 50, 48, 176, 177, 48, 176, + 177, 48, 143, 48, 49, 143, 159, 160, 176, 143, + 143, 94, 95, 90, 54, 55, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, + 85, 86, 87, 88, 39, 48, 51, 155, 156, 176, + 177, 44, 52, 54, 46, 116, 176, 48, 44, 52, + 48, 44, 52, 48, 45, 50, 143, 50, 49, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 176, + 52, 159, 160, 176, 3, 11, 14, 15, 16, 18, + 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 47, 48, 56, 57, 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, 142, 143, 144, 145, 148, 149, 150, - 156, 157, 165, 166, 169, 173, 174, 175, 176, 179, - 146, 162, 179, 146, 162, 179, 146, 146, 49, 146, - 53, 49, 179, 45, 44, 4, 120, 146, 54, 44, - 54, 44, 117, 44, 44, 44, 44, 85, 182, 186, - 53, 54, 54, 54, 146, 54, 44, 44, 48, 156, - 157, 169, 169, 47, 117, 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, 146, 162, 4, 54, - 45, 146, 19, 146, 121, 148, 149, 150, 169, 179, - 146, 53, 53, 54, 162, 162, 146, 44, 44, 44, - 44, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 49, 162, 49, 162, 49, 146, 44, 45, - 54, 45, 44, 45, 54, 22, 50, 45, 45, 45, - 146, 146, 146, 146, 44, 45, 44, 45, 44, 45, - 162, 117, 146, 117, 146, 147, 146, 179, 119, 54, - 54, 45, 45, 50, 45, 50, 45, 50, 162, 162, - 162, 45, 17, 45, 54, 45, 22, 54, 54, 163, - 54, 163, 54, 163, 45, 45, 45, 117, 54, 121, - 117, 146, 45, 45, 45, 45, 45, 54, 54, 54, - 117, 117 + 139, 140, 141, 142, 145, 146, 147, 153, 154, 162, + 163, 166, 170, 171, 172, 173, 176, 143, 159, 176, + 143, 159, 176, 143, 143, 49, 143, 53, 49, 176, + 45, 44, 4, 117, 143, 54, 44, 54, 44, 114, + 44, 44, 44, 44, 85, 179, 183, 53, 54, 54, + 54, 143, 54, 44, 44, 48, 153, 154, 166, 166, + 47, 114, 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, 143, 159, 4, 54, 45, 143, 19, + 143, 118, 145, 146, 147, 166, 176, 143, 53, 53, + 54, 159, 159, 143, 44, 44, 44, 44, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 49, + 159, 49, 159, 49, 143, 44, 45, 54, 45, 44, + 45, 54, 22, 50, 45, 45, 45, 143, 143, 143, + 143, 44, 45, 44, 45, 44, 45, 159, 114, 143, + 114, 143, 144, 143, 176, 116, 54, 54, 45, 45, + 50, 45, 50, 45, 50, 159, 159, 159, 45, 17, + 45, 54, 45, 22, 54, 54, 160, 54, 160, 54, + 160, 45, 45, 45, 114, 54, 118, 114, 143, 45, + 45, 45, 45, 45, 54, 54, 54, 114, 114 }; 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, 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, 164, 165, 166, 167, 168, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 180, 181, 182, - 183, 184, 185, 185, 186, 186, 186, 186, 186, 187, - 188 + 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, 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, 127, 128, 129, 130, 131, 132, 133, 133, 134, + 135, 135, 136, 137, 138, 139, 139, 140, 141, 142, + 143, 143, 143, 144, 144, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 146, 146, 147, 147, + 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 151, 152, 153, + 153, 154, 154, 155, 155, 155, 155, 155, 155, 156, + 156, 156, 156, 157, 158, 158, 158, 159, 159, 160, + 160, 161, 161, 162, 163, 164, 165, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 177, 178, 179, + 180, 181, 182, 182, 183, 183, 184, 185 }; const signed char @@ -4486,8 +4436,7 @@ namespace xsk { namespace gsc { namespace s1 { 1, 2, 3, 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 7, 2, 1, 2, 1, 1, 1, 1, 1, - 1 + 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4497,29 +4446,28 @@ namespace xsk { namespace gsc { namespace s1 { const short parser::yyrline_[] = { - 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, 718, 723, 728, 729, 730, - 731, 732, 733, 734, 735, 736, 740, 745, 750, 755, - 760, 765, 770, 775, 780, 785, 790, 792, 797, 802, - 807, 812, 817, 819, 824, 826, 828, 830, 832, 837, - 842 + 0, 251, 251, 252, 256, 258, 260, 262, 264, 266, + 271, 275, 280, 281, 282, 283, 284, 288, 293, 298, + 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, 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, 414, 419, 424, 429, 434, 439, 444, 446, 451, + 456, 458, 463, 468, 473, 478, 480, 485, 490, 495, + 500, 501, 502, 506, 507, 511, 513, 515, 517, 519, + 521, 523, 525, 527, 529, 531, 536, 538, 543, 545, + 550, 555, 557, 559, 561, 563, 565, 567, 569, 571, + 573, 575, 577, 579, 581, 583, 585, 587, 589, 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, 625, 630, 635, + 636, 639, 640, 644, 646, 648, 650, 652, 654, 659, + 661, 663, 665, 670, 675, 677, 680, 684, 687, 691, + 693, 698, 700, 705, 710, 715, 720, 725, 726, 727, + 728, 729, 730, 731, 732, 733, 737, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 789, 794, 799, + 804, 809, 814, 816, 821, 823, 828, 833 }; void @@ -4552,9 +4500,9 @@ namespace xsk { namespace gsc { namespace s1 { #line 13 "parser.ypp" } } } // xsk::gsc::s1 -#line 4556 "parser.cpp" +#line 4504 "parser.cpp" -#line 846 "parser.ypp" +#line 837 "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 8a69b08..c081ed1 100644 --- a/src/s1/xsk/parser.hpp +++ b/src/s1/xsk/parser.hpp @@ -624,10 +624,7 @@ namespace xsk { namespace gsc { namespace s1 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy67[sizeof (std::string)]; }; @@ -772,19 +769,16 @@ namespace xsk { namespace gsc { namespace s1 { ISTRING = 92, // "localized string" COLOR = 93, // "color" FLOAT = 94, // "float" - INT_DEC = 95, // "int" - INT_OCT = 96, // "octal int" - INT_BIN = 97, // "binary int" - INT_HEX = 98, // "hexadecimal int" - 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 + 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 }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -801,7 +795,7 @@ namespace xsk { namespace gsc { namespace s1 { { enum symbol_kind_type { - YYNTOKENS = 108, ///< Number of tokens. + YYNTOKENS = 105, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -898,100 +892,97 @@ namespace xsk { namespace gsc { namespace s1 { S_ISTRING = 92, // "localized string" S_COLOR = 93, // "color" S_FLOAT = 94, // "float" - S_INT_DEC = 95, // "int" - S_INT_OCT = 96, // "octal int" - S_INT_BIN = 97, // "binary int" - S_INT_HEX = 98, // "hexadecimal int" - 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_reference = 164, // expr_reference - S_expr_array = 165, // expr_array - S_expr_field = 166, // expr_field - S_expr_size = 167, // expr_size - S_expr_paren = 168, // expr_paren - S_expr_object = 169, // expr_object - S_expr_thisthread = 170, // expr_thisthread - S_expr_empty_array = 171, // expr_empty_array - S_expr_undefined = 172, // expr_undefined - S_expr_game = 173, // expr_game - S_expr_self = 174, // expr_self - S_expr_anim = 175, // expr_anim - S_expr_level = 176, // expr_level - S_expr_animation = 177, // expr_animation - S_expr_animtree = 178, // expr_animtree - S_expr_identifier = 179, // expr_identifier - S_expr_path = 180, // expr_path - S_expr_istring = 181, // expr_istring - S_expr_string = 182, // expr_string - S_expr_color = 183, // expr_color - S_expr_vector = 184, // expr_vector - S_expr_float = 185, // expr_float - S_expr_integer = 186, // expr_integer - S_expr_false = 187, // expr_false - S_expr_true = 188 // expr_true + 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_waitframe = 127, // stmt_waitframe + S_stmt_if = 128, // stmt_if + S_stmt_ifelse = 129, // stmt_ifelse + S_stmt_while = 130, // stmt_while + S_stmt_dowhile = 131, // stmt_dowhile + S_stmt_for = 132, // stmt_for + S_stmt_foreach = 133, // stmt_foreach + S_stmt_switch = 134, // stmt_switch + S_stmt_case = 135, // stmt_case + S_stmt_default = 136, // stmt_default + S_stmt_break = 137, // stmt_break + S_stmt_continue = 138, // stmt_continue + S_stmt_return = 139, // stmt_return + S_stmt_breakpoint = 140, // stmt_breakpoint + S_stmt_prof_begin = 141, // stmt_prof_begin + S_stmt_prof_end = 142, // stmt_prof_end + S_expr = 143, // expr + S_expr_or_empty = 144, // expr_or_empty + S_expr_assign = 145, // expr_assign + S_expr_increment = 146, // expr_increment + S_expr_decrement = 147, // expr_decrement + S_expr_ternary = 148, // expr_ternary + S_expr_binary = 149, // expr_binary + S_expr_primitive = 150, // expr_primitive + S_expr_complement = 151, // expr_complement + S_expr_not = 152, // expr_not + S_expr_call = 153, // expr_call + S_expr_method = 154, // expr_method + S_expr_function = 155, // expr_function + S_expr_pointer = 156, // expr_pointer + S_expr_add_array = 157, // expr_add_array + S_expr_parameters = 158, // expr_parameters + S_expr_arguments = 159, // expr_arguments + S_expr_arguments_no_empty = 160, // expr_arguments_no_empty + S_expr_reference = 161, // expr_reference + S_expr_array = 162, // expr_array + S_expr_field = 163, // expr_field + S_expr_size = 164, // expr_size + S_expr_paren = 165, // expr_paren + S_expr_object = 166, // expr_object + S_expr_thisthread = 167, // expr_thisthread + S_expr_empty_array = 168, // expr_empty_array + S_expr_undefined = 169, // expr_undefined + S_expr_game = 170, // expr_game + S_expr_self = 171, // expr_self + S_expr_anim = 172, // expr_anim + S_expr_level = 173, // expr_level + S_expr_animation = 174, // expr_animation + S_expr_animtree = 175, // expr_animtree + S_expr_identifier = 176, // expr_identifier + S_expr_path = 177, // expr_path + S_expr_istring = 178, // expr_istring + S_expr_string = 179, // expr_string + S_expr_color = 180, // expr_color + S_expr_vector = 181, // expr_vector + S_expr_float = 182, // expr_float + S_expr_integer = 183, // expr_integer + S_expr_false = 184, // expr_false + S_expr_true = 185 // expr_true }; }; @@ -1310,10 +1301,7 @@ namespace xsk { namespace gsc { namespace s1 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2582,10 +2570,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2695,7 +2680,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - S1_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + S1_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4173,61 +4158,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4709,7 +4649,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2254, ///< Last index in yytable_. + yylast_ = 2191, ///< Last index in yytable_. yynnts_ = 81, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -5020,10 +4960,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5338,10 +5275,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5408,7 +5342,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s1 -#line 5412 "parser.hpp" +#line 5346 "parser.hpp" diff --git a/src/s1/xsk/resolver.cpp b/src/s1/xsk/resolver.cpp index 6416e4b..4f4d76e 100644 --- a/src/s1/xsk/resolver.cpp +++ b/src/s1/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::s1 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +125,19 @@ auto resolver::file_name(std::uint16_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +154,16 @@ auto resolver::token_name(std::uint16_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -164,165 +188,183 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 154> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, - { std::uint8_t(opcode::OP_waitFrame), "WAITFRAME" }, + { 0x17, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x18, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x19, "RETN" }, + { 0x1A, "CALL_BUILTIN_FUNC_0" }, + { 0x1B, "CALL_BUILTIN_FUNC_1" }, + { 0x1C, "CALL_BUILTIN_FUNC_2" }, + { 0x1D, "CALL_BUILTIN_FUNC_3" }, + { 0x1E, "CALL_BUILTIN_FUNC_4" }, + { 0x1F, "CALL_BUILTIN_FUNC_5" }, + { 0x20, "CALL_BUILTIN_FUNC" }, + { 0x21, "BOOL_NOT" }, + { 0x22, "CALL_FAR_METHOD_THEAD" }, + { 0x23, "JMP_EXPR_TRUE" }, + { 0x24, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x25, "CAST_BOOL" }, + { 0x26, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x27, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x28, "INEQUALITY" }, + { 0x29, "GET_THISTHREAD" }, + { 0x2A, "CLEAR_FIELD_VARIABLE" }, + { 0x2B, "GET_FLOAT" }, + { 0x2C, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x2D, "CALL_FAR_FUNC2" }, + { 0x2E, "CALL_FAR_FUNC" }, + { 0x2F, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x30, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x31, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x32, "CHECK_CLEAR_PARAMS" }, + { 0x33, "CAST_FIELD_OBJ" }, + { 0x34, "END" }, + { 0x35, "SIZE" }, + { 0x36, "EMPTY_ARRAY" }, + { 0x37, "BIT_AND" }, + { 0x38, "LESSEQUAL" }, + { 0x39, "VOIDCODEPOS" }, + { 0x3A, "CALL_METHOD_THREAD_POINTER" }, + { 0x3B, "ENDSWITCH" }, + { 0x3C, "CLEAR_VARIABLE_FIELD" }, + { 0x3D, "DIV" }, + { 0x3E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x3F, "GET_USHORT" }, + { 0x40, "JMP_TRUE" }, + { 0x41, "GET_SELF" }, + { 0x42, "CALL_FAR_FUNC_THREAD" }, + { 0x43, "CALL_LOCAL_FUNC_THREAD" }, + { 0x44, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x45, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x46, "PLUS" }, + { 0x47, "BOOL_COMPLEMENT" }, + { 0x48, "CALL_METHOD_POINTER" }, + { 0x49, "INC" }, + { 0x4A, "REMOVE_LOCAL_VARIABLES" }, + { 0x4B, "JMP_EXPR_FALSE" }, + { 0x4C, "SWITCH" }, + { 0x4D, "CLEAR_PARAMS" }, + { 0x4E, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x4F, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x50, "CALL_LOCAL_METHOD" }, + { 0x51, "EVAL_FIELD_VARIABLE" }, + { 0x52, "EVAL_FIELD_VARIABLE_REF" }, + { 0x53, "GET_STRING" }, + { 0x54, "CALL_FUNC_POINTER" }, + { 0x55, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x56, "GET_VECTOR" }, + { 0x57, "ENDON" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "GET_SELF_OBJ" }, + { 0x5A, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x5B, "SET_VARIABLE_FIELD" }, + { 0x5C, "CALL_LOCAL_FUNC2" }, + { 0x5D, "CALL_LOCAL_FUNC" }, + { 0x5E, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x5F, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x60, "GET_FAR_FUNC" }, + { 0x61, "LESS" }, + { 0x62, "GET_GAME_REF" }, + { 0x63, "WAITFRAME" }, + { 0x64, "WAITTILLFRAMEEND" }, + { 0x65, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x66, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x67, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x68, "GET_LEVEL" }, + { 0x69, "NOTIFY" }, + { 0x6A, "DEC_TOP" }, + { 0x6B, "SHIFT_LEFT" }, + { 0x6C, "CALL_LOCAL_METHOD_THREAD" }, + { 0x6D, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x6E, "GREATER" }, + { 0x6F, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x70, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x71, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x72, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x73, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x74, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x75, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x76, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x77, "JMP" }, + { 0x78, "CALL_FUNC_THREAD_POINTER" }, + { 0x79, "GET_ZERO" }, + { 0x7A, "WAIT" }, + { 0x7B, "MINUS" }, + { 0x7C, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7D, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x7E, "MULT" }, + { 0x7F, "CREATE_LOCAL_VARIABLE" }, + { 0x80, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x81, "GET_INT" }, + { 0x82, "MOD" }, + { 0x83, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x84, "GET_BUILTIN_FUNC" }, + { 0x85, "GET_GAME" }, + { 0x86, "WAITTILL" }, + { 0x87, "DEC" }, + { 0x88, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x89, "PRE_CALL" }, + { 0x8A, "GET_ANIM" }, + { 0x8B, "GET_UNDEFINED" }, + { 0x8C, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x8D, "GET_ANIM_OBJ" }, + { 0x8E, "GET_LEVEL_OBJ" }, + { 0x8F, "BIT_EXOR" }, + { 0x90, "EQUALITY" }, + { 0x91, "CLEAR_ARRAY" }, + { 0x92, "JMP_BACK" }, + { 0x93, "GET_ANIMATION" }, + { 0x94, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x95, "GET_ANIMTREE" }, + { 0x96, "GET_ISTRING" }, + { 0x97, "EVAL_ARRAY_REF" }, + { 0x98, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x99, "GET_NBYTE" }, + { 0x9A, "GET_BUILTIN_METHOD" }, + { 0x9B, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x9C, "EVAL_ARRAY" }, + { 0x9D, "VECTOR" }, + { 0x9E, "CALL_FAR_METHOD" }, + { 0x9F, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0xA0, "GET_BYTE" }, + { 0xA1, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0xA2, "BIT_OR" }, + { 0xA3, "ADD_ARRAY" }, + { 0xA4, "WAITTILLMATCH2" }, + { 0xA5, "WAITTILLMATCH" }, + { 0xA6, "GET_LOCAL_FUNC" }, + { 0xA7, "GET_NUSHORT" }, + { 0xA8, "SHIFT_RIGHT" }, + { 0xA9, "CALL_BUILTIN_METHOD_0" }, + { 0xAA, "CALL_BUILTIN_METHOD_1" }, + { 0xAB, "CALL_BUILTIN_METHOD_2" }, + { 0xAC, "CALL_BUILTIN_METHOD_3" }, + { 0xAD, "CALL_BUILTIN_METHOD_4" }, + { 0xAE, "CALL_BUILTIN_METHOD_5" }, + { 0xAF, "CALL_BUILTIN_METHOD" }, + { 0xB0, "JMP_FALSE" }, }}; -const std::array function_list +const std::array, 735> function_list {{ { 0x001, "precacheturret" }, { 0x002, "getweaponarray" }, @@ -511,7 +553,7 @@ const std::array function_list { 0x0B9, "int" }, { 0x0BA, "float" }, { 0x0BB, "abs" }, - { 0x0BC, "min" }, // check! + { 0x0BC, "min" }, { 0x0BD, "objective_additionalcurrent" }, { 0x0BE, "objective_ring" }, { 0x0BF, "objective_setpointertextoverride" }, @@ -545,7 +587,7 @@ const std::array function_list { 0x0DB, "_func_0DB" }, // SP 0x14025BF20 { 0x0DC, "_func_0DC" }, // empty { 0x0DD, "_func_0DD" }, // SP 0x14025C0E0 - { 0x0DE, "max" }, // check! + { 0x0DE, "max" }, { 0x0DF, "floor" }, { 0x0E0, "ceil" }, { 0x0E1, "exp" }, @@ -1061,7 +1103,7 @@ const std::array function_list { 0x2DF, "_func_2DF" }, // MP 0x140331E00 }}; -const std::array method_list +const std::array, 1389> method_list {{ { 0x8000, "_meth_8000" }, // SP 0x140243FC0, MP 0x140321BF0 { 0x8001, "_meth_8001" }, // SP 0x14025D290 @@ -2454,7 +2496,7 @@ const std::array method_list { 0x856C, "_meth_856C" }, // MP 0x140333710 }}; -const std::array file_list +const std::array, 13> file_list {{ { 0x053D, "codescripts/delete" }, { 0x053E, "codescripts/struct" }, @@ -2469,11 +2511,15 @@ const std::array file_list { 42735, "maps/createart/mp_vlobby_room_art" }, { 42736, "maps/createart/mp_vlobby_room_fog" }, { 42737, "maps/createart/mp_vlobby_room_fog_hdr" }, - }}; -const std::array token_list +const std::array, 30> token_list {{ + { 0x00, "" }, + { 0x01, "pl#" }, + { 0x02, "-" }, + { 0x03, "radius`" }, + { 0x04, "note:" }, { 180, "CodeCallback_BulletHitEntity" }, { 181, "CodeCallback_CodeEndGame" }, { 182, "CodeCallback_EntityDamage" }, @@ -2524,32 +2570,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/s1/xsk/resolver.hpp b/src/s1/xsk/resolver.hpp index 54fb07f..b42970f 100644 --- a/src/s1/xsk/resolver.hpp +++ b/src/s1/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::s1 diff --git a/src/s1/xsk/s1.hpp b/src/s1/xsk/s1.hpp index 2b7c104..2220ff4 100644 --- a/src/s1/xsk/s1.hpp +++ b/src/s1/xsk/s1.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::s1 { +constexpr std::uint16_t max_string_id = 0xA7DC; + enum class opcode : std::uint8_t { OP_SetNewLocalVariableFieldCached0 = 0x17, diff --git a/src/s2/stdafx.hpp b/src/s2/stdafx.hpp index 6a7958b..783505f 100644 --- a/src/s2/stdafx.hpp +++ b/src/s2/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/s2/xsk/assembler.cpp b/src/s2/xsk/assembler.cpp index 654b820..3465da5 100644 --- a/src/s2/xsk/assembler.cpp +++ b/src/s2/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -380,24 +394,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -406,9 +408,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -424,33 +425,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint16_t file_id = 0; - std::uint16_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -459,22 +452,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -488,25 +472,26 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } @@ -515,25 +500,13 @@ void assembler::assemble_field_variable(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t field_id = 0; + auto id = resolver::token_id(inst->data[0]); - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = (std::uint16_t)std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); + if (id == 0) id = 0xFFFF; - if (field_id == 0) - { - field_id = 0xFFFF; - } - } + script_->write(id); - script_->write(field_id); - - if (field_id > 0xACEE) + if (id > max_string_id) { stack_->write(0); stack_->write_c_string(inst->data[0]); @@ -544,7 +517,7 @@ void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); if (expr) { @@ -573,24 +546,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/s2/xsk/assembler.hpp b/src/s2/xsk/assembler.hpp index 9876878..783bf12 100644 --- a/src/s2/xsk/assembler.hpp +++ b/src/s2/xsk/assembler.hpp @@ -33,8 +33,8 @@ private: void assemble_field_variable(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::s2 diff --git a/src/s2/xsk/compiler.cpp b/src/s2/xsk/compiler.cpp index 5a81ef8..04bc502 100644 --- a/src/s2/xsk/compiler.cpp +++ b/src/s2/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = s2__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -393,9 +393,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -534,7 +534,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -588,7 +588,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -734,7 +734,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -755,9 +755,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -847,7 +847,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -897,7 +897,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1055,7 +1055,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1109,7 +1109,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1372,10 +1372,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1392,7 +1392,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1408,7 +1408,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1490,10 +1490,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1510,7 +1510,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1526,7 +1526,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1548,7 +1548,7 @@ void compiler::emit_expr_parameters(const ast::expr_parameters::ptr& expr, const for (const auto& entry : expr->list) { initialize_variable(entry, blk); - emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); + emit_opcode(opcode::OP_SafeCreateVariableFieldCached, variable_create_index(entry, blk)); } emit_opcode(opcode::OP_checkclearparams); @@ -1624,7 +1624,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1791,7 +1791,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2082,7 +2082,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2094,7 +2094,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2107,7 +2107,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2224,7 +2224,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2261,7 +2261,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2304,7 +2304,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2434,7 +2434,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2706,7 +2706,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2735,7 +2735,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/s2/xsk/compiler.hpp b/src/s2/xsk/compiler.hpp index a8fae56..37e5569 100644 --- a/src/s2/xsk/compiler.hpp +++ b/src/s2/xsk/compiler.hpp @@ -88,7 +88,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/s2/xsk/decompiler.cpp b/src/s2/xsk/decompiler.cpp index deb3a3d..844c3d3 100644 --- a/src/s2/xsk/decompiler.cpp +++ b/src/s2/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1365,7 +1365,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1853,7 +1853,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1928,7 +1928,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2064,7 +2064,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2171,11 +2171,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2573,7 +2573,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2692,7 +2692,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3083,7 +3083,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/s2/xsk/disassembler.cpp b/src/s2/xsk/disassembler.cpp index 9b67380..86abf87 100644 --- a/src/s2/xsk/disassembler.cpp +++ b/src/s2/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// S2 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,8 +69,8 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); @@ -170,7 +170,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -312,19 +312,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -343,88 +338,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint16_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0xACEE) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x40000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -432,24 +382,64 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -459,7 +449,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 8; @@ -468,24 +458,24 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { - case opcode::OP_GetLocalFunction: - case opcode::OP_ScriptLocalFunctionCall: - case opcode::OP_ScriptLocalFunctionCall2: - case opcode::OP_ScriptLocalMethodCall: - case opcode::OP_ScriptLocalThreadCall: - case opcode::OP_ScriptLocalChildThreadCall: - case opcode::OP_ScriptLocalMethodThreadCall: - case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); - break; - default: - break; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = resolve_function(inst->data[0]); + break; + default: + break; } } } @@ -514,9 +504,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -534,40 +524,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/s2/xsk/disassembler.hpp b/src/s2/xsk/disassembler.hpp index 48970de..ca85758 100644 --- a/src/s2/xsk/disassembler.hpp +++ b/src/s2/xsk/disassembler.hpp @@ -28,10 +28,10 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/s2/xsk/lexer.cpp b/src/s2/xsk/lexer.cpp index 226e81c..351561a 100644 --- a/src/s2/xsk/lexer.cpp +++ b/src/s2/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 111 -#define YY_END_OF_BUFFER 112 +#define YY_NUM_RULES 112 +#define YY_END_OF_BUFFER 113 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[333] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 110, - 1, 2, 95, 110, 110, 94, 98, 110, 55, 56, - 92, 90, 61, 91, 62, 93, 109, 109, 64, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 113, 111, + 1, 2, 95, 111, 111, 94, 98, 111, 55, 56, + 92, 90, 61, 91, 62, 93, 110, 110, 64, 65, 79, 89, 80, 66, 101, 59, 60, 99, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 57, 97, 58, 96, 5, 6, - 5, 12, 13, 12, 110, 92, 93, 76, 0, 103, + 5, 12, 13, 12, 111, 92, 93, 76, 0, 103, 0, 15, 0, 0, 0, 0, 85, 0, 74, 0, - 87, 0, 0, 8, 83, 67, 81, 68, 82, 105, - 0, 11, 4, 3, 84, 105, 109, 106, 0, 0, + 87, 0, 0, 8, 83, 67, 81, 68, 82, 106, + 0, 11, 4, 3, 84, 106, 110, 107, 0, 0, 0, 0, 63, 71, 77, 75, 78, 72, 101, 88, 101, 101, 101, 101, 101, 101, 29, 101, 101, 101, 101, 101, 27, 33, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 86, 73, 7, 14, 10, 9, 0, 103, 0, 0, 0, 0, 0, 0, 102, - 0, 0, 0, 0, 103, 0, 105, 0, 3, 105, - 105, 106, 107, 108, 100, 69, 70, 101, 101, 101, + 0, 0, 0, 0, 103, 0, 106, 0, 3, 106, + 106, 107, 108, 109, 100, 69, 70, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 31, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 104, 0, 0, 0, 0, 0, 102, 0, 0, @@ -595,7 +595,7 @@ static const flex_int16_t yy_accept[333] = 54, 101, 101, 101, 101, 101, 101, 101, 101, 101, 30, 0, 0, 0, 0, 0, 101, 101, 101, 101, 101, 21, 101, 101, 39, 34, 101, 43, 101, 101, - 101, 104, 0, 0, 16, 0, 101, 101, 101, 36, + 101, 105, 0, 0, 16, 0, 101, 101, 101, 36, 32, 101, 101, 101, 101, 101, 101, 0, 17, 0, 101, 101, 38, 101, 42, 101, 101, 101, 23, 19, @@ -1193,11 +1193,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1256,582 +1256,587 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw s2::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw s2::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw s2::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return s2::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw s2::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return s2::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw s2::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw s2::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return s2::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return s2::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return s2::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return s2::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return s2::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return s2::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return s2::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return s2::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return s2::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return s2::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return s2::parser::make_WAITFRAME(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return s2::parser::make_IF(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return s2::parser::make_ELSE(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return s2::parser::make_DO(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return s2::parser::make_WHILE(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return s2::parser::make_FOR(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return s2::parser::make_FOREACH(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return s2::parser::make_IN(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return s2::parser::make_SWITCH(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return s2::parser::make_CASE(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return s2::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return s2::parser::make_BREAK(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return s2::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return s2::parser::make_RETURN(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return s2::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return s2::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return s2::parser::make_PROFEND(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return s2::parser::make_THREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return s2::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return s2::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return s2::parser::make_CALL(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return s2::parser::make_TRUE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return s2::parser::make_FALSE(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return s2::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return s2::parser::make_SIZE(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return s2::parser::make_GAME(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return s2::parser::make_SELF(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return s2::parser::make_ANIM(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return s2::parser::make_LEVEL(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return s2::parser::make_LPAREN(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return s2::parser::make_RPAREN(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return s2::parser::make_LBRACE(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return s2::parser::make_RBRACE(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return s2::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return s2::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return s2::parser::make_COMMA(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return s2::parser::make_DOT(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return s2::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return s2::parser::make_COLON(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return s2::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return s2::parser::make_QMARK(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return s2::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return s2::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return s2::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return s2::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return s2::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return s2::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return s2::parser::make_OR(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return s2::parser::make_AND(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return s2::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return s2::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return s2::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return s2::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return s2::parser::make_LESS(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return s2::parser::make_GREATER(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return s2::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return s2::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return s2::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return s2::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return s2::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return s2::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return s2::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return s2::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return s2::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return s2::parser::make_ADD(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return s2::parser::make_SUB(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return s2::parser::make_MUL(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return s2::parser::make_DIV(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return s2::parser::make_MOD(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return s2::parser::make_NOT(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return s2::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return s2::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return s2::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" +#line 157 "lexer.lpp" { return s2::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" -{ return s2::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 158 "lexer.lpp" +{ return s2::parser::make_PATH(xsk::gsc::s2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 101: YY_RULE_SETUP -#line 158 "lexer.lpp" -{ return s2::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 159 "lexer.lpp" +{ return s2::parser::make_IDENTIFIER(xsk::gsc::s2::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 102: /* rule 102 can match eol */ YY_RULE_SETUP -#line 159 "lexer.lpp" -{ return s2::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 160 "lexer.lpp" +{ return s2::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 103: /* rule 103 can match eol */ YY_RULE_SETUP -#line 160 "lexer.lpp" +#line 161 "lexer.lpp" { return s2::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 104: YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return s2::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 162 "lexer.lpp" +{ return s2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: YY_RULE_SETUP -#line 162 "lexer.lpp" -{ return s2::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 163 "lexer.lpp" +{ return s2::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return s2::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 164 "lexer.lpp" +{ return s2::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return s2::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return s2::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return s2::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 166 "lexer.lpp" +{ return s2::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 109: YY_RULE_SETUP -#line 166 "lexer.lpp" -{ return s2::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 167 "lexer.lpp" -{ if(ctx->header_top > 0) s2_pop_header(ctx); else return s2::parser::make_S2EOF(ctx->loc); } +{ return s2::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 110: -/* rule 110 can match eol */ YY_RULE_SETUP #line 168 "lexer.lpp" -{ throw s2::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return s2::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 169 "lexer.lpp" +{ if(ctx->header_top > 0) s2_pop_header(ctx); else return s2::parser::make_S2EOF(ctx->loc); } YY_BREAK case 111: +/* rule 111 can match eol */ YY_RULE_SETUP #line 170 "lexer.lpp" +{ throw s2::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 172 "lexer.lpp" ECHO; YY_BREAK -#line 1834 "lexer.cpp" +#line 1839 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2961,65 +2966,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" void s2_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3027,9 +3032,9 @@ void s2_push_header(xsk::gsc::context* ctx, const std::string& file) void s2_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/s2/xsk/lexer.hpp b/src/s2/xsk/lexer.hpp index 406f829..453356e 100644 --- a/src/s2/xsk/lexer.hpp +++ b/src/s2/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 170 "lexer.lpp" +#line 172 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/s2/xsk/parser.cpp b/src/s2/xsk/parser.cpp index d50bb6e..72057ad 100644 --- a/src/s2/xsk/parser.cpp +++ b/src/s2/xsk/parser.cpp @@ -498,10 +498,7 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -802,10 +799,7 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1106,10 +1100,7 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1409,10 +1400,7 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -1967,10 +1955,7 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -1995,1321 +1980,1303 @@ namespace xsk { namespace gsc { namespace s2 { switch (yyn) { case 2: // root: program -#line 254 "parser.ypp" +#line 251 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2001 "parser.cpp" +#line 1986 "parser.cpp" break; case 3: // root: %empty -#line 255 "parser.ypp" +#line 252 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 2007 "parser.cpp" +#line 1992 "parser.cpp" break; case 4: // program: program inline -#line 260 "parser.ypp" +#line 257 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2013 "parser.cpp" +#line 1998 "parser.cpp" break; case 5: // program: program include -#line 262 "parser.ypp" +#line 259 "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 2019 "parser.cpp" +#line 2004 "parser.cpp" break; case 6: // program: program declaration -#line 264 "parser.ypp" +#line 261 "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 2025 "parser.cpp" +#line 2010 "parser.cpp" break; case 7: // program: inline -#line 266 "parser.ypp" +#line 263 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2031 "parser.cpp" +#line 2016 "parser.cpp" break; case 8: // program: include -#line 268 "parser.ypp" +#line 265 "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 2037 "parser.cpp" +#line 2022 "parser.cpp" break; case 9: // program: declaration -#line 270 "parser.ypp" +#line 267 "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 2043 "parser.cpp" +#line 2028 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 274 "parser.ypp" +#line 271 "parser.ypp" { s2_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2049 "parser.cpp" +#line 2034 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 279 "parser.ypp" +#line 276 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2055 "parser.cpp" +#line 2040 "parser.cpp" break; case 12: // declaration: "/#" -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2061 "parser.cpp" +#line 2046 "parser.cpp" break; case 13: // declaration: "#/" -#line 284 "parser.ypp" +#line 281 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2067 "parser.cpp" +#line 2052 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 285 "parser.ypp" +#line 282 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2073 "parser.cpp" +#line 2058 "parser.cpp" break; case 15: // declaration: decl_constant -#line 286 "parser.ypp" +#line 283 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2079 "parser.cpp" +#line 2064 "parser.cpp" break; case 16: // declaration: decl_thread -#line 287 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2085 "parser.cpp" +#line 2070 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 292 "parser.ypp" +#line 289 "parser.ypp" { ctx->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 2091 "parser.cpp" +#line 2076 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 297 "parser.ypp" +#line 294 "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 2097 "parser.cpp" +#line 2082 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 302 "parser.ypp" +#line 299 "parser.ypp" { ctx->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 2103 "parser.cpp" +#line 2088 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 306 "parser.ypp" +#line 303 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2109 "parser.cpp" +#line 2094 "parser.cpp" break; case 21: // stmt: stmt_block -#line 307 "parser.ypp" +#line 304 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2115 "parser.cpp" +#line 2100 "parser.cpp" break; case 22: // stmt: stmt_call -#line 308 "parser.ypp" +#line 305 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2121 "parser.cpp" +#line 2106 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 309 "parser.ypp" +#line 306 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2127 "parser.cpp" +#line 2112 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2133 "parser.cpp" +#line 2118 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2139 "parser.cpp" +#line 2124 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2145 "parser.cpp" +#line 2130 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2151 "parser.cpp" +#line 2136 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2157 "parser.cpp" +#line 2142 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2163 "parser.cpp" +#line 2148 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } -#line 2169 "parser.cpp" +#line 2154 "parser.cpp" break; case 31: // stmt: stmt_if -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2175 "parser.cpp" +#line 2160 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2181 "parser.cpp" +#line 2166 "parser.cpp" break; case 33: // stmt: stmt_while -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2187 "parser.cpp" +#line 2172 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2193 "parser.cpp" +#line 2178 "parser.cpp" break; case 35: // stmt: stmt_for -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2199 "parser.cpp" +#line 2184 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2205 "parser.cpp" +#line 2190 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2211 "parser.cpp" +#line 2196 "parser.cpp" break; case 38: // stmt: stmt_case -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2217 "parser.cpp" +#line 2202 "parser.cpp" break; case 39: // stmt: stmt_default -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2223 "parser.cpp" +#line 2208 "parser.cpp" break; case 40: // stmt: stmt_break -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2229 "parser.cpp" +#line 2214 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2235 "parser.cpp" +#line 2220 "parser.cpp" break; case 42: // stmt: stmt_return -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2241 "parser.cpp" +#line 2226 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 329 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2247 "parser.cpp" +#line 2232 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 330 "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 2253 "parser.cpp" +#line 2238 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 331 "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 2259 "parser.cpp" +#line 2244 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 335 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2265 "parser.cpp" +#line 2250 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 336 "parser.ypp" +#line 333 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2271 "parser.cpp" +#line 2256 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 340 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2277 "parser.cpp" +#line 2262 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 341 "parser.ypp" +#line 338 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2283 "parser.cpp" +#line 2268 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 346 "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 2289 "parser.cpp" +#line 2274 "parser.cpp" break; case 51: // stmt_list: stmt -#line 348 "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 2295 "parser.cpp" +#line 2280 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 353 "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 2301 "parser.cpp" +#line 2286 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 355 "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 2307 "parser.cpp" +#line 2292 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 357 "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 2313 "parser.cpp" +#line 2298 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 359 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2319 "parser.cpp" +#line 2304 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 364 "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 2325 "parser.cpp" +#line 2310 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 366 "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 2331 "parser.cpp" +#line 2316 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 371 "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 2337 "parser.cpp" +#line 2322 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 373 "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 2343 "parser.cpp" +#line 2328 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 375 "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 2349 "parser.cpp" +#line 2334 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 380 "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 2355 "parser.cpp" +#line 2340 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 385 "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 2361 "parser.cpp" +#line 2346 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 387 "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 2367 "parser.cpp" +#line 2352 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 392 "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 2373 "parser.cpp" +#line 2358 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 397 "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 2379 "parser.cpp" +#line 2364 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 399 "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 2385 "parser.cpp" +#line 2370 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 404 "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 2391 "parser.cpp" +#line 2376 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 406 "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 2397 "parser.cpp" +#line 2382 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 411 "parser.ypp" +#line 408 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2403 "parser.cpp" +#line 2388 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 416 "parser.ypp" +#line 413 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2409 "parser.cpp" +#line 2394 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 418 "parser.ypp" +#line 415 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2415 "parser.cpp" +#line 2400 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 423 "parser.ypp" +#line 420 "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 2421 "parser.cpp" +#line 2406 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 428 "parser.ypp" +#line 425 "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 2427 "parser.cpp" +#line 2412 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 433 "parser.ypp" +#line 430 "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 2433 "parser.cpp" +#line 2418 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 438 "parser.ypp" +#line 435 "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 2439 "parser.cpp" +#line 2424 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 443 "parser.ypp" +#line 440 "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 2445 "parser.cpp" +#line 2430 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 448 "parser.ypp" +#line 445 "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 2451 "parser.cpp" +#line 2436 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 450 "parser.ypp" +#line 447 "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 2457 "parser.cpp" +#line 2442 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 455 "parser.ypp" +#line 452 "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 2463 "parser.cpp" +#line 2448 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 460 "parser.ypp" +#line 457 "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 2469 "parser.cpp" +#line 2454 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 462 "parser.ypp" +#line 459 "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 2475 "parser.cpp" +#line 2460 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 467 "parser.ypp" +#line 464 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2481 "parser.cpp" +#line 2466 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 472 "parser.ypp" +#line 469 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2487 "parser.cpp" +#line 2472 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 477 "parser.ypp" +#line 474 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2493 "parser.cpp" +#line 2478 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 482 "parser.ypp" +#line 479 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2499 "parser.cpp" +#line 2484 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 484 "parser.ypp" +#line 481 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2505 "parser.cpp" +#line 2490 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 489 "parser.ypp" +#line 486 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2511 "parser.cpp" +#line 2496 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 494 "parser.ypp" +#line 491 "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 2517 "parser.cpp" +#line 2502 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 499 "parser.ypp" +#line 496 "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 2523 "parser.cpp" +#line 2508 "parser.cpp" break; case 90: // expr: expr_ternary -#line 503 "parser.ypp" +#line 500 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2529 "parser.cpp" +#line 2514 "parser.cpp" break; case 91: // expr: expr_binary -#line 504 "parser.ypp" +#line 501 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2535 "parser.cpp" +#line 2520 "parser.cpp" break; case 92: // expr: expr_primitive -#line 505 "parser.ypp" +#line 502 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2541 "parser.cpp" +#line 2526 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2547 "parser.cpp" +#line 2532 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 510 "parser.ypp" +#line 507 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2553 "parser.cpp" +#line 2538 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 515 "parser.ypp" +#line 512 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2559 "parser.cpp" +#line 2544 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 517 "parser.ypp" +#line 514 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2565 "parser.cpp" +#line 2550 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2571 "parser.cpp" +#line 2556 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2577 "parser.cpp" +#line 2562 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2583 "parser.cpp" +#line 2568 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2589 "parser.cpp" +#line 2574 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 527 "parser.ypp" +#line 524 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2595 "parser.cpp" +#line 2580 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 529 "parser.ypp" +#line 526 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2601 "parser.cpp" +#line 2586 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 531 "parser.ypp" +#line 528 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2607 "parser.cpp" +#line 2592 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 533 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2613 "parser.cpp" +#line 2598 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 535 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2619 "parser.cpp" +#line 2604 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 540 "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 2625 "parser.cpp" +#line 2610 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 542 "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 2631 "parser.cpp" +#line 2616 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 547 "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 2637 "parser.cpp" +#line 2622 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 549 "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 2643 "parser.cpp" +#line 2628 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 554 "parser.ypp" +#line 551 "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 2649 "parser.cpp" +#line 2634 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 559 "parser.ypp" +#line 556 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2655 "parser.cpp" +#line 2640 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 561 "parser.ypp" +#line 558 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2661 "parser.cpp" +#line 2646 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2667 "parser.cpp" +#line 2652 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2673 "parser.cpp" +#line 2658 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2679 "parser.cpp" +#line 2664 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2685 "parser.cpp" +#line 2670 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2691 "parser.cpp" +#line 2676 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2697 "parser.cpp" +#line 2682 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2703 "parser.cpp" +#line 2688 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2709 "parser.cpp" +#line 2694 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2715 "parser.cpp" +#line 2700 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2721 "parser.cpp" +#line 2706 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2727 "parser.cpp" +#line 2712 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 585 "parser.ypp" +#line 582 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2733 "parser.cpp" +#line 2718 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2739 "parser.cpp" +#line 2724 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2745 "parser.cpp" +#line 2730 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2751 "parser.cpp" +#line 2736 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2757 "parser.cpp" +#line 2742 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2763 "parser.cpp" +#line 2748 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 598 "parser.ypp" +#line 595 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2769 "parser.cpp" +#line 2754 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 599 "parser.ypp" +#line 596 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2775 "parser.cpp" +#line 2760 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 600 "parser.ypp" +#line 597 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2781 "parser.cpp" +#line 2766 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2787 "parser.cpp" +#line 2772 "parser.cpp" break; case 134: // expr_primitive: expr_reference -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2793 "parser.cpp" +#line 2778 "parser.cpp" break; case 135: // expr_primitive: expr_array -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2799 "parser.cpp" +#line 2784 "parser.cpp" break; case 136: // expr_primitive: expr_field -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2805 "parser.cpp" +#line 2790 "parser.cpp" break; case 137: // expr_primitive: expr_size -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2811 "parser.cpp" +#line 2796 "parser.cpp" break; case 138: // expr_primitive: expr_paren -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2817 "parser.cpp" +#line 2802 "parser.cpp" break; case 139: // expr_primitive: expr_thisthread -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2823 "parser.cpp" +#line 2808 "parser.cpp" break; case 140: // expr_primitive: expr_empty_array -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2829 "parser.cpp" +#line 2814 "parser.cpp" break; case 141: // expr_primitive: expr_undefined -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2835 "parser.cpp" +#line 2820 "parser.cpp" break; case 142: // expr_primitive: expr_game -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2841 "parser.cpp" +#line 2826 "parser.cpp" break; case 143: // expr_primitive: expr_self -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2847 "parser.cpp" +#line 2832 "parser.cpp" break; case 144: // expr_primitive: expr_anim -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2853 "parser.cpp" +#line 2838 "parser.cpp" break; case 145: // expr_primitive: expr_level -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2859 "parser.cpp" +#line 2844 "parser.cpp" break; case 146: // expr_primitive: expr_animation -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2865 "parser.cpp" +#line 2850 "parser.cpp" break; case 147: // expr_primitive: expr_animtree -#line 615 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2871 "parser.cpp" +#line 2856 "parser.cpp" break; case 148: // expr_primitive: expr_identifier -#line 616 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2877 "parser.cpp" +#line 2862 "parser.cpp" break; case 149: // expr_primitive: expr_istring -#line 617 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2883 "parser.cpp" +#line 2868 "parser.cpp" break; case 150: // expr_primitive: expr_string -#line 618 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2889 "parser.cpp" +#line 2874 "parser.cpp" break; case 151: // expr_primitive: expr_color -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2895 "parser.cpp" +#line 2880 "parser.cpp" break; case 152: // expr_primitive: expr_vector -#line 620 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2901 "parser.cpp" +#line 2886 "parser.cpp" break; case 153: // expr_primitive: expr_float -#line 621 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2907 "parser.cpp" +#line 2892 "parser.cpp" break; case 154: // expr_primitive: expr_integer -#line 622 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2913 "parser.cpp" +#line 2898 "parser.cpp" break; case 155: // expr_primitive: expr_false -#line 623 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2919 "parser.cpp" +#line 2904 "parser.cpp" break; case 156: // expr_primitive: expr_true -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2925 "parser.cpp" +#line 2910 "parser.cpp" break; case 157: // expr_complement: "~" expr -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2931 "parser.cpp" +#line 2916 "parser.cpp" break; case 158: // expr_not: "!" expr -#line 634 "parser.ypp" +#line 631 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2937 "parser.cpp" +#line 2922 "parser.cpp" break; case 159: // expr_call: expr_function -#line 638 "parser.ypp" +#line 635 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2943 "parser.cpp" +#line 2928 "parser.cpp" break; case 160: // expr_call: expr_pointer -#line 639 "parser.ypp" +#line 636 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 2949 "parser.cpp" +#line 2934 "parser.cpp" break; case 161: // expr_method: expr_object expr_function -#line 642 "parser.ypp" +#line 639 "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 2955 "parser.cpp" +#line 2940 "parser.cpp" break; case 162: // expr_method: expr_object expr_pointer -#line 643 "parser.ypp" +#line 640 "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 2961 "parser.cpp" +#line 2946 "parser.cpp" break; case 163: // expr_function: expr_identifier "(" expr_arguments ")" -#line 648 "parser.ypp" +#line 645 "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 2967 "parser.cpp" +#line 2952 "parser.cpp" break; case 164: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 650 "parser.ypp" +#line 647 "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 2973 "parser.cpp" +#line 2958 "parser.cpp" break; case 165: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 652 "parser.ypp" +#line 649 "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 2979 "parser.cpp" +#line 2964 "parser.cpp" break; case 166: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 651 "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 2985 "parser.cpp" +#line 2970 "parser.cpp" break; case 167: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 653 "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 2991 "parser.cpp" +#line 2976 "parser.cpp" break; case 168: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 658 "parser.ypp" +#line 655 "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 2997 "parser.cpp" +#line 2982 "parser.cpp" break; case 169: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 663 "parser.ypp" +#line 660 "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 3003 "parser.cpp" +#line 2988 "parser.cpp" break; case 170: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 665 "parser.ypp" +#line 662 "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 3009 "parser.cpp" +#line 2994 "parser.cpp" break; case 171: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 667 "parser.ypp" +#line 664 "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 3015 "parser.cpp" +#line 3000 "parser.cpp" break; case 172: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 669 "parser.ypp" +#line 666 "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 3021 "parser.cpp" +#line 3006 "parser.cpp" break; case 173: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 674 "parser.ypp" +#line 671 "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 3027 "parser.cpp" +#line 3012 "parser.cpp" break; case 174: // expr_parameters: expr_parameters "," expr_identifier -#line 679 "parser.ypp" +#line 676 "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 3033 "parser.cpp" +#line 3018 "parser.cpp" break; case 175: // expr_parameters: expr_identifier -#line 681 "parser.ypp" +#line 678 "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 3039 "parser.cpp" +#line 3024 "parser.cpp" break; case 176: // expr_parameters: %empty -#line 683 "parser.ypp" +#line 680 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3045 "parser.cpp" +#line 3030 "parser.cpp" break; case 177: // expr_arguments: expr_arguments_no_empty -#line 688 "parser.ypp" +#line 685 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3051 "parser.cpp" +#line 3036 "parser.cpp" break; case 178: // expr_arguments: %empty -#line 690 "parser.ypp" +#line 687 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3057 "parser.cpp" +#line 3042 "parser.cpp" break; case 179: // expr_arguments_no_empty: expr_arguments "," expr -#line 695 "parser.ypp" +#line 692 "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 3063 "parser.cpp" +#line 3048 "parser.cpp" break; case 180: // expr_arguments_no_empty: expr -#line 697 "parser.ypp" +#line 694 "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 3069 "parser.cpp" +#line 3054 "parser.cpp" break; case 181: // expr_reference: "::" expr_identifier -#line 702 "parser.ypp" +#line 699 "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 3075 "parser.cpp" +#line 3060 "parser.cpp" break; case 182: // expr_reference: expr_path "::" expr_identifier -#line 704 "parser.ypp" +#line 701 "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 3081 "parser.cpp" +#line 3066 "parser.cpp" break; case 183: // expr_array: expr_object "[" expr "]" -#line 709 "parser.ypp" +#line 706 "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 3087 "parser.cpp" +#line 3072 "parser.cpp" break; case 184: // expr_field: expr_object "." expr_identifier -#line 714 "parser.ypp" +#line 711 "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 3093 "parser.cpp" +#line 3078 "parser.cpp" break; case 185: // expr_size: expr_object ".size" -#line 719 "parser.ypp" +#line 716 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3099 "parser.cpp" +#line 3084 "parser.cpp" break; case 186: // expr_paren: "(" expr ")" -#line 724 "parser.ypp" +#line 721 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3105 "parser.cpp" +#line 3090 "parser.cpp" break; case 187: // expr_object: expr_call -#line 728 "parser.ypp" +#line 725 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3111 "parser.cpp" +#line 3096 "parser.cpp" break; case 188: // expr_object: expr_method -#line 729 "parser.ypp" +#line 726 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3117 "parser.cpp" +#line 3102 "parser.cpp" break; case 189: // expr_object: expr_array -#line 730 "parser.ypp" +#line 727 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3123 "parser.cpp" +#line 3108 "parser.cpp" break; case 190: // expr_object: expr_field -#line 731 "parser.ypp" +#line 728 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3129 "parser.cpp" +#line 3114 "parser.cpp" break; case 191: // expr_object: expr_game -#line 732 "parser.ypp" +#line 729 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3135 "parser.cpp" +#line 3120 "parser.cpp" break; case 192: // expr_object: expr_self -#line 733 "parser.ypp" +#line 730 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3141 "parser.cpp" +#line 3126 "parser.cpp" break; case 193: // expr_object: expr_anim -#line 734 "parser.ypp" +#line 731 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3147 "parser.cpp" +#line 3132 "parser.cpp" break; case 194: // expr_object: expr_level -#line 735 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3153 "parser.cpp" +#line 3138 "parser.cpp" break; case 195: // expr_object: expr_identifier -#line 736 "parser.ypp" +#line 733 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3159 "parser.cpp" +#line 3144 "parser.cpp" break; case 196: // expr_thisthread: "thisthread" -#line 741 "parser.ypp" +#line 738 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3165 "parser.cpp" +#line 3150 "parser.cpp" break; case 197: // expr_empty_array: "[" "]" -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3171 "parser.cpp" +#line 3156 "parser.cpp" break; case 198: // expr_undefined: "undefined" -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3177 "parser.cpp" +#line 3162 "parser.cpp" break; case 199: // expr_game: "game" -#line 756 "parser.ypp" +#line 753 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3183 "parser.cpp" +#line 3168 "parser.cpp" break; case 200: // expr_self: "self" -#line 761 "parser.ypp" +#line 758 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3189 "parser.cpp" +#line 3174 "parser.cpp" break; case 201: // expr_anim: "anim" -#line 766 "parser.ypp" +#line 763 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3195 "parser.cpp" +#line 3180 "parser.cpp" break; case 202: // expr_level: "level" -#line 771 "parser.ypp" +#line 768 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3201 "parser.cpp" +#line 3186 "parser.cpp" break; case 203: // expr_animation: "%" "identifier" -#line 776 "parser.ypp" +#line 773 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3207 "parser.cpp" +#line 3192 "parser.cpp" break; case 204: // expr_animtree: "#animtree" -#line 781 "parser.ypp" +#line 778 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3213 "parser.cpp" +#line 3198 "parser.cpp" break; case 205: // expr_identifier: "identifier" -#line 786 "parser.ypp" +#line 783 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3219 "parser.cpp" +#line 3204 "parser.cpp" break; case 206: // expr_path: "path" -#line 791 "parser.ypp" +#line 788 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3225 "parser.cpp" +#line 3210 "parser.cpp" break; case 207: // expr_path: expr_identifier -#line 793 "parser.ypp" +#line 790 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3231 "parser.cpp" +#line 3216 "parser.cpp" break; case 208: // expr_istring: "localized string" -#line 798 "parser.ypp" +#line 795 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3237 "parser.cpp" +#line 3222 "parser.cpp" break; case 209: // expr_string: "string literal" -#line 803 "parser.ypp" +#line 800 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3243 "parser.cpp" +#line 3228 "parser.cpp" break; case 210: // expr_color: "color" -#line 808 "parser.ypp" +#line 805 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3249 "parser.cpp" +#line 3234 "parser.cpp" break; case 211: // expr_vector: "(" expr "," expr "," expr ")" -#line 813 "parser.ypp" +#line 810 "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 3255 "parser.cpp" +#line 3240 "parser.cpp" break; case 212: // expr_float: "-" "float" -#line 818 "parser.ypp" +#line 815 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3261 "parser.cpp" +#line 3246 "parser.cpp" break; case 213: // expr_float: "float" -#line 820 "parser.ypp" +#line 817 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3267 "parser.cpp" +#line 3252 "parser.cpp" break; - case 214: // expr_integer: "-" "int" -#line 825 "parser.ypp" + case 214: // expr_integer: "-" "integer" +#line 822 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3273 "parser.cpp" +#line 3258 "parser.cpp" break; - case 215: // expr_integer: "int" -#line 827 "parser.ypp" + case 215: // expr_integer: "integer" +#line 824 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3279 "parser.cpp" +#line 3264 "parser.cpp" break; - case 216: // expr_integer: "octal int" + case 216: // expr_false: "false" #line 829 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3285 "parser.cpp" - break; - - case 217: // expr_integer: "binary int" -#line 831 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3291 "parser.cpp" - break; - - case 218: // expr_integer: "hexadecimal int" -#line 833 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3297 "parser.cpp" - break; - - case 219: // expr_false: "false" -#line 838 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3303 "parser.cpp" +#line 3270 "parser.cpp" break; - case 220: // expr_true: "true" -#line 843 "parser.ypp" + case 217: // expr_true: "true" +#line 834 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3309 "parser.cpp" +#line 3276 "parser.cpp" break; -#line 3313 "parser.cpp" +#line 3280 "parser.cpp" default: break; @@ -3504,25 +3471,24 @@ namespace xsk { namespace gsc { namespace s2 { ">>", "||", "&&", "==", "!=", "<=", ">=", "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", - "localized string", "color", "float", "int", "octal int", "binary int", - "hexadecimal int", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", - "PREINC", "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", - "inline", "include", "declaration", "decl_usingtree", "decl_constant", - "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", - "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", - "stmt_wait", "stmt_waittill", "stmt_waittillmatch", - "stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse", - "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", - "stmt_case", "stmt_default", "stmt_break", "stmt_continue", - "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", - "expr", "expr_or_empty", "expr_assign", "expr_increment", - "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", - "expr_complement", "expr_not", "expr_call", "expr_method", - "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", - "expr_arguments", "expr_arguments_no_empty", "expr_reference", - "expr_array", "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", + "localized string", "color", "float", "integer", "ADD_ARRAY", "THEN", + "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", "POSTINC", "POSTDEC", + "$accept", "root", "program", "inline", "include", "declaration", + "decl_usingtree", "decl_constant", "decl_thread", "stmt", "stmt_dev", + "stmt_block", "stmt_list", "stmt_expr", "stmt_call", "stmt_assign", + "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", + "stmt_waittillmatch", "stmt_waittillframeend", "stmt_waitframe", + "stmt_if", "stmt_ifelse", "stmt_while", "stmt_dowhile", "stmt_for", + "stmt_foreach", "stmt_switch", "stmt_case", "stmt_default", "stmt_break", + "stmt_continue", "stmt_return", "stmt_breakpoint", "stmt_prof_begin", + "stmt_prof_end", "expr", "expr_or_empty", "expr_assign", + "expr_increment", "expr_decrement", "expr_ternary", "expr_binary", + "expr_primitive", "expr_complement", "expr_not", "expr_call", + "expr_method", "expr_function", "expr_pointer", "expr_add_array", + "expr_parameters", "expr_arguments", "expr_arguments_no_empty", + "expr_reference", "expr_array", "expr_field", "expr_size", "expr_paren", + "expr_object", "expr_thisthread", "expr_empty_array", "expr_undefined", + "expr_game", "expr_self", "expr_anim", "expr_level", "expr_animation", "expr_animtree", "expr_identifier", "expr_path", "expr_istring", "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", "expr_false", "expr_true", YY_NULLPTR @@ -3790,58 +3756,57 @@ namespace xsk { namespace gsc { namespace s2 { } - const short parser::yypact_ninf_ = -269; + const short parser::yypact_ninf_ = -261; const short parser::yytable_ninf_ = -208; const short parser::yypact_[] = { - 15, -269, -269, 10, 10, -32, -269, 26, 15, -269, - -269, -269, -269, -269, -269, -20, -269, -269, -24, -21, - -49, -269, -269, -269, -269, -30, 858, -269, -269, -269, - 25, -18, -269, -269, -35, -25, -269, 28, -269, -269, - -269, -269, -269, -269, -269, 858, 724, -30, 858, 858, - 55, -17, -269, -269, -269, -269, -269, -269, -269, 2001, - -269, -269, -269, -269, -269, 198, 435, -269, -269, -269, - -269, 589, 690, -269, -269, 814, -269, -269, -269, 819, - 881, 886, 1084, -269, -269, 552, 67, -269, -269, -269, - -269, -269, -269, -269, -269, 80, 34, -30, 75, 107, - 105, 112, 120, 115, 121, 1287, 724, -269, 2084, 118, - 128, -269, -269, -269, -269, -269, -269, -269, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, -269, 925, -30, - -269, -269, 135, 132, 858, -30, -269, 1021, -269, -269, - 858, 858, -30, 858, 858, -30, 858, -269, 858, 1731, - 858, -269, 1966, 117, 117, 920, 2115, 2166, 2166, 309, - 309, 309, 309, 2125, 632, 2156, 54, 54, -269, -269, - -269, 1771, -269, -30, 13, -269, 141, 1072, 858, 136, - 12, 145, 1225, 147, 150, 153, 155, 33, 156, 152, - 157, 791, 161, 166, 173, -269, 177, 130, 130, -269, - -269, -269, 1123, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, 172, 174, 175, - 178, 180, -269, -269, 36, -269, -269, -269, -269, 7, - 1811, 22, 183, 1851, 29, 192, 1891, 1930, 193, 2084, - 858, -269, 141, -269, 858, -269, 1174, 2036, -269, 200, - -269, 858, 228, 858, -4, -30, 858, 158, 199, 202, - -269, -269, -269, -269, 2071, -269, 858, 858, 858, -269, - -269, 69, 69, -269, -269, -269, -269, -269, -269, -269, - 207, 212, 213, 214, -269, -269, 858, 858, 858, 858, - 858, 858, 858, 858, 858, 858, 858, 210, -269, 858, - 211, -269, 858, 215, 858, 217, 2084, 38, -269, -269, - 209, 1453, 221, 1487, 222, -269, -269, -269, 1251, -7, - 1521, -269, -269, -269, 44, 45, 1731, 858, 858, 858, - 858, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, - 2084, 2084, 223, 46, 225, 53, 227, 1555, 858, -269, - -269, 1225, 858, 1225, 858, 858, -30, 34, 224, 232, - 1589, 1331, 1375, 1419, 858, -269, 858, -269, 858, -269, - 77, 256, 1623, -269, 2084, 235, 1657, 255, -269, -269, - -269, 236, 239, 858, 240, 858, 241, 858, 87, 88, - 98, -269, 1225, 246, -4, 1225, 858, -269, -269, 234, - -269, 254, -269, 257, -269, -269, -269, -269, -269, 258, - -269, 1691, 247, 250, 253, 1225, 1225, -269, -269, -269, - -269, -269 + 24, -261, -261, -71, -71, -23, -261, 39, 24, -261, + -261, -261, -261, -261, -261, -20, -261, -261, -5, -3, + -26, -261, -261, -261, -261, -35, 1143, -261, -261, -261, + 28, 17, -261, -261, -36, -33, -261, 27, -261, -261, + -261, -261, -261, -261, -261, 1143, 1015, -35, 1143, 1143, + -58, 7, -261, -261, -261, -261, 1897, -261, -261, -261, + -261, -261, 345, 435, -261, -261, -261, -261, 581, 609, + -261, -261, 614, -261, -261, -261, 848, 950, 1104, 1168, + -261, -261, 74, 46, -261, -261, -261, -261, -261, -261, + -261, -261, 54, 69, -35, 79, 73, 91, 83, 104, + 101, 110, 1222, 1015, -261, 1980, 111, 116, -261, -261, + -261, -261, -261, -261, -261, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, -261, 1207, -35, -261, -261, 122, + 121, 1143, -35, -261, 785, -261, -261, 1143, 1143, -35, + 1143, 1143, -35, 1143, -261, 1143, 1666, 1143, -261, 1862, + 114, 114, 2011, 2021, 2103, 2103, 53, 53, 53, 53, + 2052, 2093, 2062, 59, 59, -261, -261, -261, 1706, -261, + -35, 18, -261, 130, 836, 1143, 125, -11, 137, 989, + 138, 139, 150, 159, -53, 153, 154, 158, 1079, 160, + 163, 176, -261, 173, 127, 127, -261, -261, -261, 887, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, 168, 171, 174, 179, 180, -261, + -261, 683, -261, -261, -261, -261, 8, 1746, 21, 183, + 1786, 29, 186, 1826, 1010, 182, 1980, 1143, -261, 130, + -261, 1143, -261, 938, 1932, -261, 193, -261, 1143, 220, + 1143, 550, -35, 1143, 145, 191, 195, -261, -261, -261, + -261, 1967, -261, 1143, 1143, 1143, -261, -261, 210, 210, + -261, -261, -261, -261, -261, -261, -261, 202, 208, 212, + 216, -261, -261, 1143, 1143, 1143, 1143, 1143, 1143, 1143, + 1143, 1143, 1143, 1143, 205, -261, 1143, 213, -261, 1143, + 215, 1143, 222, 1980, 31, -261, -261, 214, 1388, 223, + 1422, 219, -261, -261, -261, 13, -6, 1456, -261, -261, + -261, 32, 50, 1666, 1143, 1143, 1143, 1143, 1980, 1980, + 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 1980, 230, + 51, 231, 60, 232, 1490, 1143, -261, -261, 989, 1143, + 989, 1143, 1143, -35, 69, 224, 225, 1524, 1266, 1310, + 1354, 1143, -261, 1143, -261, 1143, -261, 71, 263, 1558, + -261, 1980, 227, 1592, 260, -261, -261, -261, 233, 237, + 1143, 238, 1143, 239, 1143, 78, 84, 85, -261, 989, + 242, 550, 989, 1143, -261, -261, 252, -261, 253, -261, + 256, -261, -261, -261, -261, -261, 278, -261, 1626, 271, + 274, 276, 989, 989, -261, -261, -261, -261, -261 }; const unsigned char @@ -3850,616 +3815,601 @@ namespace xsk { namespace gsc { namespace s2 { 3, 12, 13, 0, 0, 0, 205, 0, 2, 7, 8, 9, 14, 15, 16, 0, 206, 207, 0, 0, 0, 1, 4, 5, 6, 176, 0, 10, 11, 209, - 0, 0, 175, 204, 0, 0, 196, 0, 220, 219, + 0, 0, 175, 204, 0, 0, 196, 0, 217, 216, 198, 199, 200, 201, 202, 0, 178, 0, 0, 0, - 0, 0, 208, 210, 213, 215, 216, 217, 218, 0, - 90, 91, 92, 129, 130, 131, 132, 159, 160, 133, - 134, 135, 136, 137, 138, 0, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 0, 149, 150, 151, - 152, 153, 154, 155, 156, 0, 0, 0, 0, 207, - 0, 0, 207, 0, 0, 0, 178, 197, 180, 0, - 177, 181, 158, 157, 212, 214, 203, 18, 0, 0, + 0, 0, 208, 210, 213, 215, 0, 90, 91, 92, + 129, 130, 131, 132, 159, 160, 133, 134, 135, 136, + 137, 138, 0, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 0, 149, 150, 151, 152, 153, 154, + 155, 156, 0, 0, 0, 0, 207, 0, 0, 207, + 0, 0, 0, 178, 197, 180, 0, 177, 181, 158, + 157, 212, 214, 203, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, - 161, 162, 207, 0, 178, 0, 17, 0, 19, 174, - 0, 178, 0, 0, 178, 0, 0, 186, 0, 180, - 0, 173, 0, 122, 123, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 124, 125, 126, 127, - 128, 0, 184, 0, 0, 177, 182, 0, 0, 0, + 0, 0, 0, 0, 185, 0, 0, 161, 162, 207, + 0, 178, 0, 17, 0, 19, 174, 0, 178, 0, + 0, 178, 0, 0, 186, 0, 180, 0, 173, 0, + 122, 123, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 124, 125, 126, 127, 128, 0, 184, + 0, 0, 177, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 49, 0, 0, 0, 51, - 20, 21, 0, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, - 187, 188, 189, 190, 0, 191, 192, 193, 194, 195, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, - 0, 183, 0, 163, 178, 47, 0, 0, 69, 0, - 70, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 82, 83, 84, 86, 0, 87, 178, 178, 0, 187, - 188, 106, 108, 48, 50, 58, 59, 60, 56, 57, - 0, 0, 0, 0, 107, 109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 165, 178, - 0, 167, 178, 0, 0, 0, 110, 0, 46, 64, - 0, 0, 0, 0, 0, 52, 53, 54, 0, 0, - 0, 81, 80, 85, 0, 0, 0, 0, 0, 0, - 0, 95, 101, 102, 103, 104, 105, 96, 97, 98, - 100, 99, 0, 0, 0, 0, 0, 0, 178, 164, - 71, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 178, 166, 178, 168, 178, 211, - 0, 72, 0, 74, 93, 0, 0, 0, 79, 88, - 89, 0, 0, 178, 0, 178, 0, 178, 0, 0, - 0, 169, 0, 0, 55, 0, 0, 61, 63, 177, - 66, 177, 68, 177, 170, 171, 172, 73, 75, 0, - 77, 0, 0, 0, 0, 0, 0, 62, 65, 67, - 76, 78 + 0, 0, 49, 0, 0, 0, 51, 20, 21, 0, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 0, 0, 0, 187, 188, 189, + 190, 0, 191, 192, 193, 194, 195, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 179, 0, 183, 0, + 163, 178, 47, 0, 0, 69, 0, 70, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 82, 83, 84, + 86, 0, 87, 178, 178, 0, 187, 188, 106, 108, + 48, 50, 58, 59, 60, 56, 57, 0, 0, 0, + 0, 107, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 165, 178, 0, 167, 178, + 0, 0, 0, 110, 0, 46, 64, 0, 0, 0, + 0, 0, 52, 53, 54, 0, 0, 0, 81, 80, + 85, 0, 0, 0, 0, 0, 0, 0, 95, 101, + 102, 103, 104, 105, 96, 97, 98, 100, 99, 0, + 0, 0, 0, 0, 0, 178, 164, 71, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 178, 166, 178, 168, 178, 211, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 178, 0, 178, 0, 178, 0, 0, 0, 169, 0, + 0, 55, 0, 0, 61, 63, 177, 66, 177, 68, + 177, 170, 171, 172, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 62, 65, 67, 76, 78 }; const short parser::yypgoto_[] = { - -269, -269, -269, 273, 319, 321, -269, -269, -269, 163, - -269, -94, 143, -83, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, -269, -269, - -269, -269, -269, -269, -269, -269, -269, -269, 190, -269, - -268, -260, -258, -269, -269, -269, -269, -269, -130, -26, - -70, -68, -269, -269, 325, -45, -269, -12, 219, -269, - -269, 245, -269, -269, -269, 252, 300, 335, 369, -269, - -269, 0, 6, -269, -9, -269, -269, -269, 137, -269, - -269 + -261, -261, -261, 321, 323, 324, -261, -261, -261, -183, + -261, -88, 100, -78, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, -261, -261, + -261, -261, -261, -261, -261, -261, -261, -261, 187, -261, + -260, -257, -254, -261, -261, -261, -261, -261, -85, -12, + -70, -65, -261, -261, -128, -45, -261, 177, 247, -261, + -261, 257, -261, -261, -261, 275, 332, 359, 365, -261, + -261, 0, 6, -261, 2, -261, -261, -261, 142, -261, + -261 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 209, - 210, 211, 212, 334, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 108, 395, - 237, 238, 239, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 31, 109, 185, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 206, + 207, 208, 209, 331, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 105, 392, + 234, 235, 236, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 31, 106, 182, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91 }; const short parser::yytable_[] = { - 15, 110, 148, 17, 17, 140, 335, 141, 15, 18, - 19, 30, 20, 98, 336, 375, 337, 240, 1, 2, - 3, 4, 5, 101, 25, 32, 21, 96, 34, 35, - 27, 37, 97, 28, 99, 102, 41, 42, 43, 44, - 100, 103, 29, 376, 206, 300, 301, 111, 302, 303, - 26, 144, 207, 208, 16, 6, 269, 240, 263, -207, - 6, 110, 240, 160, 16, 6, 270, 318, 34, 35, - 95, 37, 160, 116, 321, 142, 104, 289, 289, 160, - 147, 143, 240, 369, 138, 16, 6, 139, 160, 378, - 379, 385, 304, 305, 160, 160, 160, 149, 387, 16, - 6, 34, 35, 160, 37, 6, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 138, 277, 145, - 139, 241, 411, 150, 29, 16, 6, 160, 55, 56, - 57, 58, 424, 425, 146, 242, 240, 160, 160, 182, - 134, 135, 136, 426, 289, 186, 335, 249, 160, 114, - 115, 151, 252, 143, 336, 255, 337, 152, 16, 6, - 153, 241, 34, 35, 154, 37, 241, 155, 160, 156, - 41, 42, 43, 44, 140, 242, 141, 161, 206, 144, - 242, 290, 290, 262, 183, 264, 241, 249, 278, 271, - 268, 273, 249, 143, 274, 242, 242, 275, 143, 276, - 242, 132, 133, 134, 135, 136, 281, 249, 249, 280, - 286, 282, 249, 143, 143, 285, 59, 287, 143, 16, - 6, 140, 140, 141, 141, 288, 295, 319, 296, 297, - -187, -187, 298, -187, 299, 105, 322, -187, 112, 113, - 241, 240, 325, 240, 142, 330, -187, 332, 290, -187, - 143, 347, 341, 115, 242, 342, 348, 349, 350, 362, - 364, 368, 242, 370, 366, 372, 249, 384, 140, 386, - 141, 388, 143, 412, 249, 339, 374, 416, 399, 432, - 143, 22, 240, 398, 289, 240, 400, -187, -187, 414, - 417, 142, 142, 418, 420, 422, 159, 143, 143, 433, - 428, 437, 434, 435, 438, 240, 240, 439, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 23, 181, 24, - 266, 429, 0, 0, 279, 0, 0, 0, 142, 0, - 250, 0, 0, 253, 143, 241, 256, 241, 257, 0, - 259, 0, 0, 0, 0, 272, 0, 0, 419, 242, - 421, 242, 423, 0, 0, 0, 243, 119, 120, 0, - 0, 249, 0, 249, 0, 294, 397, 143, 267, 143, - 0, 0, 0, 0, 0, 0, 241, 0, 290, 241, - 0, 284, 244, 132, 133, 134, 135, 136, 0, 245, - 242, 0, 242, 242, 0, 0, 243, 0, 0, 241, - 241, 243, 249, 0, 249, 249, 0, 0, 143, 0, - 143, 143, 0, 242, 242, 0, 243, 243, 0, 294, - 0, 243, 244, 0, 0, 249, 249, 244, 0, 245, - 0, 143, 143, 0, 245, 0, 0, 246, 0, 0, - 326, 0, 291, 292, 0, 0, 0, 244, 0, 245, - 245, 331, 0, 333, 245, 0, 340, -188, -188, 184, - -188, 0, 0, 0, -188, 0, 251, 0, 346, 254, - 0, 0, 247, -188, 0, 243, -188, 246, 0, 0, - 0, 0, 246, 243, 0, 0, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 246, 246, 0, - 0, 244, 246, 0, 367, 0, 248, 0, 245, 338, - 0, 0, 247, 0, -188, -188, 245, 247, 0, 0, - 0, 0, 0, 0, 391, 0, 393, 380, 381, 382, - 383, 0, 247, 247, 0, 0, 0, 247, 0, 0, - 0, 0, 0, 0, 0, 0, 248, 0, 0, 0, - 0, 248, 392, 0, 394, 396, 246, 0, 0, 0, - 0, 0, 0, 0, 246, 427, 248, 248, 430, 0, - 0, 248, 0, 0, -195, -195, 0, -195, 0, 327, - 243, -195, 243, 0, 0, 0, 144, 0, 440, 441, - -195, 247, 0, -195, -207, 0, 431, 0, 0, 247, - 0, 344, 345, 0, 0, 0, 244, 0, 244, 0, - 0, -189, -189, 245, -189, 245, 0, 0, -189, 0, - 0, 243, 0, 243, 243, 248, 0, -189, 0, 0, - -189, -195, -195, 248, 363, 0, 0, 365, 0, 0, - 0, 0, 0, 0, 243, 243, 0, 244, 0, 338, - 244, 0, 0, 0, 245, 0, 245, 245, 0, 0, - 0, 246, 0, 246, 0, 0, 0, 0, -189, -189, - 244, 244, 0, 0, 0, 0, 0, 245, 245, 0, - 119, 120, 0, 390, 123, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 0, 0, 247, 0, 247, 408, - 0, 409, 246, 410, 246, 246, 132, 133, 134, 135, - 136, 0, -190, -190, 0, -190, 0, 0, 0, -190, - 0, 0, 33, 0, 0, 246, 246, 0, -190, 0, - 248, -190, 248, 0, 0, 0, 0, 247, 0, 247, - 247, 0, 0, 0, 0, 0, 34, 35, 36, 37, - 38, 39, 40, 0, 41, 42, 43, 44, 45, 0, - 247, 247, 106, 107, 0, 0, 47, 0, 0, -190, - -190, 248, 0, 248, 248, 0, 0, 0, 0, 0, - 0, 0, 48, 49, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 248, 248, 0, 0, 0, 50, - 0, 0, 51, 16, 6, 29, 52, 53, 54, 55, - 56, 57, 58, 34, 35, 36, 37, 38, 39, 40, - 0, 41, 42, 43, 44, 45, 0, 0, 0, 46, - 0, 0, 0, 47, 0, 283, 34, 35, 0, 37, - 0, -191, -191, 137, -191, 0, 0, 0, -191, 48, - 49, 0, 138, 0, 0, 139, 33, -191, 0, 0, - -191, 0, 0, 0, 0, 0, 50, 0, 0, 51, - 16, 6, 29, 52, 53, 54, 55, 56, 57, 58, - 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, - 43, 44, 45, 16, 6, 0, 46, 0, -191, -191, - 47, 0, 0, -192, -192, 0, -192, 0, -193, -193, - -192, -193, 0, 0, 0, -193, 48, 49, 0, -192, - 0, 0, -192, 33, -193, 0, 0, -193, 0, 0, - 0, 0, 0, 50, 0, 0, 51, 16, 6, 29, - 52, 53, 54, 55, 56, 57, 58, 34, 35, 36, + 15, 107, 137, 17, 17, 145, 269, 138, 15, 18, + 19, 332, 95, 181, 333, 98, 372, 334, 16, 6, + 248, 20, 30, 251, 25, 32, 291, 1, 2, 3, + 4, 5, 274, 266, 96, 99, 111, 112, 29, 21, + 97, 100, 55, 267, 373, 34, 35, 108, 37, 27, + 26, 28, 141, 16, 6, 6, 16, 6, 107, 237, + -207, 135, 93, 260, 136, 29, 315, 94, 157, 301, + 302, 157, 139, 92, 318, 101, 366, 375, 140, 157, + 291, 157, 157, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 146, 376, 382, 113, 142, 237, + 157, 157, 16, 6, 237, 384, -195, -195, 143, -195, + 157, 116, 117, -195, 6, 144, 408, 148, 141, 286, + 286, 157, -195, 421, 237, -195, -207, 147, 157, 422, + 423, 150, 238, 324, 157, 157, 179, 129, 130, 131, + 132, 133, 183, 149, 246, 131, 132, 133, 151, 249, + 140, 332, 252, 152, 333, 341, 342, 334, 153, 34, + 35, 157, 37, -195, -195, 158, 141, 41, 42, 43, + 44, 137, 238, 180, 261, 203, 138, 238, 237, 265, + 259, 268, 270, 271, 246, 388, 286, 390, 360, 246, + 140, 362, 287, 287, 272, 140, 275, 238, 129, 130, + 131, 132, 133, 273, 246, 246, 277, 283, 278, 246, + 140, 140, 279, 56, 282, 140, 16, 6, 137, 137, + 284, 285, 292, 138, 138, 293, 424, 316, 294, 427, + 319, 322, 102, 295, 296, 109, 110, 387, 327, 329, + 112, 139, 34, 35, 338, 37, 344, 140, 339, 437, + 438, 238, 345, 405, 359, 406, 346, 407, 135, 287, + 347, 136, 361, 246, 363, 137, 365, 369, 367, 140, + 138, 246, 336, 371, 381, 383, 385, 140, 396, 397, + 409, 411, 413, 237, 263, 237, 395, 414, 139, 139, + 156, 415, 417, 419, 140, 140, 425, 429, 430, 16, + 6, 431, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 239, 178, 432, 237, 434, 286, 237, 435, 22, + 436, 23, 24, 426, 247, 139, 276, 250, 0, 0, + 253, 140, 254, 0, 256, 0, 0, 237, 237, 0, + 0, 0, 0, 0, 0, 416, 238, 418, 238, 420, + 0, 239, 0, 0, 0, 0, 239, 0, 246, 0, + 246, 0, 264, 394, 140, 0, 140, -187, -187, 0, + -187, 239, 239, 0, -187, 281, 239, 0, 0, 0, + 0, 240, 0, -187, 0, 0, -187, 238, 0, 287, + 238, 241, 0, 0, 0, 0, 0, 0, 0, 246, + 0, 246, 246, 0, 0, 140, 0, 140, 140, 242, + 238, 238, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 240, 246, 246, -187, -187, 240, 0, 140, 140, + 239, 241, 0, 0, 323, 0, 241, 0, 239, 0, + 0, 240, 240, 0, 0, 328, 240, 330, 0, 242, + 337, 288, 289, 0, 242, 0, 241, -188, -188, 0, + -188, 0, 343, 0, -188, 0, 243, 0, 0, 242, + 242, 0, 0, -188, 242, 0, -188, 0, 0, 0, + 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 0, 0, 244, 0, 0, 0, 0, 364, 245, + 240, 0, 0, 0, 0, 0, 243, 0, 240, 0, + 241, 243, 0, 0, -188, -188, 0, 0, 335, 0, + 0, 377, 378, 379, 380, 0, 243, 243, 242, 0, + 0, 243, 0, 244, 0, 239, 242, 239, 244, 245, + 0, 0, 0, 0, 245, 0, 389, 0, 391, 393, + 0, 0, 0, 244, 244, 0, 0, 0, 244, 245, + 245, 0, 0, 0, 245, 0, 0, 0, 0, 0, + 0, 0, 34, 35, 0, 37, 239, 0, 239, 239, + 41, 42, 43, 44, 0, 243, 0, 0, 203, 0, + 428, 0, 0, 243, 0, 0, 204, 205, 0, 239, + 239, 0, 0, -189, -189, 240, -189, 240, 0, 0, + -189, 0, 244, 0, 0, 241, 0, 241, 245, -189, + 244, 0, -189, 0, 0, 0, 245, 0, 0, 16, + 6, -190, -190, 242, -190, 242, 34, 35, -190, 37, + 0, 0, 0, 134, 0, 0, 240, -190, 240, 240, + -190, 0, 135, 0, 0, 136, 241, 0, 335, 241, + -189, -189, 0, 0, 0, 0, 0, 0, 0, 240, + 240, 0, 0, 0, 242, 0, 242, 242, 0, 241, + 241, 0, 297, 298, 0, 299, 300, 0, -190, -190, + 243, 0, 243, 16, 6, 0, 0, 242, 242, 0, + 0, 0, 0, 0, 0, 34, 35, 0, 37, 0, + 0, 0, 0, 0, 0, 0, 0, 244, 0, 244, + 0, 135, 0, 245, 136, 245, 0, 0, 0, 301, + 302, 243, 0, 243, 243, 0, 0, 0, 0, 0, + 0, 0, 0, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 243, 243, 0, 0, 244, 0, + 244, 244, 16, 6, 245, 0, 245, 245, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, + 0, 244, 244, 0, 0, 0, 185, 245, 245, 186, + 187, 188, 0, 189, 190, 191, 192, 0, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 34, 35, 0, + 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, + 0, 144, 202, 203, 0, 0, 0, 0, 0, 184, + 262, 204, 205, 0, 0, 0, 0, 185, 0, 0, + 186, 187, 188, 0, 189, 190, 191, 192, 0, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 34, 35, + 0, 37, 0, 0, 16, 6, 41, 42, 43, 44, + -191, -191, 144, -191, 203, 0, 0, -191, 0, 0, + 184, 0, 204, 205, 0, 0, -191, 0, 185, -191, + 0, 186, 187, 188, 0, 189, 190, 191, 192, 0, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 34, + 35, 0, 37, 0, 0, 16, 6, 41, 42, 43, + 44, 0, 0, 144, 290, 203, 0, -191, -191, 0, + 0, 184, 325, 204, 205, 0, 0, 0, 0, 185, + 0, 0, 186, 187, 188, 0, 189, 190, 191, 192, + 0, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 34, 35, 0, 37, 0, 0, 16, 6, 41, 42, + 43, 44, -192, -192, 144, -192, 203, 0, 0, -192, + 0, 0, 184, 0, 204, 205, 0, 0, -192, 0, + 185, -192, 0, 186, 187, 188, 0, 189, 190, 191, + 192, 0, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 34, 35, 33, 37, 0, 0, 16, 6, 41, + 42, 43, 44, 0, 0, 144, 0, 203, 0, -192, + -192, 0, 0, 0, 0, 204, 205, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, - -192, -192, 0, 106, 0, -193, -193, 47, 119, 120, - 0, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 48, 49, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 0, + 321, 0, 0, 103, 104, 115, 0, 47, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 16, 6, + 0, 0, 0, 48, 49, 0, 0, 33, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 0, 50, 0, 0, 51, 16, 6, 29, 52, 53, 54, - 55, 56, 57, 58, 187, 0, 0, 0, 0, 0, - 0, 0, 188, 0, 0, 189, 190, 191, 0, 192, - 193, 194, 195, 0, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 34, 35, 0, 37, 0, 0, 0, - 0, 41, 42, 43, 44, 0, 0, 147, 205, 206, - 0, 0, 0, 0, 0, 187, 265, 207, 208, 0, - 0, 0, 0, 188, 0, 0, 189, 190, 191, 0, - 192, 193, 194, 195, 0, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 34, 35, 0, 37, 0, 0, - 16, 6, 41, 42, 43, 44, -194, -194, 147, -194, - 206, 0, 0, -194, 0, 0, 187, 0, 207, 208, - 0, 0, -194, 0, 188, -194, 0, 189, 190, 191, - 0, 192, 193, 194, 195, 0, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 34, 35, 0, 37, 0, - 0, 16, 6, 41, 42, 43, 44, 0, 0, 147, - 293, 206, 0, -194, -194, 0, 0, 187, 328, 207, - 208, 0, 0, 0, 0, 188, 0, 0, 189, 190, - 191, 0, 192, 193, 194, 195, 0, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 34, 35, 0, 37, - 0, 0, 16, 6, 41, 42, 43, 44, 0, 0, - 147, 0, 206, 0, 0, 0, 0, 0, 187, 0, - 207, 208, 0, 0, 0, 0, 188, 0, 0, 189, - 190, 191, 0, 192, 193, 194, 195, 0, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 34, 35, 0, - 37, 0, 0, 16, 6, 41, 42, 43, 44, 0, - 0, 147, 0, 206, 0, 0, 0, 0, 0, 0, - 0, 207, 208, 34, 35, 0, 37, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, - 0, 0, 139, 0, 0, 0, 0, 304, 305, 0, - 0, 0, 0, 0, 16, 6, 0, 0, 0, 0, - 0, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 157, 0, 0, 0, 0, 158, 0, 0, - 16, 6, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 402, 0, 0, 0, - 0, 403, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 55, 34, 35, 36, 37, 38, 39, 40, 0, 41, + 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, + 0, 47, 0, 280, 0, 0, -193, -193, 0, -193, + 0, 0, 0, -193, 0, 0, 0, 48, 49, 0, + 0, 33, -193, 0, 0, -193, 0, 0, 0, 0, + 0, 0, 0, 0, 50, 0, 0, 51, 16, 6, + 29, 52, 53, 54, 55, 34, 35, 36, 37, 38, + 39, 40, 0, 41, 42, 43, 44, 45, 0, 0, + 0, 46, 0, -193, -193, 47, 0, 0, 0, 0, + -194, -194, 0, -194, 0, 0, 0, -194, 0, 0, + 0, 48, 49, 0, 0, 33, -194, 0, 0, -194, + 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, + 0, 51, 16, 6, 29, 52, 53, 54, 55, 34, + 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, + 44, 45, 0, 0, 0, 103, 0, -194, -194, 47, + 0, 0, 0, 0, 0, 0, 0, 154, 0, 0, + 0, 0, 155, 0, 0, 48, 49, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 0, 0, 50, 0, 0, 51, 16, 6, 29, 52, + 53, 54, 55, 126, 127, 128, 129, 130, 131, 132, + 133, 399, 0, 0, 0, 0, 400, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 401, 0, 0, 0, 0, + 402, 0, 0, 0, 0, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 404, 0, 0, 0, 0, 405, 0, 0, 0, 0, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 406, 0, 0, 0, 0, 407, - 0, 0, 0, 0, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 371, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 373, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 377, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 403, + 0, 0, 0, 0, 404, 0, 0, 0, 0, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 368, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 370, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 389, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 118, 0, 0, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 401, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 118, 0, 0, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, - 129, 130, 131, 132, 133, 134, 135, 136, 118, 0, - 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 0, 129, 130, 131, 132, 133, 134, - 135, 136, 118, 0, 0, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 436, 0, 129, 130, - 131, 132, 133, 134, 135, 136, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 374, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 386, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 115, + 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 410, 0, 126, 127, 128, 129, 130, + 131, 132, 133, 115, 0, 0, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 412, 0, 126, + 127, 128, 129, 130, 131, 132, 133, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 258, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 433, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 255, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 258, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 314, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 317, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 320, 0, 0, 0, 0, + 0, 115, 0, 0, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 126, 127, 128, + 129, 130, 131, 132, 133, 257, 0, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 261, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 114, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 126, 127, + 128, 129, 130, 131, 132, 133, 326, 115, 0, 0, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 317, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 320, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 323, 0, 0, 0, 0, 0, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 324, 0, 0, 0, 0, 118, 0, 0, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 129, 130, 131, 132, 133, 134, 135, 136, 260, - 0, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 117, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 129, 130, 131, 132, 133, 134, 135, 136, - 329, 118, 0, 0, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 129, 130, 131, - 132, 133, 134, 135, 136, 343, 118, 0, 0, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 118, - 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 0, 0, 0, 0, 0, 129, 130, 131, 132, 133, - 134, 135, 136, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 119, 120, 0, 0, 123, 124, 125, - 126, 127, 128, 0, 0, 0, 129, 130, 131, 132, - 133, 134, 135, 136, 0, 0, 0, 130, 131, 132, - 133, 134, 135, 136, 119, 120, 0, 0, 123, 124, - 125, 126, 127, 128, 119, 120, 0, 0, 0, 0, - 125, 126, 127, 128, 0, 0, 0, 0, 130, 0, - 132, 133, 134, 135, 136, 0, 0, 0, 0, 0, - 132, 133, 134, 135, 136 + 0, 0, 0, 126, 127, 128, 129, 130, 131, 132, + 133, 340, 115, 0, 0, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 115, 0, 0, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 0, 0, 0, 0, + 0, 126, 127, 128, 129, 130, 131, 132, 133, 116, + 117, 0, 119, 120, 121, 122, 123, 124, 125, 116, + 117, 0, 0, 120, 121, 122, 123, 124, 125, 0, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 0, 0, 126, 127, 128, 129, 130, 131, 132, 133, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 116, 117, 0, 0, 120, 121, 122, 123, 124, 125, + 0, 0, 0, 0, 127, 128, 129, 130, 131, 132, + 133, 0, 0, 0, 127, 0, 129, 130, 131, 132, + 133, 116, 117, 0, 0, 120, 121, 122, 123, 124, + 125, 116, 117, 0, 0, 0, 0, 122, 123, 124, + 125, 0, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133, 0, 0, 0, 0, 0, 129, 130, 131, + 132, 133 }; const short parser::yycheck_[] = { - 0, 46, 96, 3, 4, 75, 274, 75, 8, 3, - 4, 20, 44, 48, 274, 22, 274, 147, 3, 4, - 5, 6, 7, 48, 44, 25, 0, 45, 32, 33, - 54, 35, 50, 54, 34, 35, 40, 41, 42, 43, - 34, 35, 91, 50, 48, 9, 10, 47, 12, 13, - 70, 44, 56, 57, 89, 90, 44, 187, 45, 52, - 90, 106, 192, 50, 89, 90, 54, 45, 32, 33, - 45, 35, 50, 90, 45, 75, 48, 207, 208, 50, - 46, 75, 212, 45, 48, 89, 90, 51, 50, 45, - 45, 45, 56, 57, 50, 50, 50, 97, 45, 89, - 90, 32, 33, 50, 35, 90, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 48, 85, 52, - 51, 147, 45, 48, 91, 89, 90, 50, 95, 96, - 97, 98, 45, 45, 54, 147, 266, 50, 50, 139, - 86, 87, 88, 45, 274, 145, 414, 147, 50, 94, - 95, 44, 152, 147, 414, 155, 414, 52, 89, 90, - 48, 187, 32, 33, 44, 35, 192, 52, 50, 48, - 40, 41, 42, 43, 244, 187, 244, 49, 48, 44, - 192, 207, 208, 183, 52, 44, 212, 187, 197, 44, - 54, 44, 192, 187, 44, 207, 208, 44, 192, 44, - 212, 84, 85, 86, 87, 88, 54, 207, 208, 53, - 44, 54, 212, 207, 208, 54, 26, 44, 212, 89, - 90, 291, 292, 291, 292, 48, 54, 44, 54, 54, - 32, 33, 54, 35, 54, 45, 44, 39, 48, 49, - 266, 371, 49, 373, 244, 45, 48, 19, 274, 51, - 244, 44, 53, 95, 266, 53, 44, 44, 44, 49, - 49, 44, 274, 54, 49, 44, 266, 44, 338, 44, - 338, 44, 266, 17, 274, 275, 54, 22, 54, 45, - 274, 8, 412, 377, 414, 415, 54, 89, 90, 54, - 54, 291, 292, 54, 54, 54, 106, 291, 292, 45, - 54, 54, 45, 45, 54, 435, 436, 54, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 8, 138, 8, - 187, 414, -1, -1, 197, -1, -1, -1, 338, -1, - 150, -1, -1, 153, 338, 371, 156, 373, 158, -1, - 160, -1, -1, -1, -1, 192, -1, -1, 403, 371, - 405, 373, 407, -1, -1, -1, 147, 58, 59, -1, - -1, 371, -1, 373, -1, 212, 376, 371, 188, 373, - -1, -1, -1, -1, -1, -1, 412, -1, 414, 415, - -1, 201, 147, 84, 85, 86, 87, 88, -1, 147, - 412, -1, 414, 415, -1, -1, 187, -1, -1, 435, - 436, 192, 412, -1, 414, 415, -1, -1, 412, -1, - 414, 415, -1, 435, 436, -1, 207, 208, -1, 266, - -1, 212, 187, -1, -1, 435, 436, 192, -1, 187, - -1, 435, 436, -1, 192, -1, -1, 147, -1, -1, - 260, -1, 207, 208, -1, -1, -1, 212, -1, 207, - 208, 271, -1, 273, 212, -1, 276, 32, 33, 144, - 35, -1, -1, -1, 39, -1, 151, -1, 288, 154, - -1, -1, 147, 48, -1, 266, 51, 187, -1, -1, - -1, -1, 192, 274, -1, -1, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 207, 208, -1, - -1, 266, 212, -1, 324, -1, 147, -1, 266, 274, - -1, -1, 187, -1, 89, 90, 274, 192, -1, -1, - -1, -1, -1, -1, 371, -1, 373, 347, 348, 349, - 350, -1, 207, 208, -1, -1, -1, 212, -1, -1, - -1, -1, -1, -1, -1, -1, 187, -1, -1, -1, - -1, 192, 372, -1, 374, 375, 266, -1, -1, -1, - -1, -1, -1, -1, 274, 412, 207, 208, 415, -1, - -1, 212, -1, -1, 32, 33, -1, 35, -1, 264, - 371, 39, 373, -1, -1, -1, 44, -1, 435, 436, - 48, 266, -1, 51, 52, -1, 416, -1, -1, 274, - -1, 286, 287, -1, -1, -1, 371, -1, 373, -1, - -1, 32, 33, 371, 35, 373, -1, -1, 39, -1, - -1, 412, -1, 414, 415, 266, -1, 48, -1, -1, - 51, 89, 90, 274, 319, -1, -1, 322, -1, -1, - -1, -1, -1, -1, 435, 436, -1, 412, -1, 414, - 415, -1, -1, -1, 412, -1, 414, 415, -1, -1, - -1, 371, -1, 373, -1, -1, -1, -1, 89, 90, - 435, 436, -1, -1, -1, -1, -1, 435, 436, -1, - 58, 59, -1, 368, 62, 63, 64, 65, 66, 67, - -1, -1, -1, -1, -1, -1, 371, -1, 373, 384, - -1, 386, 412, 388, 414, 415, 84, 85, 86, 87, - 88, -1, 32, 33, -1, 35, -1, -1, -1, 39, - -1, -1, 8, -1, -1, 435, 436, -1, 48, -1, - 371, 51, 373, -1, -1, -1, -1, 412, -1, 414, - 415, -1, -1, -1, -1, -1, 32, 33, 34, 35, - 36, 37, 38, -1, 40, 41, 42, 43, 44, -1, - 435, 436, 48, 49, -1, -1, 52, -1, -1, 89, - 90, 412, -1, 414, 415, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, -1, -1, -1, -1, 8, - -1, -1, -1, -1, 435, 436, -1, -1, -1, 85, - -1, -1, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 32, 33, 34, 35, 36, 37, 38, - -1, 40, 41, 42, 43, 44, -1, -1, -1, 48, - -1, -1, -1, 52, -1, 54, 32, 33, -1, 35, - -1, 32, 33, 39, 35, -1, -1, -1, 39, 68, - 69, -1, 48, -1, -1, 51, 8, 48, -1, -1, - 51, -1, -1, -1, -1, -1, 85, -1, -1, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, - 42, 43, 44, 89, 90, -1, 48, -1, 89, 90, - 52, -1, -1, 32, 33, -1, 35, -1, 32, 33, - 39, 35, -1, -1, -1, 39, 68, 69, -1, 48, - -1, -1, 51, 8, 48, -1, -1, 51, -1, -1, - -1, -1, -1, 85, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 32, 33, 34, - 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, - 89, 90, -1, 48, -1, 89, 90, 52, 58, 59, - -1, 61, 62, 63, 64, 65, 66, 67, -1, -1, - -1, -1, -1, 68, 69, -1, -1, -1, -1, -1, - -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, - 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 3, -1, -1, -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, -1, - -1, 40, 41, 42, 43, -1, -1, 46, 47, 48, - -1, -1, -1, -1, -1, 3, 4, 56, 57, -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, - 89, 90, 40, 41, 42, 43, 32, 33, 46, 35, - 48, -1, -1, 39, -1, -1, 3, -1, 56, 57, - -1, -1, 48, -1, 11, 51, -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, 89, 90, 40, 41, 42, 43, -1, -1, 46, - 47, 48, -1, 89, 90, -1, -1, 3, 4, 56, - 57, -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, 89, 90, 40, 41, 42, 43, -1, -1, - 46, -1, 48, -1, -1, -1, -1, -1, 3, -1, - 56, 57, -1, -1, -1, -1, 11, -1, -1, 14, + 0, 46, 72, 3, 4, 93, 189, 72, 8, 3, + 4, 271, 48, 141, 271, 48, 22, 271, 89, 90, + 148, 44, 20, 151, 44, 25, 209, 3, 4, 5, + 6, 7, 85, 44, 34, 35, 94, 95, 91, 0, + 34, 35, 95, 54, 50, 32, 33, 47, 35, 54, + 70, 54, 44, 89, 90, 90, 89, 90, 103, 144, + 52, 48, 45, 45, 51, 91, 45, 50, 50, 56, + 57, 50, 72, 45, 45, 48, 45, 45, 72, 50, + 263, 50, 50, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 94, 45, 45, 90, 52, 184, + 50, 50, 89, 90, 189, 45, 32, 33, 54, 35, + 50, 58, 59, 39, 90, 46, 45, 44, 44, 204, + 205, 50, 48, 45, 209, 51, 52, 48, 50, 45, + 45, 48, 144, 261, 50, 50, 136, 84, 85, 86, + 87, 88, 142, 52, 144, 86, 87, 88, 44, 149, + 144, 411, 152, 52, 411, 283, 284, 411, 48, 32, + 33, 50, 35, 89, 90, 49, 44, 40, 41, 42, + 43, 241, 184, 52, 44, 48, 241, 189, 263, 54, + 180, 44, 44, 44, 184, 368, 271, 370, 316, 189, + 184, 319, 204, 205, 44, 189, 194, 209, 84, 85, + 86, 87, 88, 44, 204, 205, 53, 44, 54, 209, + 204, 205, 54, 26, 54, 209, 89, 90, 288, 289, + 44, 48, 54, 288, 289, 54, 409, 44, 54, 412, + 44, 49, 45, 54, 54, 48, 49, 365, 45, 19, + 95, 241, 32, 33, 53, 35, 44, 241, 53, 432, + 433, 263, 44, 381, 49, 383, 44, 385, 48, 271, + 44, 51, 49, 263, 49, 335, 44, 44, 54, 263, + 335, 271, 272, 54, 44, 44, 44, 271, 54, 54, + 17, 54, 22, 368, 184, 370, 374, 54, 288, 289, + 103, 54, 54, 54, 288, 289, 54, 45, 45, 89, + 90, 45, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 144, 135, 45, 409, 54, 411, 412, 54, 8, + 54, 8, 8, 411, 147, 335, 194, 150, -1, -1, + 153, 335, 155, -1, 157, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 400, 368, 402, 370, 404, + -1, 184, -1, -1, -1, -1, 189, -1, 368, -1, + 370, -1, 185, 373, 368, -1, 370, 32, 33, -1, + 35, 204, 205, -1, 39, 198, 209, -1, -1, -1, + -1, 144, -1, 48, -1, -1, 51, 409, -1, 411, + 412, 144, -1, -1, -1, -1, -1, -1, -1, 409, + -1, 411, 412, -1, -1, 409, -1, 411, 412, 144, + 432, 433, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 184, 432, 433, 89, 90, 189, -1, 432, 433, + 263, 184, -1, -1, 257, -1, 189, -1, 271, -1, + -1, 204, 205, -1, -1, 268, 209, 270, -1, 184, + 273, 204, 205, -1, 189, -1, 209, 32, 33, -1, + 35, -1, 285, -1, 39, -1, 144, -1, -1, 204, + 205, -1, -1, 48, 209, -1, 51, -1, -1, -1, + 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, + 313, -1, -1, 144, -1, -1, -1, -1, 321, 144, + 263, -1, -1, -1, -1, -1, 184, -1, 271, -1, + 263, 189, -1, -1, 89, 90, -1, -1, 271, -1, + -1, 344, 345, 346, 347, -1, 204, 205, 263, -1, + -1, 209, -1, 184, -1, 368, 271, 370, 189, 184, + -1, -1, -1, -1, 189, -1, 369, -1, 371, 372, + -1, -1, -1, 204, 205, -1, -1, -1, 209, 204, + 205, -1, -1, -1, 209, -1, -1, -1, -1, -1, + -1, -1, 32, 33, -1, 35, 409, -1, 411, 412, + 40, 41, 42, 43, -1, 263, -1, -1, 48, -1, + 413, -1, -1, 271, -1, -1, 56, 57, -1, 432, + 433, -1, -1, 32, 33, 368, 35, 370, -1, -1, + 39, -1, 263, -1, -1, 368, -1, 370, 263, 48, + 271, -1, 51, -1, -1, -1, 271, -1, -1, 89, + 90, 32, 33, 368, 35, 370, 32, 33, 39, 35, + -1, -1, -1, 39, -1, -1, 409, 48, 411, 412, + 51, -1, 48, -1, -1, 51, 409, -1, 411, 412, + 89, 90, -1, -1, -1, -1, -1, -1, -1, 432, + 433, -1, -1, -1, 409, -1, 411, 412, -1, 432, + 433, -1, 9, 10, -1, 12, 13, -1, 89, 90, + 368, -1, 370, 89, 90, -1, -1, 432, 433, -1, + -1, -1, -1, -1, -1, 32, 33, -1, 35, -1, + -1, -1, -1, -1, -1, -1, -1, 368, -1, 370, + -1, 48, -1, 368, 51, 370, -1, -1, -1, 56, + 57, 409, -1, 411, 412, -1, -1, -1, -1, -1, + -1, -1, -1, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 432, 433, -1, -1, 409, -1, + 411, 412, 89, 90, 409, -1, 411, 412, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, + -1, 432, 433, -1, -1, -1, 11, 432, 433, 14, 15, 16, -1, 18, 19, 20, 21, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, -1, - 35, -1, -1, 89, 90, 40, 41, 42, 43, -1, - -1, 46, -1, 48, -1, -1, -1, -1, -1, -1, - -1, 56, 57, 32, 33, -1, 35, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, - -1, -1, 51, -1, -1, -1, -1, 56, 57, -1, - -1, -1, -1, -1, 89, 90, -1, -1, -1, -1, - -1, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 45, -1, -1, -1, -1, 50, -1, -1, - 89, 90, 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, -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, -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, - 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, + 35, -1, -1, -1, -1, 40, 41, 42, 43, -1, + -1, 46, 47, 48, -1, -1, -1, -1, -1, 3, + 4, 56, 57, -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, 89, 90, 40, 41, 42, 43, + 32, 33, 46, 35, 48, -1, -1, 39, -1, -1, + 3, -1, 56, 57, -1, -1, 48, -1, 11, 51, + -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, 89, 90, 40, 41, 42, + 43, -1, -1, 46, 47, 48, -1, 89, 90, -1, + -1, 3, 4, 56, 57, -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, 89, 90, 40, 41, + 42, 43, 32, 33, 46, 35, 48, -1, -1, 39, + -1, -1, 3, -1, 56, 57, -1, -1, 48, -1, + 11, 51, -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, 89, 90, 40, + 41, 42, 43, -1, -1, 46, -1, 48, -1, 89, + 90, -1, -1, -1, -1, 56, 57, 32, 33, 34, + 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, + 50, -1, -1, 48, 49, 55, -1, 52, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 89, 90, + -1, -1, -1, 68, 69, -1, -1, 8, -1, -1, + -1, 81, 82, 83, 84, 85, 86, 87, 88, -1, + 85, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 95, 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, 32, 33, -1, 35, + -1, -1, -1, 39, -1, -1, -1, 68, 69, -1, + -1, 8, 48, -1, -1, 51, -1, -1, -1, -1, + -1, -1, -1, -1, 85, -1, -1, 88, 89, 90, + 91, 92, 93, 94, 95, 32, 33, 34, 35, 36, + 37, 38, -1, 40, 41, 42, 43, 44, -1, -1, + -1, 48, -1, 89, 90, 52, -1, -1, -1, -1, + 32, 33, -1, 35, -1, -1, -1, 39, -1, -1, + -1, 68, 69, -1, -1, 8, 48, -1, -1, 51, + -1, -1, -1, -1, -1, -1, -1, -1, 85, -1, + -1, 88, 89, 90, 91, 92, 93, 94, 95, 32, + 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, + 43, 44, -1, -1, -1, 48, -1, 89, 90, 52, + -1, -1, -1, -1, -1, -1, -1, 45, -1, -1, + -1, -1, 50, -1, -1, 68, 69, 55, -1, -1, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + -1, -1, 85, -1, -1, 88, 89, 90, 91, 92, + 93, 94, 95, 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, 54, 55, -1, -1, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, -1, + 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, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 54, 55, -1, -1, 58, 59, 60, 61, 62, 63, + -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, -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, 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, -1, 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, -1, 82, 83, 84, - 85, 86, 87, 88, 58, 59, -1, -1, 62, 63, - 64, 65, 66, 67, 58, 59, -1, -1, -1, -1, - 64, 65, 66, 67, -1, -1, -1, -1, 82, -1, - 84, 85, 86, 87, 88, -1, -1, -1, -1, -1, - 84, 85, 86, 87, 88 + 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, 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, 53, -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, 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, -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, 58, 59, -1, -1, -1, -1, 64, 65, 66, + 67, -1, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88, -1, -1, -1, -1, -1, 84, 85, 86, + 87, 88 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 90, 109, 110, 111, - 112, 113, 114, 115, 116, 179, 89, 179, 180, 180, - 44, 0, 111, 112, 113, 44, 70, 54, 54, 91, - 182, 161, 179, 8, 32, 33, 34, 35, 36, 37, + 0, 3, 4, 5, 6, 7, 90, 106, 107, 108, + 109, 110, 111, 112, 113, 176, 89, 176, 177, 177, + 44, 0, 108, 109, 110, 44, 70, 54, 54, 91, + 179, 158, 176, 8, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 48, 52, 68, 69, - 85, 88, 92, 93, 94, 95, 96, 97, 98, 146, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 85, 88, 92, 93, 94, 95, 143, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 161, 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, 187, 188, 45, 45, 50, 48, 179, - 180, 48, 179, 180, 48, 146, 48, 49, 146, 162, - 163, 179, 146, 146, 94, 95, 90, 54, 55, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 81, - 82, 83, 84, 85, 86, 87, 88, 39, 48, 51, - 158, 159, 179, 180, 44, 52, 54, 46, 119, 179, - 48, 44, 52, 48, 44, 52, 48, 45, 50, 146, - 50, 49, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 179, 52, 162, 163, 179, 3, 11, 14, - 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 47, 48, 56, 57, 117, - 118, 119, 120, 122, 123, 124, 125, 126, 127, 128, + 184, 185, 45, 45, 50, 48, 176, 177, 48, 176, + 177, 48, 143, 48, 49, 143, 159, 160, 176, 143, + 143, 94, 95, 90, 54, 55, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 81, 82, 83, 84, + 85, 86, 87, 88, 39, 48, 51, 155, 156, 176, + 177, 44, 52, 54, 46, 116, 176, 48, 44, 52, + 48, 44, 52, 48, 45, 50, 143, 50, 49, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 176, + 52, 159, 160, 176, 3, 11, 14, 15, 16, 18, + 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 47, 48, 56, 57, 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, 142, 143, 144, 145, 148, 149, 150, - 156, 157, 165, 166, 169, 173, 174, 175, 176, 179, - 146, 162, 179, 146, 162, 179, 146, 146, 49, 146, - 53, 49, 179, 45, 44, 4, 120, 146, 54, 44, - 54, 44, 117, 44, 44, 44, 44, 85, 182, 186, - 53, 54, 54, 54, 146, 54, 44, 44, 48, 156, - 157, 169, 169, 47, 117, 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, 146, 162, 4, 54, - 45, 146, 19, 146, 121, 148, 149, 150, 169, 179, - 146, 53, 53, 54, 162, 162, 146, 44, 44, 44, - 44, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 49, 162, 49, 162, 49, 146, 44, 45, - 54, 45, 44, 45, 54, 22, 50, 45, 45, 45, - 146, 146, 146, 146, 44, 45, 44, 45, 44, 45, - 162, 117, 146, 117, 146, 147, 146, 179, 119, 54, - 54, 45, 45, 50, 45, 50, 45, 50, 162, 162, - 162, 45, 17, 45, 54, 45, 22, 54, 54, 163, - 54, 163, 54, 163, 45, 45, 45, 117, 54, 121, - 117, 146, 45, 45, 45, 45, 45, 54, 54, 54, - 117, 117 + 139, 140, 141, 142, 145, 146, 147, 153, 154, 162, + 163, 166, 170, 171, 172, 173, 176, 143, 159, 176, + 143, 159, 176, 143, 143, 49, 143, 53, 49, 176, + 45, 44, 4, 117, 143, 54, 44, 54, 44, 114, + 44, 44, 44, 44, 85, 179, 183, 53, 54, 54, + 54, 143, 54, 44, 44, 48, 153, 154, 166, 166, + 47, 114, 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, 143, 159, 4, 54, 45, 143, 19, + 143, 118, 145, 146, 147, 166, 176, 143, 53, 53, + 54, 159, 159, 143, 44, 44, 44, 44, 143, 143, + 143, 143, 143, 143, 143, 143, 143, 143, 143, 49, + 159, 49, 159, 49, 143, 44, 45, 54, 45, 44, + 45, 54, 22, 50, 45, 45, 45, 143, 143, 143, + 143, 44, 45, 44, 45, 44, 45, 159, 114, 143, + 114, 143, 144, 143, 176, 116, 54, 54, 45, 45, + 50, 45, 50, 45, 50, 159, 159, 159, 45, 17, + 45, 54, 45, 22, 54, 54, 160, 54, 160, 54, + 160, 45, 45, 45, 114, 54, 118, 114, 143, 45, + 45, 45, 45, 45, 54, 54, 54, 114, 114 }; 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, 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, 164, 165, 166, 167, 168, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 180, 181, 182, - 183, 184, 185, 185, 186, 186, 186, 186, 186, 187, - 188 + 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, 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, 127, 128, 129, 130, 131, 132, 133, 133, 134, + 135, 135, 136, 137, 138, 139, 139, 140, 141, 142, + 143, 143, 143, 144, 144, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 146, 146, 147, 147, + 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 151, 152, 153, + 153, 154, 154, 155, 155, 155, 155, 155, 155, 156, + 156, 156, 156, 157, 158, 158, 158, 159, 159, 160, + 160, 161, 161, 162, 163, 164, 165, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 177, 178, 179, + 180, 181, 182, 182, 183, 183, 184, 185 }; const signed char @@ -4486,8 +4436,7 @@ namespace xsk { namespace gsc { namespace s2 { 1, 2, 3, 4, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 7, 2, 1, 2, 1, 1, 1, 1, 1, - 1 + 1, 7, 2, 1, 2, 1, 1, 1 }; @@ -4497,29 +4446,28 @@ namespace xsk { namespace gsc { namespace s2 { const short parser::yyrline_[] = { - 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, 718, 723, 728, 729, 730, - 731, 732, 733, 734, 735, 736, 740, 745, 750, 755, - 760, 765, 770, 775, 780, 785, 790, 792, 797, 802, - 807, 812, 817, 819, 824, 826, 828, 830, 832, 837, - 842 + 0, 251, 251, 252, 256, 258, 260, 262, 264, 266, + 271, 275, 280, 281, 282, 283, 284, 288, 293, 298, + 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, 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, 414, 419, 424, 429, 434, 439, 444, 446, 451, + 456, 458, 463, 468, 473, 478, 480, 485, 490, 495, + 500, 501, 502, 506, 507, 511, 513, 515, 517, 519, + 521, 523, 525, 527, 529, 531, 536, 538, 543, 545, + 550, 555, 557, 559, 561, 563, 565, 567, 569, 571, + 573, 575, 577, 579, 581, 583, 585, 587, 589, 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, 625, 630, 635, + 636, 639, 640, 644, 646, 648, 650, 652, 654, 659, + 661, 663, 665, 670, 675, 677, 680, 684, 687, 691, + 693, 698, 700, 705, 710, 715, 720, 725, 726, 727, + 728, 729, 730, 731, 732, 733, 737, 742, 747, 752, + 757, 762, 767, 772, 777, 782, 787, 789, 794, 799, + 804, 809, 814, 816, 821, 823, 828, 833 }; void @@ -4552,9 +4500,9 @@ namespace xsk { namespace gsc { namespace s2 { #line 13 "parser.ypp" } } } // xsk::gsc::s2 -#line 4556 "parser.cpp" +#line 4504 "parser.cpp" -#line 846 "parser.ypp" +#line 837 "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 624bcec..f155843 100644 --- a/src/s2/xsk/parser.hpp +++ b/src/s2/xsk/parser.hpp @@ -624,10 +624,7 @@ namespace xsk { namespace gsc { namespace s2 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy67[sizeof (std::string)]; }; @@ -772,19 +769,16 @@ namespace xsk { namespace gsc { namespace s2 { ISTRING = 92, // "localized string" COLOR = 93, // "color" FLOAT = 94, // "float" - INT_DEC = 95, // "int" - INT_OCT = 96, // "octal int" - INT_BIN = 97, // "binary int" - INT_HEX = 98, // "hexadecimal int" - 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 + 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 }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -801,7 +795,7 @@ namespace xsk { namespace gsc { namespace s2 { { enum symbol_kind_type { - YYNTOKENS = 108, ///< Number of tokens. + YYNTOKENS = 105, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -898,100 +892,97 @@ namespace xsk { namespace gsc { namespace s2 { S_ISTRING = 92, // "localized string" S_COLOR = 93, // "color" S_FLOAT = 94, // "float" - S_INT_DEC = 95, // "int" - S_INT_OCT = 96, // "octal int" - S_INT_BIN = 97, // "binary int" - S_INT_HEX = 98, // "hexadecimal int" - 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_reference = 164, // expr_reference - S_expr_array = 165, // expr_array - S_expr_field = 166, // expr_field - S_expr_size = 167, // expr_size - S_expr_paren = 168, // expr_paren - S_expr_object = 169, // expr_object - S_expr_thisthread = 170, // expr_thisthread - S_expr_empty_array = 171, // expr_empty_array - S_expr_undefined = 172, // expr_undefined - S_expr_game = 173, // expr_game - S_expr_self = 174, // expr_self - S_expr_anim = 175, // expr_anim - S_expr_level = 176, // expr_level - S_expr_animation = 177, // expr_animation - S_expr_animtree = 178, // expr_animtree - S_expr_identifier = 179, // expr_identifier - S_expr_path = 180, // expr_path - S_expr_istring = 181, // expr_istring - S_expr_string = 182, // expr_string - S_expr_color = 183, // expr_color - S_expr_vector = 184, // expr_vector - S_expr_float = 185, // expr_float - S_expr_integer = 186, // expr_integer - S_expr_false = 187, // expr_false - S_expr_true = 188 // expr_true + 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_waitframe = 127, // stmt_waitframe + S_stmt_if = 128, // stmt_if + S_stmt_ifelse = 129, // stmt_ifelse + S_stmt_while = 130, // stmt_while + S_stmt_dowhile = 131, // stmt_dowhile + S_stmt_for = 132, // stmt_for + S_stmt_foreach = 133, // stmt_foreach + S_stmt_switch = 134, // stmt_switch + S_stmt_case = 135, // stmt_case + S_stmt_default = 136, // stmt_default + S_stmt_break = 137, // stmt_break + S_stmt_continue = 138, // stmt_continue + S_stmt_return = 139, // stmt_return + S_stmt_breakpoint = 140, // stmt_breakpoint + S_stmt_prof_begin = 141, // stmt_prof_begin + S_stmt_prof_end = 142, // stmt_prof_end + S_expr = 143, // expr + S_expr_or_empty = 144, // expr_or_empty + S_expr_assign = 145, // expr_assign + S_expr_increment = 146, // expr_increment + S_expr_decrement = 147, // expr_decrement + S_expr_ternary = 148, // expr_ternary + S_expr_binary = 149, // expr_binary + S_expr_primitive = 150, // expr_primitive + S_expr_complement = 151, // expr_complement + S_expr_not = 152, // expr_not + S_expr_call = 153, // expr_call + S_expr_method = 154, // expr_method + S_expr_function = 155, // expr_function + S_expr_pointer = 156, // expr_pointer + S_expr_add_array = 157, // expr_add_array + S_expr_parameters = 158, // expr_parameters + S_expr_arguments = 159, // expr_arguments + S_expr_arguments_no_empty = 160, // expr_arguments_no_empty + S_expr_reference = 161, // expr_reference + S_expr_array = 162, // expr_array + S_expr_field = 163, // expr_field + S_expr_size = 164, // expr_size + S_expr_paren = 165, // expr_paren + S_expr_object = 166, // expr_object + S_expr_thisthread = 167, // expr_thisthread + S_expr_empty_array = 168, // expr_empty_array + S_expr_undefined = 169, // expr_undefined + S_expr_game = 170, // expr_game + S_expr_self = 171, // expr_self + S_expr_anim = 172, // expr_anim + S_expr_level = 173, // expr_level + S_expr_animation = 174, // expr_animation + S_expr_animtree = 175, // expr_animtree + S_expr_identifier = 176, // expr_identifier + S_expr_path = 177, // expr_path + S_expr_istring = 178, // expr_istring + S_expr_string = 179, // expr_string + S_expr_color = 180, // expr_color + S_expr_vector = 181, // expr_vector + S_expr_float = 182, // expr_float + S_expr_integer = 183, // expr_integer + S_expr_false = 184, // expr_false + S_expr_true = 185 // expr_true }; }; @@ -1310,10 +1301,7 @@ namespace xsk { namespace gsc { namespace s2 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2582,10 +2570,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2695,7 +2680,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - S2_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + S2_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4173,61 +4158,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -4709,7 +4649,7 @@ switch (yykind) /// Constants. enum { - yylast_ = 2254, ///< Last index in yytable_. + yylast_ = 2191, ///< Last index in yytable_. yynnts_ = 81, ///< Number of nonterminal symbols. yyfinal_ = 21 ///< Termination state number. }; @@ -5020,10 +4960,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5338,10 +5275,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5408,7 +5342,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s2 -#line 5412 "parser.hpp" +#line 5346 "parser.hpp" diff --git a/src/s2/xsk/resolver.cpp b/src/s2/xsk/resolver.cpp index 144c3dd..8f7ff2f 100644 --- a/src/s2/xsk/resolver.cpp +++ b/src/s2/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::s2 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,14 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); + return utils::string::va("_func_%04X", id); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -86,14 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } - throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); + return utils::string::va("_meth_%04X", id); } auto resolver::file_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -110,14 +125,19 @@ auto resolver::file_name(std::uint16_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -134,14 +154,16 @@ auto resolver::token_name(std::uint16_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -154,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -164,166 +188,184 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 155> opcode_list {{ - { std::uint8_t(opcode::OP_End),"END" }, - { std::uint8_t(opcode::OP_Return),"RETN" }, - { std::uint8_t(opcode::OP_GetByte),"GET_BYTE" }, - { std::uint8_t(opcode::OP_GetNegByte),"GET_NBYTE" }, - { std::uint8_t(opcode::OP_GetUnsignedShort),"GET_USHORT" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort),"GET_NUSHORT" }, - { std::uint8_t(opcode::OP_GetInteger),"GET_INT" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction),"GET_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod),"GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetFloat),"GET_FLOAT" }, - { std::uint8_t(opcode::OP_GetString),"GET_STRING" }, - { std::uint8_t(opcode::OP_GetUndefined),"GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_GetZero),"GET_ZERO" }, - { std::uint8_t(opcode::OP_waittillFrameEnd),"WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_CreateLocalVariable),"CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables),"REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0),"EVAL_LOCAL_VARIABLE_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1),"EVAL_LOCAL_VARIABLE_CACHED1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2),"EVAL_LOCAL_VARIABLE_CACHED2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3),"EVAL_LOCAL_VARIABLE_CACHED3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4),"EVAL_LOCAL_VARIABLE_CACHED4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5),"EVAL_LOCAL_VARIABLE_CACHED5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached),"EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached),"EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_EvalArray),"EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0),"EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0),"EVAL_LOCAL_ARRAY_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached),"EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalArrayRef),"EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_ClearArray),"CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_EmptyArray),"EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_AddArray),"ADD_ARRAY" }, - { std::uint8_t(opcode::OP_PreScriptCall),"PRE_CALL" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2),"CALL_LOCAL_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall),"CALL_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall),"CALL_LOCAL_METHOD" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall),"CALL_LOCAL_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall),"CALL_LOCAL_FUNC_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall),"CALL_LOCAL_METHOD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall),"CALL_LOCAL_METHOD_CHILD_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2),"CALL_FAR_FUNC2" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall),"CALL_FAR_FUNC" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall),"CALL_FAR_METHOD" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall),"CALL_FAR_FUNC_THREAD" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall),"CALL_FAR_FUNC_CHILD_THREAD"}, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall),"CALL_FAR_METHOD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall),"CALL_FAR_METHOD_CHILD_THEAD" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer),"CALL_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer),"CALL_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer),"CALL_FUNC_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer),"CALL_FUNC_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer),"CALL_METHOD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer),"CALL_METHOD_CHILD_THREAD_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer),"CALL_BUILTIN_FUNC_POINTER" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer),"CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_GetIString),"GET_ISTRING" }, - { std::uint8_t(opcode::OP_GetVector),"GET_VECTOR" }, - { std::uint8_t(opcode::OP_GetLevelObject),"GET_LEVEL_OBJ" }, - { std::uint8_t(opcode::OP_GetAnimObject),"GET_ANIM_OBJ" }, - { std::uint8_t(opcode::OP_GetSelf),"GET_SELF" }, - { std::uint8_t(opcode::OP_GetThisthread),"GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_GetLevel),"GET_LEVEL" }, - { std::uint8_t(opcode::OP_GetGame),"GET_GAME" }, - { std::uint8_t(opcode::OP_GetAnim),"GET_ANIM" }, - { std::uint8_t(opcode::OP_GetAnimation),"GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetGameRef),"GET_GAME_REF" }, - { std::uint8_t(opcode::OP_inc),"INC" }, - { std::uint8_t(opcode::OP_dec),"DEC" }, - { std::uint8_t(opcode::OP_bit_or),"BIT_OR" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr),"JMP_EXPR_FALSE" }, - { std::uint8_t(opcode::OP_bit_ex_or),"BIT_EXOR" }, - { std::uint8_t(opcode::OP_bit_and),"BIT_AND" }, - { std::uint8_t(opcode::OP_equality),"EQUALITY" }, - { std::uint8_t(opcode::OP_inequality),"INEQUALITY" }, - { std::uint8_t(opcode::OP_less),"LESS" }, - { std::uint8_t(opcode::OP_greater),"GREATER" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr),"JMP_EXPR_TRUE" }, - { std::uint8_t(opcode::OP_less_equal),"LESSEQUAL" }, - { std::uint8_t(opcode::OP_jumpback),"JMP_BACK" }, - { std::uint8_t(opcode::OP_waittillmatch2),"WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_waittill),"WAITTILL" }, - { std::uint8_t(opcode::OP_notify),"NOTIFY" }, - { std::uint8_t(opcode::OP_endon),"ENDON" }, - { std::uint8_t(opcode::OP_voidCodepos),"VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_switch),"SWITCH" }, - { std::uint8_t(opcode::OP_endswitch),"ENDSWITCH" }, - { std::uint8_t(opcode::OP_vector),"VECTOR" }, - { std::uint8_t(opcode::OP_JumpOnFalse),"JMP_FALSE" }, - { std::uint8_t(opcode::OP_greater_equal),"GREATEREQUAL" }, - { std::uint8_t(opcode::OP_shift_left),"SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_shift_right),"SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_plus),"PLUS" }, - { std::uint8_t(opcode::OP_jump),"JMP" }, - { std::uint8_t(opcode::OP_minus),"MINUS" }, - { std::uint8_t(opcode::OP_multiply),"MULT" }, - { std::uint8_t(opcode::OP_divide),"DIV" }, - { std::uint8_t(opcode::OP_mod),"MOD" }, - { std::uint8_t(opcode::OP_JumpOnTrue),"JMP_TRUE" }, - { std::uint8_t(opcode::OP_size),"SIZE" }, - { std::uint8_t(opcode::OP_waittillmatch),"WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_GetLocalFunction),"GET_LOCAL_FUNC" }, - { std::uint8_t(opcode::OP_GetFarFunction),"GET_FAR_FUNC" }, - { std::uint8_t(opcode::OP_GetSelfObject),"GET_SELF_OBJ" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable),"EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable),"EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable),"EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalFieldVariable),"EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef),"EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef),"EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef),"EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef),"EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ClearFieldVariable),"CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached),"SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0),"SAFE_SET_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached),"SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached),"SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_GetAnimTree),"GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_clearparams),"CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_checkclearparams),"CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0),"EVAL_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0),"EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached),"EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField),"SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetVariableField),"SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_ClearVariableField),"CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField),"SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField),"SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0),"SET_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0),"SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached),"SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0),"CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_wait),"WAIT" }, - { std::uint8_t(opcode::OP_DecTop),"DEC_TOP" }, - { std::uint8_t(opcode::OP_CastFieldObject),"CAST_FIELD_OBJ" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached),"EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_CastBool),"CAST_BOOL" }, - { std::uint8_t(opcode::OP_BoolNot),"BOOL_NOT" }, - { std::uint8_t(opcode::OP_BoolComplement),"BOOL_COMPLEMENT" }, - { std::uint8_t(opcode::OP_waitFrame), "WAITFRAME" }, - { std::uint8_t(opcode::OP_BoolNotAfterAnd), "BOOL_NOT_AFTER_AND" }, + { 0x17, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x18, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x19, "RETN" }, + { 0x1A, "CALL_BUILTIN_FUNC_0" }, + { 0x1B, "CALL_BUILTIN_FUNC_1" }, + { 0x1C, "CALL_BUILTIN_FUNC_2" }, + { 0x1D, "CALL_BUILTIN_FUNC_3" }, + { 0x1E, "CALL_BUILTIN_FUNC_4" }, + { 0x1F, "CALL_BUILTIN_FUNC_5" }, + { 0x20, "CALL_BUILTIN_FUNC" }, + { 0x21, "BOOL_NOT" }, + { 0x22, "CALL_FAR_METHOD_THEAD" }, + { 0x23, "JMP_EXPR_TRUE" }, + { 0x24, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x25, "CAST_BOOL" }, + { 0x26, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED0" }, + { 0x27, "CALL_BUILTIN_FUNC_POINTER" }, + { 0x28, "INEQUALITY" }, + { 0x29, "GET_THISTHREAD" }, + { 0x2A, "CLEAR_FIELD_VARIABLE" }, + { 0x2B, "GET_FLOAT" }, + { 0x2C, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x2D, "CALL_FAR_FUNC2" }, + { 0x2E, "CALL_FAR_FUNC" }, + { 0x2F, "CALL_FAR_FUNC_CHILD_THREAD" }, + { 0x30, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x31, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x32, "CHECK_CLEAR_PARAMS" }, + { 0x33, "CAST_FIELD_OBJ" }, + { 0x34, "END" }, + { 0x35, "SIZE" }, + { 0x36, "EMPTY_ARRAY" }, + { 0x37, "BIT_AND" }, + { 0x38, "LESSEQUAL" }, + { 0x39, "VOIDCODEPOS" }, + { 0x3A, "CALL_METHOD_THREAD_POINTER" }, + { 0x3B, "ENDSWITCH" }, + { 0x3C, "CLEAR_VARIABLE_FIELD" }, + { 0x3D, "DIV" }, + { 0x3E, "CALL_FAR_METHOD_CHILD_THEAD" }, + { 0x3F, "GET_USHORT" }, + { 0x40, "JMP_TRUE" }, + { 0x41, "GET_SELF" }, + { 0x42, "CALL_FAR_FUNC_THREAD" }, + { 0x43, "CALL_LOCAL_FUNC_THREAD" }, + { 0x44, "SET_LOCAL_VARIABLE_FIELD_CACHED0" }, + { 0x45, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x46, "PLUS" }, + { 0x47, "BOOL_COMPLEMENT" }, + { 0x48, "CALL_METHOD_POINTER" }, + { 0x49, "INC" }, + { 0x4A, "REMOVE_LOCAL_VARIABLES" }, + { 0x4B, "JMP_EXPR_FALSE" }, + { 0x4C, "SWITCH" }, + { 0x4D, "CLEAR_PARAMS" }, + { 0x4E, "EVAL_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x4F, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x50, "CALL_LOCAL_METHOD" }, + { 0x51, "EVAL_FIELD_VARIABLE" }, + { 0x52, "EVAL_FIELD_VARIABLE_REF" }, + { 0x53, "GET_STRING" }, + { 0x54, "CALL_FUNC_POINTER" }, + { 0x55, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x56, "GET_VECTOR" }, + { 0x57, "ENDON" }, + { 0x58, "GREATEREQUAL" }, + { 0x59, "GET_SELF_OBJ" }, + { 0x5A, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x5B, "SET_VARIABLE_FIELD" }, + { 0x5C, "CALL_LOCAL_FUNC2" }, + { 0x5D, "CALL_LOCAL_FUNC" }, + { 0x5E, "EVAL_LOCAL_ARRAY_REF_CACHED0" }, + { 0x5F, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x60, "GET_FAR_FUNC" }, + { 0x61, "LESS" }, + { 0x62, "GET_GAME_REF" }, + { 0x63, "WAITFRAME" }, + { 0x64, "WAITTILLFRAMEEND" }, + { 0x65, "SAFE_SET_VARIABLE_FIELD_CACHED0" }, + { 0x66, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x67, "CALL_METHOD_CHILD_THREAD_POINTER" }, + { 0x68, "GET_LEVEL" }, + { 0x69, "NOTIFY" }, + { 0x6A, "DEC_TOP" }, + { 0x6B, "SHIFT_LEFT" }, + { 0x6C, "CALL_LOCAL_METHOD_THREAD" }, + { 0x6D, "CALL_LOCAL_METHOD_CHILD_THREAD" }, + { 0x6E, "GREATER" }, + { 0x6F, "EVAL_LOCAL_VARIABLE_CACHED0" }, + { 0x70, "EVAL_LOCAL_VARIABLE_CACHED1" }, + { 0x71, "EVAL_LOCAL_VARIABLE_CACHED2" }, + { 0x72, "EVAL_LOCAL_VARIABLE_CACHED3" }, + { 0x73, "EVAL_LOCAL_VARIABLE_CACHED4" }, + { 0x74, "EVAL_LOCAL_VARIABLE_CACHED5" }, + { 0x75, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x76, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x77, "JMP" }, + { 0x78, "CALL_FUNC_THREAD_POINTER" }, + { 0x79, "GET_ZERO" }, + { 0x7A, "WAIT" }, + { 0x7B, "MINUS" }, + { 0x7C, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x7D, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED0" }, + { 0x7E, "MULT" }, + { 0x7F, "CREATE_LOCAL_VARIABLE" }, + { 0x80, "CALL_LOCAL_FUNC_CHILD_THREAD" }, + { 0x81, "GET_INT" }, + { 0x82, "MOD" }, + { 0x83, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x84, "GET_BUILTIN_FUNC" }, + { 0x85, "GET_GAME" }, + { 0x86, "WAITTILL" }, + { 0x87, "DEC" }, + { 0x88, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x89, "PRE_CALL" }, + { 0x8A, "GET_ANIM" }, + { 0x8B, "GET_UNDEFINED" }, + { 0x8C, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x8D, "GET_ANIM_OBJ" }, + { 0x8E, "GET_LEVEL_OBJ" }, + { 0x8F, "BIT_EXOR" }, + { 0x90, "EQUALITY" }, + { 0x91, "CLEAR_ARRAY" }, + { 0x92, "JMP_BACK" }, + { 0x93, "GET_ANIMATION" }, + { 0x94, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x95, "GET_ANIMTREE" }, + { 0x96, "GET_ISTRING" }, + { 0x97, "EVAL_ARRAY_REF" }, + { 0x98, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x99, "GET_NBYTE" }, + { 0x9A, "GET_BUILTIN_METHOD" }, + { 0x9B, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x9C, "EVAL_ARRAY" }, + { 0x9D, "VECTOR" }, + { 0x9E, "CALL_FAR_METHOD" }, + { 0x9F, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0xA0, "GET_BYTE" }, + { 0xA1, "CALL_FUNC_CHILD_THREAD_POINTER" }, + { 0xA2, "BIT_OR" }, + { 0xA3, "ADD_ARRAY" }, + { 0xA4, "WAITTILLMATCH2" }, + { 0xA5, "WAITTILLMATCH" }, + { 0xA6, "GET_LOCAL_FUNC" }, + { 0xA7, "GET_NUSHORT" }, + { 0xA8, "SHIFT_RIGHT" }, + { 0xA9, "CALL_BUILTIN_METHOD_0" }, + { 0xAA, "CALL_BUILTIN_METHOD_1" }, + { 0xAB, "CALL_BUILTIN_METHOD_2" }, + { 0xAC, "CALL_BUILTIN_METHOD_3" }, + { 0xAD, "CALL_BUILTIN_METHOD_4" }, + { 0xAE, "CALL_BUILTIN_METHOD_5" }, + { 0xAF, "CALL_BUILTIN_METHOD" }, + { 0xB0, "JMP_FALSE" }, + { 0xB1, "BOOL_NOT_AFTER_AND" }, }}; -const std::array function_list +const std::array, 1000> function_list {{ { 0x001, "_func_001" }, { 0x002, "_func_002" }, @@ -1327,7 +1369,7 @@ const std::array function_list { 0x3E8, "_func_3E8" }, }}; -const std::array method_list +const std::array, 1700> method_list {{ { 0x8000, "_meth_8000" }, { 0x8001, "_meth_8001" }, @@ -3031,14 +3073,18 @@ const std::array method_list { 0x86A3, "_meth_86A3" }, }}; -const std::array file_list +const std::array, 1> file_list {{ - { 0, "DUMMY" }, + { 0, "null" }, }}; -const std::array token_list +const std::array, 5> token_list {{ - { 0, "DUMMY" }, + { 0x00, "" }, + { 0x01, "pl#" }, + { 0x02, "-" }, + { 0x03, "radius`" }, + { 0x04, "note:" }, }}; struct __init__ @@ -3062,32 +3108,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/s2/xsk/resolver.hpp b/src/s2/xsk/resolver.hpp index 474a4cd..02b0638 100644 --- a/src/s2/xsk/resolver.hpp +++ b/src/s2/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::s2 diff --git a/src/s2/xsk/s2.hpp b/src/s2/xsk/s2.hpp index 0b0927d..b7ffc1f 100644 --- a/src/s2/xsk/s2.hpp +++ b/src/s2/xsk/s2.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::s2 { +constexpr std::uint16_t max_string_id = 0xACEE; + enum class opcode : std::uint8_t { OP_SetNewLocalVariableFieldCached0 = 0x17, diff --git a/src/s4/stdafx.hpp b/src/s4/stdafx.hpp index bb466e1..051c0cb 100644 --- a/src/s4/stdafx.hpp +++ b/src/s4/stdafx.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/s4/xsk/assembler.cpp b/src/s4/xsk/assembler.cpp index 4da66ec..c261fb8 100644 --- a/src/s4/xsk/assembler.cpp +++ b/src/s4/xsk/assembler.cpp @@ -92,10 +92,24 @@ void assembler::assemble(const std::string& file, std::vector& dat data.erase(data.begin()); inst->data = std::move(data); - if (opcode(inst->opcode) == opcode::OP_endswitch) + switch (opcode(inst->opcode)) { - switchnum = static_cast(std::stoi(inst->data[0])); - inst->size += 7 * switchnum; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = inst->data[0].substr(4); + break; + case opcode::OP_endswitch: + switchnum = static_cast(std::stoi(inst->data[0])); + inst->size += 7 * switchnum; + break; + default: + break; } index += inst->size; @@ -126,9 +140,9 @@ void assembler::assemble_function(const function::ptr& func) { labels_ = func->labels; - stack_->write(func->size); + func->id = resolver::token_id(func->name); - func->id = func->name.substr(0, 3) == "_ID" ? std::stoi(func->name.substr(3)) : resolver::token_id(func->name); + stack_->write(func->size); stack_->write(func->id); if (func->id == 0) @@ -433,24 +447,12 @@ void assembler::assemble_builtin_call(const instruction::ptr& inst, bool method, { script_->write(static_cast(inst->opcode)); - std::uint16_t id = 0; - if (args) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[1]))); + } - if (method) - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::method_id(inst->data[1]); - else - id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::function_id(inst->data[1]); - } - else - { - if (method) - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::method_id(inst->data[0]); - else - id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::function_id(inst->data[0]); - } + const auto id = method ? resolver::method_id(inst->data[0]) : resolver::function_id(inst->data[0]); script_->write(id); } @@ -459,9 +461,8 @@ void assembler::assemble_local_call(const instruction::ptr& inst, bool thread) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_function(inst->data[0]); - - std::int32_t offset = addr - inst->index - 1; + const auto addr = resolve_function(inst->data[0]); + const auto offset = static_cast(addr - inst->index - 1); assemble_offset(offset); @@ -477,96 +478,25 @@ void assembler::assemble_far_call(const instruction::ptr& inst, bool thread) script_->write(0); script_->write(0); - std::uint32_t file_id = 0; - std::uint32_t func_id = 0; - if (thread) { - script_->write(static_cast(std::stoi(inst->data[0]))); + script_->write(static_cast(std::stoi(inst->data[2]))); + } - file_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::file_id(inst->data[1]); - func_id = inst->data[2].substr(0, 3) == "_ID" ? std::stoi(inst->data[2].substr(3)) : resolver::token_id(inst->data[2]); - } - else - { - file_id = inst->data[0].substr(0, 3) == "_ID" ? std::stoi(inst->data[0].substr(3)) : resolver::file_id(inst->data[0]); - func_id = inst->data[1].substr(0, 3) == "_ID" ? std::stoi(inst->data[1].substr(3)) : resolver::token_id(inst->data[1]); - } + const auto file_id = resolver::file_id(inst->data[0]); + const auto func_id = resolver::token_id(inst->data[1]); stack_->write(file_id); - if (file_id == 0) stack_->write_c_string(thread ? inst->data[1] : inst->data[0]); + if (file_id == 0) stack_->write_c_string(inst->data[0]); stack_->write(func_id); - if (func_id == 0) stack_->write_c_string(thread ? inst->data[2] : inst->data[1]); -} - -void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - script_->write(static_cast(inst->opcode)); - - std::int32_t addr = resolve_label(inst->data[0]); - - if (expr) - { - script_->write(addr - inst->index - 3); - } - else if (back) - { - script_->write((inst->index + 3) - addr); - } - else - { - script_->write(addr - inst->index - 5); - } -} - -void assembler::assemble_field_variable(const instruction::ptr& inst) -{ - script_->write(static_cast(inst->opcode)); - - std::uint32_t field_id = 0; - - if (inst->data[0].substr(0, 3) == "_ID") - { - field_id = std::stoi(inst->data[0].substr(3)); - } - else - { - field_id = resolver::token_id(inst->data[0]); - - if (field_id == 0) - { - field_id = 0xFFFFFFFF; - } - } - - script_->write(field_id); - - if (field_id > 0x110F3) - { - stack_->write(0); - stack_->write_c_string(inst->data[0]); - } -} - -void assembler::assemble_formal_params(const instruction::ptr& inst) -{ - script_->write(static_cast(inst->opcode)); - - auto size = std::stoi(inst->data[0]); - - script_->write(static_cast(size)); - - for (auto i = 1; i <= size; i++) - { - script_->write(static_cast(std::stoi(inst->data[i]))); - } + if (func_id == 0) stack_->write_c_string(inst->data[1]); } void assembler::assemble_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::int32_t addr = resolve_label(inst->data[0]); + const auto addr = resolve_label(inst->data[0]); script_->write(addr - inst->index - 4); } @@ -575,22 +505,13 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) { script_->write(static_cast(inst->opcode)); - std::uint16_t casenum = 0; + const auto count = std::stoul(inst->data[0]); - if (utils::string::is_number(inst->data[0])) - { - casenum = std::stoi(inst->data[0]); - } - else - { - throw asm_error("invalid endswitch number!"); - } + script_->write(count); - script_->write(casenum); + std::uint32_t index = inst->index + 3; - std::uint32_t internal_index = inst->index + 3; - - for (std::uint16_t i = 0; i < casenum; i++) + for (auto i = 0u; i < count; i++) { if (inst->data[1 + (3 * i)] == "case") { @@ -604,29 +525,81 @@ void assembler::assemble_end_switch(const instruction::ptr& inst) stack_->write_c_string(utils::string::unquote(inst->data[1 + (3 * i) + 1])); } - internal_index += 4; + index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 2]); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 2]); - assemble_offset(addr - internal_index); + assemble_offset(addr - index); - internal_index += 3; + index += 3; } else if (inst->data[1 + (3 * i)] == "default") { script_->write(0); stack_->write_c_string("\x01"); - internal_index += 4; - std::int32_t addr = resolve_label(inst->data[1 + (3 * i) + 1]); + index += 4; - assemble_offset(addr - internal_index); + const auto addr = resolve_label(inst->data[1 + (3 * i) + 1]); - internal_index += 3; + assemble_offset(addr - index); + + index += 3; } } } +void assembler::assemble_field_variable(const instruction::ptr& inst) +{ + script_->write(static_cast(inst->opcode)); + + auto id = resolver::token_id(inst->data[0]); + + if (id == 0) id = 0xFFFFFFFF; + + script_->write(id); + + if (id > max_string_id) + { + stack_->write(0); + stack_->write_c_string(inst->data[0]); + } +} + +void assembler::assemble_formal_params(const instruction::ptr& inst) +{ + script_->write(static_cast(inst->opcode)); + + const auto count = std::stoi(inst->data[0]); + + script_->write(static_cast(count)); + + for (auto i = 1; i <= count; i++) + { + script_->write(static_cast(std::stoi(inst->data[i]))); + } +} + +void assembler::assemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + script_->write(static_cast(inst->opcode)); + + const auto addr = resolve_label(inst->data[0]); + + if (expr) + { + script_->write(addr - inst->index - 3); + } + else if (back) + { + script_->write((inst->index + 3) - addr); + } + else + { + script_->write(addr - inst->index - 5); + } +} + void assembler::assemble_offset(std::int32_t offset) { std::array bytes = {}; @@ -640,24 +613,22 @@ void assembler::assemble_offset(std::int32_t offset) script_->write(bytes[2]); } -auto assembler::resolve_function(const std::string& name) -> std::uint32_t +auto assembler::resolve_function(const std::string& name) -> std::int32_t { - auto temp = name.substr(0, 4) == "sub_" ? name.substr(4) : name; - for (const auto& func : functions_) { - if (func->name == temp) + if (func->name == name) { return func->index; } } - throw asm_error("Couldn't resolve local function address of '" + temp + "'!"); + throw asm_error("Couldn't resolve local function address of '" + name + "'!"); } -auto assembler::resolve_label(const std::string& name) -> std::uint32_t +auto assembler::resolve_label(const std::string& name) -> std::int32_t { - for (auto& func : labels_) + for (const auto& func : labels_) { if (func.second == name) { diff --git a/src/s4/xsk/assembler.hpp b/src/s4/xsk/assembler.hpp index e190623..c773f68 100644 --- a/src/s4/xsk/assembler.hpp +++ b/src/s4/xsk/assembler.hpp @@ -28,14 +28,14 @@ private: void assemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void assemble_local_call(const instruction::ptr& inst, bool thread); void assemble_far_call(const instruction::ptr& inst, bool thread); - void assemble_formal_params(const instruction::ptr& inst); void assemble_switch(const instruction::ptr& inst); void assemble_end_switch(const instruction::ptr& inst); void assemble_field_variable(const instruction::ptr& inst); + void assemble_formal_params(const instruction::ptr& inst); void assemble_jump(const instruction::ptr& inst, bool expr, bool back); void assemble_offset(std::int32_t offset); - auto resolve_function(const std::string& name) -> std::uint32_t; - auto resolve_label(const std::string& name) -> std::uint32_t; + auto resolve_function(const std::string& name) -> std::int32_t; + auto resolve_label(const std::string& name) -> std::int32_t; }; } // namespace xsk::gsc::s4 diff --git a/src/s4/xsk/compiler.cpp b/src/s4/xsk/compiler.cpp index b6bed56..2b772f2 100644 --- a/src/s4/xsk/compiler.cpp +++ b/src/s4/xsk/compiler.cpp @@ -57,7 +57,7 @@ auto compiler::parse_buffer(const std::string& file, std::vector& YY_BUFFER_STATE yybuffer = s4__scan_buffer(reinterpret_cast(data.data()), data.size(), scanner); parser parser(scanner, &ctx, result); - + if (parser.parse() || result == nullptr) { throw comp_error(ctx.loc, "An unknown error ocurred while parsing gsc file."); @@ -102,7 +102,7 @@ void compiler::compile_program(const ast::program::ptr& program) for (const auto& declaration : program->declarations) { - emit_declaration(declaration); + emit_declaration(declaration); } } @@ -393,9 +393,9 @@ void compiler::emit_stmt_endon(const ast::stmt_endon::ptr& stmt, const block::pt void compiler::emit_stmt_notify(const ast::stmt_notify::ptr& stmt, const block::ptr& blk) { emit_opcode(opcode::OP_voidCodepos); - + std::reverse(stmt->args->list.begin(), stmt->args->list.end()); - + for (const auto& arg : stmt->args->list) { emit_expr(arg, blk); @@ -534,7 +534,7 @@ void compiler::emit_stmt_while(const ast::stmt_while::ptr& stmt, const block::pt stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -588,7 +588,7 @@ void compiler::emit_stmt_dowhile(const ast::stmt_dowhile::ptr& stmt, const block stmt->blk->loc_continue = continue_loc; emit_create_local_vars(stmt->blk); - + blk->local_vars_create_count = stmt->blk->local_vars_create_count; for (auto i = 0u; i < blk->local_vars_create_count; i++) @@ -734,7 +734,7 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block emit_expr_variable(stmt->key_expr, blk); emit_opcode(opcode::OP_CallBuiltin1, "isdefined"); - emit_opcode(opcode::OP_JumpOnFalse, break_loc); + emit_opcode(opcode::OP_JumpOnFalse, break_loc); can_break_ = true; can_continue_ = true; @@ -755,9 +755,9 @@ void compiler::emit_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const block stmt->ctx_post->init_from_child(continue_blks_); emit_expr_variable(stmt->key_expr, stmt->ctx_post); - emit_expr_variable(stmt->array, stmt->ctx_post); - emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); - emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); + emit_expr_variable(stmt->array, stmt->ctx_post); + emit_opcode(opcode::OP_CallBuiltin2, "getnextarraykey"); + emit_expr_variable_ref(stmt->key_expr, stmt->ctx_post, true); emit_opcode(opcode::OP_jumpback, begin_loc); insert_label(break_loc); @@ -847,7 +847,7 @@ void compiler::emit_stmt_switch(const ast::stmt_switch::ptr& stmt, const block:: { throw comp_error(entry.loc(), "missing case statement"); } - } + } if (has_default) { @@ -897,7 +897,7 @@ void compiler::emit_stmt_continue(const ast::stmt_continue::ptr& stmt, const blo { if (!can_continue_ || blk->abort != abort_t::abort_none || blk->loc_continue == "") throw comp_error(stmt->loc(), "illegal continue statement"); - + continue_blks_.push_back(blk.get()); emit_remove_local_vars(blk); blk->abort = abort_t::abort_continue; @@ -1061,7 +1061,7 @@ void compiler::emit_expr(const ast::expr& expr, const block::ptr& blk) } } -void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) +void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block::ptr& blk) { if (expr->kind() == ast::kind::expr_assign_equal) { @@ -1115,7 +1115,7 @@ void compiler::emit_expr_assign(const ast::expr_assign::ptr& expr, const block:: throw comp_error(expr->loc(), "unknown assign operation"); } - emit_expr_variable_ref(expr->lvalue, blk, true); + emit_expr_variable_ref(expr->lvalue, blk, true); } void compiler::emit_expr_clear(const ast::expr& expr, const block::ptr& blk) @@ -1268,7 +1268,7 @@ void compiler::emit_expr_and(const ast::expr_and::ptr& expr, const block::ptr& b emit_expr(expr->lvalue, blk); emit_opcode(opcode::OP_JumpOnFalseExpr, label); - + if (expr->rvalue == ast::kind::expr_not) { emit_expr(expr->rvalue.as_not->rvalue, blk); @@ -1289,7 +1289,7 @@ void compiler::emit_expr_or(const ast::expr_or::ptr& expr, const block::ptr& blk emit_expr(expr->lvalue, blk); emit_opcode(opcode::OP_JumpOnTrueExpr, label); - + if (expr->rvalue == ast::kind::expr_not) { emit_expr(expr->rvalue.as_not->rvalue, blk); @@ -1396,10 +1396,10 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_ScriptFarFunctionCall2, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1416,7 +1416,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons case 0: emit_opcode(opcode::OP_CallBuiltin0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltin1, expr->name->value); break; case 2: @@ -1432,7 +1432,7 @@ void compiler::emit_expr_call_function(const ast::expr_function::ptr& expr, cons emit_opcode(opcode::OP_CallBuiltin5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltin, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltin, { expr->name->value, argcount }); break; } } @@ -1514,10 +1514,10 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_ScriptFarMethodCall, { expr->path->value, expr->name->value }); break; case ast::call::mode::thread: - emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::childthread: - emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { argcount, expr->path->value, expr->name->value }); + emit_opcode(opcode::OP_ScriptFarMethodChildThreadCall, { expr->path->value, expr->name->value, argcount }); break; case ast::call::mode::builtin: // no far builtins @@ -1534,7 +1534,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co case 0: emit_opcode(opcode::OP_CallBuiltinMethod0, expr->name->value); break; - case 1: + case 1: emit_opcode(opcode::OP_CallBuiltinMethod1, expr->name->value); break; case 2: @@ -1550,7 +1550,7 @@ void compiler::emit_expr_method_function(const ast::expr_function::ptr& expr, co emit_opcode(opcode::OP_CallBuiltinMethod5, expr->name->value); break; default: - emit_opcode(opcode::OP_CallBuiltinMethod, { argcount, expr->name->value }); + emit_opcode(opcode::OP_CallBuiltinMethod, { expr->name->value, argcount }); break; } } @@ -1675,7 +1675,7 @@ void compiler::emit_expr_array_ref(const ast::expr_array::ptr& expr, const block case ast::kind::expr_array: case ast::kind::expr_field: emit_expr_variable_ref(expr->obj, blk, false); - emit_opcode(opcode::OP_EvalArrayRef); + emit_opcode(opcode::OP_EvalArrayRef); if (set) emit_opcode(opcode::OP_SetVariableField); break; case ast::kind::expr_identifier: @@ -1842,7 +1842,7 @@ void compiler::emit_expr_field(const ast::expr_field::ptr& expr, const block::pt case ast::kind::expr_array: emit_expr_array(expr->obj.as_array, blk); emit_opcode(opcode::OP_CastFieldObject); - emit_opcode(opcode::OP_EvalFieldVariable, field); + emit_opcode(opcode::OP_EvalFieldVariable, field); break; case ast::kind::expr_field: emit_expr_field(expr->obj.as_field, blk); @@ -2133,7 +2133,7 @@ void compiler::emit_remove_local_vars(const block::ptr& blk) void compiler::emit_opcode(opcode op) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2145,7 +2145,7 @@ void compiler::emit_opcode(opcode op) void compiler::emit_opcode(opcode op, const std::string& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2158,7 +2158,7 @@ void compiler::emit_opcode(opcode op, const std::string& data) void compiler::emit_opcode(opcode op, const std::vector& data) { function_->instructions.push_back(std::make_unique()); - + auto& inst = function_->instructions.back(); inst->opcode = static_cast(op); inst->size = opcode_size(std::uint8_t(op)); @@ -2275,7 +2275,7 @@ void compiler::process_stmt_expr(const ast::stmt_expr::ptr& stmt, const block::p throw comp_error(stmt->loc(), "unknown expr statement expression"); } } - + void compiler::process_stmt_assign(const ast::stmt_assign::ptr& stmt, const block::ptr& blk) { switch (stmt->expr.kind()) @@ -2312,7 +2312,7 @@ void compiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, const { throw comp_error(entry.loc(), "illegal waittill param, must be a local variable"); } - + register_variable(entry.as_identifier->value, blk); } } @@ -2355,7 +2355,7 @@ void compiler::process_stmt_ifelse(const ast::stmt_ifelse::ptr& stmt, const bloc if (abort == abort_t::abort_none) childs.push_back(stmt->blk_else.get()); } - + if (blk->abort == abort_t::abort_none) blk->abort = abort; @@ -2485,7 +2485,7 @@ void compiler::process_stmt_foreach(const ast::stmt_foreach::ptr& stmt, const bl // calculate stmt variables & add missing array access as first stmt process_expr(stmt->value_expr, stmt->ctx); process_stmt(stmt->stmt, stmt->ctx); - + continue_blks_.push_back(stmt->ctx.get()); for (auto i = 0; i < continue_blks_.size(); i++) @@ -2757,7 +2757,7 @@ auto compiler::variable_stack_index(const ast::expr_identifier::ptr& name, const } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); @@ -2786,7 +2786,7 @@ auto compiler::variable_access_index(const ast::expr_identifier::ptr& name, cons } throw comp_error(name->loc(), "local variable '" + name->value + "' not initialized."); - } + } } throw comp_error(name->loc(), "local variable '" + name->value + "' not found."); diff --git a/src/s4/xsk/compiler.hpp b/src/s4/xsk/compiler.hpp index 67fb4ee..9d519b6 100644 --- a/src/s4/xsk/compiler.hpp +++ b/src/s4/xsk/compiler.hpp @@ -88,7 +88,7 @@ private: void emit_expr_not(const ast::expr_not::ptr& expr, const block::ptr& blk); void emit_expr_call(const ast::expr_call::ptr& expr, const block::ptr& blk); void emit_expr_call_pointer(const ast::expr_pointer::ptr& expr, const block::ptr& blk); - void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); + void emit_expr_call_function(const ast::expr_function::ptr& expr, const block::ptr& blk); void emit_expr_method(const ast::expr_method::ptr& expr, const block::ptr& blk); void emit_expr_method_pointer(const ast::expr_pointer::ptr& expr, const ast::expr& obj, const block::ptr& blk); void emit_expr_method_function(const ast::expr_function::ptr& expr, const ast::expr& obj, const block::ptr& blk); diff --git a/src/s4/xsk/decompiler.cpp b/src/s4/xsk/decompiler.cpp index 7f72b15..9070300 100644 --- a/src/s4/xsk/decompiler.cpp +++ b/src/s4/xsk/decompiler.cpp @@ -29,9 +29,9 @@ void decompiler::decompile(const std::string& file, std::vector& filename_ = file; program_ = std::make_unique(); - for (auto& func : funcs) + for (const auto& func : funcs) { - auto name = std::make_unique(func->name.substr(4)); + auto name = std::make_unique(func->name); auto params = std::make_unique(); auto block = std::make_unique(); func_ = std::make_unique(std::move(name), std::move(params), std::move(block)); @@ -52,9 +52,9 @@ void decompiler::decompile(const std::string& file, std::vector& void decompiler::decompile_function(const function::ptr& func) { - bool in_waittill_ = false; + in_waittill_ = false; - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { decompile_instruction(inst); } @@ -64,7 +64,7 @@ void decompiler::decompile_function(const function::ptr& func) throw decomp_error("stack isn't emty at function end"); } - auto& stmt = func_->stmt; + const auto& stmt = func_->stmt; block blk; blk.loc_end = utils::string::va("loc_%X", stmt->list.back().as_node->loc().begin.line); @@ -114,7 +114,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) stack_.push(std::move(node)); } break; - case opcode::OP_GetByte: + case opcode::OP_GetByte: case opcode::OP_GetUnsignedShort: case opcode::OP_GetInteger: { @@ -244,14 +244,14 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_GetLocalFunction: { auto path = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); + auto name = std::make_unique(loc, inst->data[0]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); } break; case opcode::OP_GetFarFunction: { - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); auto node = std::make_unique(loc, std::move(path), std::move(name)); stack_.push(std::move(node)); @@ -348,7 +348,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto key = ast::expr(std::move(stack_.top())); stack_.pop(); auto obj = ast::expr(std::make_unique(loc, "0")); auto node = std::make_unique(key.loc(), std::move(obj), std::move(key)); - stack_.push(std::move(node)); + stack_.push(std::move(node)); } break; case opcode::OP_EvalLocalArrayRefCached: @@ -411,8 +411,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -421,8 +421,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalFunctionCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); @@ -447,8 +447,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -468,8 +468,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -487,8 +487,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptLocalChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -508,8 +508,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -529,8 +529,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0].substr(4)); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = std::stoul(inst->data[1]); i > 0; i--) { @@ -547,8 +547,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall2: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::normal)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -557,8 +557,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarFunctionCall: { auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -581,8 +581,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); + auto path = std::make_unique(loc, inst->data[0]); auto name = std::make_unique(loc, inst->data[1]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[0])); auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -602,10 +602,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -620,10 +620,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_ScriptFarChildThreadCall: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -641,10 +641,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -662,10 +662,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = obj.as_node->loc(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[2]); - auto path = std::make_unique(loc, utils::string::backslash(inst->data[1])); + auto path = std::make_unique(loc, inst->data[0]); + auto name = std::make_unique(loc, inst->data[1]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[2]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -830,8 +830,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -840,8 +840,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin1: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -849,7 +849,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -858,8 +858,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin2: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -867,7 +867,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -876,8 +876,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin3: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -885,7 +885,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -894,8 +894,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin4: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -903,7 +903,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -912,8 +912,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin5: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -921,7 +921,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) loc = var->loc(); args->list.push_back(std::move(var)); } - + auto call = ast::call(std::make_unique(loc, std::move(path), std::move(name), std::move(args), ast::call::mode::builtin)); auto node = std::make_unique(loc, std::move(call)); stack_.push(std::move(node)); @@ -930,10 +930,10 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltin: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -948,8 +948,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod0: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); @@ -962,8 +962,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 1u; i > 0; i--) { @@ -981,8 +981,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 2u; i > 0; i--) { @@ -1000,8 +1000,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 3u; i > 0; i--) { @@ -1019,8 +1019,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 4u; i > 0; i--) { @@ -1038,8 +1038,8 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) { auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[0]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); for (auto i = 5u; i > 0; i--) { @@ -1056,12 +1056,12 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) case opcode::OP_CallBuiltinMethod: { auto args = std::make_unique(loc); - auto name = std::make_unique(loc, inst->data[1]); auto path = std::make_unique(loc); + auto name = std::make_unique(loc, inst->data[0]); auto obj = ast::expr(std::move(stack_.top())); stack_.pop(); loc = obj.as_node->loc(); - for (auto i = std::stoul(inst->data[0]); i > 0; i--) + for (auto i = std::stoul(inst->data[1]); i > 0; i--) { auto var = std::move(stack_.top()); stack_.pop(); loc = var->loc(); @@ -1365,7 +1365,7 @@ void decompiler::decompile_instruction(const instruction::ptr& inst) auto node = std::make_unique(loc, std::move(lvalue)); stack_.push(std::move(node)); } - break; + break; case opcode::OP_EvalLevelFieldVariable: { auto obj = ast::expr(std::make_unique(loc)); @@ -1877,7 +1877,7 @@ void decompiler::decompile_ifelses(const ast::stmt_list::ptr& stmt) if(entry == ast::kind::asm_jump_cond) { - auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); + auto j = (entry.as_cond->value == blocks_.back().loc_end) ? (stmt->list.size() - 1) : (find_location_index(stmt, entry.as_cond->value) - 1); auto last_loc = blocks_.back().loc_end; if (stmt->list.at(j) == ast::kind::asm_jump) @@ -1952,7 +1952,7 @@ void decompiler::decompile_aborts(const ast::stmt_list::ptr& block) { auto loc = block->list.at(i).loc(); auto jump_loc = block->list.at(i).as_jump->value; - + if (jump_loc == blocks_.back().loc_continue) { block->list.erase(block->list.begin() + i); @@ -2088,7 +2088,7 @@ void decompiler::decompile_last_ifelse(const ast::stmt_list::ptr& stmt, std::uin end = stmt->list.size() - 1; else_blk.loc_end = stmt->list.at(end).loc().label(); - + auto else_stmt = std::make_unique(loc); for (auto i = begin; i < end; i++) @@ -2195,11 +2195,11 @@ void decompiler::decompile_loop(const ast::stmt_list::ptr& block, std::uint32_t { decompile_for(block, start, end); return; - } + } } } } - + decompile_while(block, start, end); } @@ -2597,7 +2597,7 @@ void decompiler::process_stmt(const ast::stmt& stmt, const block::ptr& blk) { auto expr = ast::expr(std::make_unique(stmt.as_asm_create->index)); process_var_create(expr, blk, true); - } + } break; default: break; @@ -2716,7 +2716,7 @@ void decompiler::process_stmt_waittill(const ast::stmt_waittill::ptr& stmt, cons { process_expr(stmt->event ,blk); process_expr(stmt->obj, blk); - + for (auto& entry : stmt->args->list) { process_expr(entry, blk); @@ -3113,7 +3113,7 @@ void decompiler::process_expr_decrement(const ast::expr_decrement::ptr& expr, co { process_expr(expr->lvalue, blk); } - + void decompiler::process_expr_ternary(const ast::expr_ternary::ptr& expr, const block::ptr& blk) { process_expr(expr->test, blk); diff --git a/src/s4/xsk/disassembler.cpp b/src/s4/xsk/disassembler.cpp index 83487a4..008c75c 100644 --- a/src/s4/xsk/disassembler.cpp +++ b/src/s4/xsk/disassembler.cpp @@ -21,7 +21,7 @@ auto disassembler::output_data() -> std::vector output_->write_string("// S4 GSC ASSEMBLY\n"); output_->write_string("// Disassembled by https://github.com/xensik/gsc-tool\n"); - for (auto& func : functions_) + for (const auto& func : functions_) { print_function(func); } @@ -46,12 +46,12 @@ void disassembler::disassemble(const std::string& file, std::vectoris_avail() && script_->is_avail()) { functions_.push_back(std::make_unique()); - auto& func = functions_.back(); + const auto& func = functions_.back(); func->index = static_cast(script_->pos()); func->size = stack_->read(); func->id = stack_->read(); - func->name = "sub_"s + (func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id)); + func->name = func->id == 0 ? stack_->read_c_string() : resolver::token_name(func->id); dissasemble_function(func); @@ -69,14 +69,14 @@ void disassembler::dissasemble_function(const function::ptr& func) while (size > 0) { func->instructions.push_back(std::make_unique()); - - auto& inst = func->instructions.back(); + + const auto& inst = func->instructions.back(); inst->index = static_cast(script_->pos()); inst->opcode = script_->read(); inst->size = opcode_size(inst->opcode); - + dissasemble_instruction(inst); - + size -= inst->size; } } @@ -181,7 +181,7 @@ void disassembler::dissasemble_instruction(const instruction::ptr& inst) break; case opcode::OP_GetFloat: { - auto val = script_->read(); + const auto val = script_->read(); inst->data.push_back(utils::string::va("%g%s", val, val == int(val) ? ".0" : "")); } break; @@ -363,19 +363,14 @@ void disassembler::disassemble_builtin_call(const instruction::ptr& inst, bool m inst->data.push_back(utils::string::va("%i", script_->read())); } - if (method) - { - inst->data.push_back(resolver::method_name(script_->read())); - } - else - { - inst->data.push_back(resolver::function_name(script_->read())); - } + const auto id = script_->read(); + const auto name = method ? resolver::method_name(id) : resolver::function_name(id); + inst->data.emplace(inst->data.begin(), name); } void disassembler::disassemble_local_call(const instruction::ptr& inst, bool thread) { - std::int32_t offset = disassemble_offset(); + const auto offset = disassemble_offset(); inst->data.push_back(utils::string::va("%X", offset + inst->index + 1)); @@ -394,101 +389,43 @@ void disassembler::disassemble_far_call(const instruction::ptr& inst, bool threa inst->data.push_back(utils::string::va("%i", script_->read())); } - auto file_id = stack_->read(); - auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); - auto func_id = stack_->read(); - auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); + const auto file_id = stack_->read(); + const auto file_name = file_id == 0 ? stack_->read_c_string() : resolver::file_name(file_id); + const auto func_id = stack_->read(); + const auto func_name = func_id == 0 ? stack_->read_c_string() : resolver::token_name(func_id); - inst->data.push_back(file_name != "" ? file_name : utils::string::va("_ID%i", file_id)); - inst->data.push_back(func_name != "" ? func_name : utils::string::va("_ID%i", func_id)); -} - -void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) -{ - std::int32_t addr; - std::string label; - - if (expr) - { - addr = inst->index + 3 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else if (back) - { - addr = inst->index + 3 - script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - else - { - addr = inst->index + 5 + script_->read(); - label = utils::string::va("loc_%X", addr); - inst->data.push_back(label); - } - - labels_.insert({addr, label}); -} - -void disassembler::disassemble_field_variable(const instruction::ptr& inst) -{ - std::uint32_t field_id = script_->read(); - std::string field_name; - - if (field_id > 0x110F3) - { - auto temp = stack_->read(); - field_name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); - } - else - { - field_name = resolver::token_name(field_id); - } - - inst->data.push_back(field_name != "" ? field_name : utils::string::va("_ID%i", field_id)); -} - -void disassembler::disassemble_formal_params(const instruction::ptr& inst) -{ - auto size = script_->read(); - - inst->size += size; - inst->data.push_back(utils::string::va("%i", size)); - - for (auto i = 0u; i < size; i++) - { - inst->data.push_back(utils::string::va("%d", script_->read())); - } + inst->data.emplace(inst->data.begin(), func_name); + inst->data.emplace(inst->data.begin(), file_name); } void disassembler::disassemble_switch(const instruction::ptr& inst) { - std::int32_t addr = inst->index + 4 + script_->read(); - std::string label = utils::string::va("loc_%X", addr); + const auto addr = inst->index + 4 + script_->read(); + const auto label = utils::string::va("loc_%X", addr); inst->data.push_back(label); - labels_.insert({addr, label}); + labels_.insert({ addr, label }); } void disassembler::disassemble_end_switch(const instruction::ptr& inst) { - std::uint16_t case_num = script_->read(); - inst->data.push_back(utils::string::va("%i", case_num)); + const auto count = script_->read(); + inst->data.push_back(utils::string::va("%i", count)); - std::uint32_t internal_index = inst->index + 3; + std::uint32_t index = inst->index + 3; - if (case_num) + if (count) { - for (auto i = case_num; i > 0; i--) + for (auto i = count; i > 0; i--) { - std::uint32_t case_label = script_->read(); + const auto value = script_->read(); - if (case_label < 0x80000 && case_label > 0) + if (value < 0x40000 && value > 0) { inst->data.push_back("case"); inst->data.push_back(utils::string::quote(stack_->read_c_string(), false)); } - else if (case_label == 0) + else if (value == 0) { inst->data.push_back("default"); stack_->read(); @@ -496,24 +433,77 @@ void disassembler::disassemble_end_switch(const instruction::ptr& inst) else { inst->data.push_back("case"); - inst->data.push_back(utils::string::va("%i", (case_label - 0x800000) & 0xFFFFFF)); + inst->data.push_back(utils::string::va("%i", (value - 0x800000) & 0xFFFFFF)); } - inst->size += 4; - internal_index += 4; + index += 4; + + const auto addr = disassemble_offset() + index; + const auto label = utils::string::va("loc_%X", addr); - auto addr = disassemble_offset() + internal_index; - std::string label = utils::string::va("loc_%X", addr); inst->data.push_back(label); + labels_.insert({ addr, label }); - labels_.insert({addr, label}); - - inst->size += 3; - internal_index += 3; + index += 3; + inst->size += 7; } } } +void disassembler::disassemble_field_variable(const instruction::ptr& inst) +{ + const auto id = script_->read(); + std::string name; + + if (id > max_string_id) + { + auto temp = stack_->read(); + name = temp == 0 ? stack_->read_c_string() : std::to_string(temp); + } + else + { + name = resolver::token_name(id); + } + + inst->data.push_back(name); +} + +void disassembler::disassemble_formal_params(const instruction::ptr& inst) +{ + const auto count = script_->read(); + + inst->size += count; + inst->data.push_back(utils::string::va("%i", count)); + + for (auto i = 0u; i < count; i++) + { + inst->data.push_back(utils::string::va("%d", script_->read())); + } +} + +void disassembler::disassemble_jump(const instruction::ptr& inst, bool expr, bool back) +{ + std::int32_t addr; + + if (expr) + { + addr = inst->index + 3 + script_->read(); + } + else if (back) + { + addr = inst->index + 3 - script_->read(); + } + else + { + addr = inst->index + 5 + script_->read(); + } + + const auto label = utils::string::va("loc_%X", addr); + + inst->data.push_back(label); + labels_.insert({ addr, label }); +} + auto disassembler::disassemble_offset() -> std::int32_t { std::array bytes = {}; @@ -523,7 +513,7 @@ auto disassembler::disassemble_offset() -> std::int32_t bytes[i] = script_->read(); } - std::int32_t offset = *reinterpret_cast(bytes.data()); + auto offset = *reinterpret_cast(bytes.data()); offset = (offset << 8) >> 8; @@ -532,24 +522,24 @@ auto disassembler::disassemble_offset() -> std::int32_t void disassembler::resolve_local_functions() { - for (auto& func : functions_) + for (const auto& func : functions_) { - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { switch (opcode(inst->opcode)) { - case opcode::OP_GetLocalFunction: - case opcode::OP_ScriptLocalFunctionCall: - case opcode::OP_ScriptLocalFunctionCall2: - case opcode::OP_ScriptLocalMethodCall: - case opcode::OP_ScriptLocalThreadCall: - case opcode::OP_ScriptLocalChildThreadCall: - case opcode::OP_ScriptLocalMethodThreadCall: - case opcode::OP_ScriptLocalMethodChildThreadCall: - inst->data.at(0) = resolve_function(inst->data[0]); - break; - default: - break; + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + inst->data[0] = resolve_function(inst->data[0]); + break; + default: + break; } } } @@ -578,9 +568,9 @@ auto disassembler::resolve_function(const std::string& index) -> std::string void disassembler::print_function(const function::ptr& func) { output_->write_string("\n"); - output_->write_string(utils::string::va("%s\n", func->name.data())); + output_->write_string(utils::string::va("sub_%s\n", func->name.data())); - for (auto& inst : func->instructions) + for (const auto& inst : func->instructions) { const auto itr = func->labels.find(inst->index); @@ -598,40 +588,53 @@ void disassembler::print_function(const function::ptr& func) void disassembler::print_instruction(const instruction::ptr& inst) { + output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); + switch (opcode(inst->opcode)) { - case opcode::OP_endswitch: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); - { - std::uint32_t totalcase = std::stoul(inst->data[0]); - auto index = 0; - for (auto casenum = 0u; casenum < totalcase; casenum++) + case opcode::OP_GetLocalFunction: + case opcode::OP_ScriptLocalFunctionCall: + case opcode::OP_ScriptLocalFunctionCall2: + case opcode::OP_ScriptLocalMethodCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + break; + case opcode::OP_ScriptLocalThreadCall: + case opcode::OP_ScriptLocalChildThreadCall: + case opcode::OP_ScriptLocalMethodThreadCall: + case opcode::OP_ScriptLocalMethodChildThreadCall: + output_->write_string(utils::string::va(" sub_%s", inst->data[0].data())); + output_->write_string(utils::string::va(" %s", inst->data[1].data())); + break; + case opcode::OP_endswitch: + output_->write_string(utils::string::va(" %s\n", inst->data[0].data())); { - if (inst->data[1 + index] == "case") + std::uint32_t totalcase = std::stoul(inst->data[0]); + auto index = 0; + for (auto casenum = 0u; casenum < totalcase; casenum++) { - output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); - index += 3; - } - else if (inst->data[1 + index] == "default") - { - output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); - index += 2; - } - if (casenum != totalcase - 1) - { - output_->write_string("\n"); + if (inst->data[1 + index] == "case") + { + output_->write_string(utils::string::va("\t\t\t%s %s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data(), inst->data[1 + index + 2].data())); + index += 3; + } + else if (inst->data[1 + index] == "default") + { + output_->write_string(utils::string::va("\t\t\t%s %s", inst->data[1 + index].data(), inst->data[1 + index + 1].data())); + index += 2; + } + if (casenum != totalcase - 1) + { + output_->write_string("\n"); + } } } - } - break; - default: - output_->write_string(utils::string::va("\t\t%s", resolver::opcode_name(inst->opcode).data())); - for (auto& d : inst->data) - { - output_->write_string(utils::string::va(" %s", d.data())); - } - break; + break; + default: + for (auto& d : inst->data) + { + output_->write_string(utils::string::va(" %s", d.data())); + } + break; } output_->write_string("\n"); diff --git a/src/s4/xsk/disassembler.hpp b/src/s4/xsk/disassembler.hpp index ba08b35..b3101e5 100644 --- a/src/s4/xsk/disassembler.hpp +++ b/src/s4/xsk/disassembler.hpp @@ -28,11 +28,11 @@ private: void disassemble_builtin_call(const instruction::ptr& inst, bool method, bool args); void disassemble_local_call(const instruction::ptr& inst, bool thread); void disassemble_far_call(const instruction::ptr& inst, bool thread); - void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); - void disassemble_field_variable(const instruction::ptr& inst); - void disassemble_formal_params(const instruction::ptr& inst); void disassemble_switch(const instruction::ptr& inst); void disassemble_end_switch(const instruction::ptr& inst); + void disassemble_field_variable(const instruction::ptr& inst); + void disassemble_formal_params(const instruction::ptr& inst); + void disassemble_jump(const instruction::ptr& inst, bool expr, bool back); auto disassemble_offset() -> std::int32_t; void resolve_local_functions(); auto resolve_function(const std::string& index) -> std::string; diff --git a/src/s4/xsk/lexer.cpp b/src/s4/xsk/lexer.cpp index 490bdca..5fffcbd 100644 --- a/src/s4/xsk/lexer.cpp +++ b/src/s4/xsk/lexer.cpp @@ -555,8 +555,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 113 -#define YY_END_OF_BUFFER 114 +#define YY_NUM_RULES 114 +#define YY_END_OF_BUFFER 115 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -566,24 +566,24 @@ struct yy_trans_info }; static const flex_int16_t yy_accept[346] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 114, 112, - 1, 2, 97, 112, 112, 96, 100, 112, 57, 58, - 94, 92, 63, 93, 64, 95, 111, 111, 66, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 115, 113, + 1, 2, 97, 113, 113, 96, 100, 113, 57, 58, + 94, 92, 63, 93, 64, 95, 112, 112, 66, 67, 81, 91, 82, 68, 103, 103, 61, 62, 101, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 59, 99, 60, 98, 5, - 6, 5, 12, 13, 12, 112, 94, 95, 78, 0, + 6, 5, 12, 13, 12, 113, 94, 95, 78, 0, 105, 0, 15, 0, 0, 0, 0, 87, 0, 76, 0, 89, 0, 0, 8, 85, 69, 83, 70, 84, - 107, 0, 11, 4, 3, 86, 107, 111, 108, 0, + 108, 0, 11, 4, 3, 86, 108, 112, 109, 0, 0, 0, 0, 65, 73, 79, 77, 80, 74, 103, 103, 90, 103, 103, 103, 103, 103, 103, 29, 103, 103, 103, 103, 103, 27, 33, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 88, 75, 7, 14, 10, 9, 0, 105, 0, 0, 0, 0, 0, - 0, 104, 0, 0, 0, 0, 105, 0, 107, 0, - 3, 107, 107, 108, 109, 110, 102, 71, 72, 103, + 0, 104, 0, 0, 0, 0, 105, 0, 108, 0, + 3, 108, 108, 109, 110, 111, 102, 71, 72, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 31, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 106, 0, 0, 0, 0, @@ -596,7 +596,7 @@ static const flex_int16_t yy_accept[346] = 103, 103, 103, 103, 103, 103, 103, 103, 30, 0, 0, 0, 0, 0, 103, 56, 103, 103, 103, 103, 103, 21, 103, 103, 39, 34, 103, 43, 103, 103, - 103, 106, 0, 0, 16, 0, 103, 103, 103, 103, + 103, 107, 0, 0, 16, 0, 103, 103, 103, 103, 36, 32, 103, 103, 103, 103, 103, 103, 0, 17, 0, 103, 103, 103, 38, 103, 42, 103, 103, 103, @@ -1211,11 +1211,11 @@ YY_DECL } { -#line 43 "lexer.lpp" +#line 44 "lexer.lpp" -#line 47 "lexer.lpp" +#line 48 "lexer.lpp" ctx->loc.step(); @@ -1274,592 +1274,597 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 50 "lexer.lpp" +#line 51 "lexer.lpp" { ctx->loc.step(); } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 51 "lexer.lpp" +#line 52 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 3: YY_RULE_SETUP -#line 53 "lexer.lpp" +#line 54 "lexer.lpp" YY_BREAK case 4: YY_RULE_SETUP -#line 55 "lexer.lpp" +#line 56 "lexer.lpp" { BEGIN(COMMENT_STATE); } YY_BREAK case 5: YY_RULE_SETUP -#line 56 "lexer.lpp" +#line 57 "lexer.lpp" YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 57 "lexer.lpp" +#line 58 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 7: YY_RULE_SETUP -#line 58 "lexer.lpp" +#line 59 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(COMMENT_STATE): -#line 59 "lexer.lpp" +#line 60 "lexer.lpp" { throw s4::parser::syntax_error(ctx->loc, "unmatched multiline comment start ('/*')"); } YY_BREAK case 8: YY_RULE_SETUP -#line 60 "lexer.lpp" +#line 61 "lexer.lpp" { throw s4::parser::syntax_error(ctx->loc, "unmatched multiline comment end ('*/')"); } YY_BREAK case 9: YY_RULE_SETUP -#line 62 "lexer.lpp" +#line 63 "lexer.lpp" { throw s4::parser::syntax_error(ctx->loc, "cannot recurse devblock ('/#')"); } YY_BREAK case 10: YY_RULE_SETUP -#line 63 "lexer.lpp" +#line 64 "lexer.lpp" { BEGIN(INITIAL); return s4::parser::make_DEVEND(ctx->loc); } YY_BREAK case YY_STATE_EOF(DEV_ON_STATE): -#line 64 "lexer.lpp" +#line 65 "lexer.lpp" { throw s4::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 11: YY_RULE_SETUP -#line 66 "lexer.lpp" +#line 67 "lexer.lpp" { BEGIN(ctx->mode == xsk::gsc::build::dev ? DEV_ON_STATE : DEV_OFF_STATE); if(ctx->mode == xsk::gsc::build::dev) return s4::parser::make_DEVBEGIN(ctx->loc); } YY_BREAK case 12: YY_RULE_SETUP -#line 67 "lexer.lpp" +#line 68 "lexer.lpp" YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP -#line 68 "lexer.lpp" +#line 69 "lexer.lpp" { ctx->loc.lines(yyleng); ctx->loc.step(); } YY_BREAK case 14: YY_RULE_SETUP -#line 69 "lexer.lpp" +#line 70 "lexer.lpp" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(DEV_OFF_STATE): -#line 70 "lexer.lpp" +#line 71 "lexer.lpp" { throw s4::parser::syntax_error(ctx->loc, "unmatched devblock start ('/#')"); } YY_BREAK case 15: YY_RULE_SETUP -#line 71 "lexer.lpp" +#line 72 "lexer.lpp" { throw s4::parser::syntax_error(ctx->loc, "unmatched devblock end ('#/')"); } YY_BREAK case 16: YY_RULE_SETUP -#line 73 "lexer.lpp" +#line 74 "lexer.lpp" { return s4::parser::make_INLINE(ctx->loc); } YY_BREAK case 17: YY_RULE_SETUP -#line 74 "lexer.lpp" +#line 75 "lexer.lpp" { return s4::parser::make_INCLUDE(ctx->loc); } YY_BREAK case 18: YY_RULE_SETUP -#line 75 "lexer.lpp" +#line 76 "lexer.lpp" { return s4::parser::make_USINGTREE(ctx->loc); } YY_BREAK case 19: YY_RULE_SETUP -#line 76 "lexer.lpp" +#line 77 "lexer.lpp" { return s4::parser::make_ANIMTREE(ctx->loc); } YY_BREAK case 20: YY_RULE_SETUP -#line 77 "lexer.lpp" +#line 78 "lexer.lpp" { return s4::parser::make_ENDON(ctx->loc); } YY_BREAK case 21: YY_RULE_SETUP -#line 78 "lexer.lpp" +#line 79 "lexer.lpp" { return s4::parser::make_NOTIFY(ctx->loc); } YY_BREAK case 22: YY_RULE_SETUP -#line 79 "lexer.lpp" +#line 80 "lexer.lpp" { return s4::parser::make_WAIT(ctx->loc); } YY_BREAK case 23: YY_RULE_SETUP -#line 80 "lexer.lpp" +#line 81 "lexer.lpp" { return s4::parser::make_WAITTILL(ctx->loc); } YY_BREAK case 24: YY_RULE_SETUP -#line 81 "lexer.lpp" +#line 82 "lexer.lpp" { return s4::parser::make_WAITTILLMATCH(ctx->loc); } YY_BREAK case 25: YY_RULE_SETUP -#line 82 "lexer.lpp" +#line 83 "lexer.lpp" { return s4::parser::make_WAITTILLFRAMEEND(ctx->loc); } YY_BREAK case 26: YY_RULE_SETUP -#line 83 "lexer.lpp" +#line 84 "lexer.lpp" { return s4::parser::make_WAITFRAME(ctx->loc); } YY_BREAK case 27: YY_RULE_SETUP -#line 84 "lexer.lpp" +#line 85 "lexer.lpp" { return s4::parser::make_IF(ctx->loc); } YY_BREAK case 28: YY_RULE_SETUP -#line 85 "lexer.lpp" +#line 86 "lexer.lpp" { return s4::parser::make_ELSE(ctx->loc); } YY_BREAK case 29: YY_RULE_SETUP -#line 86 "lexer.lpp" +#line 87 "lexer.lpp" { return s4::parser::make_DO(ctx->loc); } YY_BREAK case 30: YY_RULE_SETUP -#line 87 "lexer.lpp" +#line 88 "lexer.lpp" { return s4::parser::make_WHILE(ctx->loc); } YY_BREAK case 31: YY_RULE_SETUP -#line 88 "lexer.lpp" +#line 89 "lexer.lpp" { return s4::parser::make_FOR(ctx->loc); } YY_BREAK case 32: YY_RULE_SETUP -#line 89 "lexer.lpp" +#line 90 "lexer.lpp" { return s4::parser::make_FOREACH(ctx->loc); } YY_BREAK case 33: YY_RULE_SETUP -#line 90 "lexer.lpp" +#line 91 "lexer.lpp" { return s4::parser::make_IN(ctx->loc); } YY_BREAK case 34: YY_RULE_SETUP -#line 91 "lexer.lpp" +#line 92 "lexer.lpp" { return s4::parser::make_SWITCH(ctx->loc); } YY_BREAK case 35: YY_RULE_SETUP -#line 92 "lexer.lpp" +#line 93 "lexer.lpp" { return s4::parser::make_CASE(ctx->loc); } YY_BREAK case 36: YY_RULE_SETUP -#line 93 "lexer.lpp" +#line 94 "lexer.lpp" { return s4::parser::make_DEFAULT(ctx->loc); } YY_BREAK case 37: YY_RULE_SETUP -#line 94 "lexer.lpp" +#line 95 "lexer.lpp" { return s4::parser::make_BREAK(ctx->loc); } YY_BREAK case 38: YY_RULE_SETUP -#line 95 "lexer.lpp" +#line 96 "lexer.lpp" { return s4::parser::make_CONTINUE(ctx->loc); } YY_BREAK case 39: YY_RULE_SETUP -#line 96 "lexer.lpp" +#line 97 "lexer.lpp" { return s4::parser::make_RETURN(ctx->loc); } YY_BREAK case 40: YY_RULE_SETUP -#line 97 "lexer.lpp" +#line 98 "lexer.lpp" { return s4::parser::make_BREAKPOINT(ctx->loc); } YY_BREAK case 41: YY_RULE_SETUP -#line 98 "lexer.lpp" +#line 99 "lexer.lpp" { return s4::parser::make_PROFBEGIN(ctx->loc); } YY_BREAK case 42: YY_RULE_SETUP -#line 99 "lexer.lpp" +#line 100 "lexer.lpp" { return s4::parser::make_PROFEND(ctx->loc); } YY_BREAK case 43: YY_RULE_SETUP -#line 100 "lexer.lpp" +#line 101 "lexer.lpp" { return s4::parser::make_THREAD(ctx->loc); } YY_BREAK case 44: YY_RULE_SETUP -#line 101 "lexer.lpp" +#line 102 "lexer.lpp" { return s4::parser::make_CHILDTHREAD(ctx->loc); } YY_BREAK case 45: YY_RULE_SETUP -#line 102 "lexer.lpp" +#line 103 "lexer.lpp" { return s4::parser::make_THISTHREAD(ctx->loc); } YY_BREAK case 46: YY_RULE_SETUP -#line 103 "lexer.lpp" +#line 104 "lexer.lpp" { return s4::parser::make_CALL(ctx->loc); } YY_BREAK case 47: YY_RULE_SETUP -#line 104 "lexer.lpp" +#line 105 "lexer.lpp" { return s4::parser::make_TRUE(ctx->loc); } YY_BREAK case 48: YY_RULE_SETUP -#line 105 "lexer.lpp" +#line 106 "lexer.lpp" { return s4::parser::make_FALSE(ctx->loc); } YY_BREAK case 49: YY_RULE_SETUP -#line 106 "lexer.lpp" +#line 107 "lexer.lpp" { return s4::parser::make_UNDEFINED(ctx->loc); } YY_BREAK case 50: YY_RULE_SETUP -#line 107 "lexer.lpp" +#line 108 "lexer.lpp" { return s4::parser::make_SIZE(ctx->loc); } YY_BREAK case 51: YY_RULE_SETUP -#line 108 "lexer.lpp" +#line 109 "lexer.lpp" { return s4::parser::make_GAME(ctx->loc); } YY_BREAK case 52: YY_RULE_SETUP -#line 109 "lexer.lpp" +#line 110 "lexer.lpp" { return s4::parser::make_SELF(ctx->loc); } YY_BREAK case 53: YY_RULE_SETUP -#line 110 "lexer.lpp" +#line 111 "lexer.lpp" { return s4::parser::make_ANIM(ctx->loc); } YY_BREAK case 54: YY_RULE_SETUP -#line 111 "lexer.lpp" +#line 112 "lexer.lpp" { return s4::parser::make_LEVEL(ctx->loc); } YY_BREAK case 55: YY_RULE_SETUP -#line 112 "lexer.lpp" +#line 113 "lexer.lpp" { return s4::parser::make_ISDEFINED(ctx->loc); } YY_BREAK case 56: YY_RULE_SETUP -#line 113 "lexer.lpp" +#line 114 "lexer.lpp" { return s4::parser::make_ISTRUE(ctx->loc); } YY_BREAK case 57: YY_RULE_SETUP -#line 114 "lexer.lpp" +#line 115 "lexer.lpp" { return s4::parser::make_LPAREN(ctx->loc); } YY_BREAK case 58: YY_RULE_SETUP -#line 115 "lexer.lpp" +#line 116 "lexer.lpp" { return s4::parser::make_RPAREN(ctx->loc); } YY_BREAK case 59: YY_RULE_SETUP -#line 116 "lexer.lpp" +#line 117 "lexer.lpp" { return s4::parser::make_LBRACE(ctx->loc); } YY_BREAK case 60: YY_RULE_SETUP -#line 117 "lexer.lpp" +#line 118 "lexer.lpp" { return s4::parser::make_RBRACE(ctx->loc); } YY_BREAK case 61: YY_RULE_SETUP -#line 118 "lexer.lpp" +#line 119 "lexer.lpp" { return s4::parser::make_LBRACKET(ctx->loc); } YY_BREAK case 62: YY_RULE_SETUP -#line 119 "lexer.lpp" +#line 120 "lexer.lpp" { return s4::parser::make_RBRACKET(ctx->loc); } YY_BREAK case 63: YY_RULE_SETUP -#line 120 "lexer.lpp" +#line 121 "lexer.lpp" { return s4::parser::make_COMMA(ctx->loc); } YY_BREAK case 64: YY_RULE_SETUP -#line 121 "lexer.lpp" +#line 122 "lexer.lpp" { return s4::parser::make_DOT(ctx->loc); } YY_BREAK case 65: YY_RULE_SETUP -#line 122 "lexer.lpp" +#line 123 "lexer.lpp" { return s4::parser::make_DOUBLECOLON(ctx->loc); } YY_BREAK case 66: YY_RULE_SETUP -#line 123 "lexer.lpp" +#line 124 "lexer.lpp" { return s4::parser::make_COLON(ctx->loc); } YY_BREAK case 67: YY_RULE_SETUP -#line 124 "lexer.lpp" +#line 125 "lexer.lpp" { return s4::parser::make_SEMICOLON(ctx->loc); } YY_BREAK case 68: YY_RULE_SETUP -#line 125 "lexer.lpp" +#line 126 "lexer.lpp" { return s4::parser::make_QMARK(ctx->loc); } YY_BREAK case 69: YY_RULE_SETUP -#line 126 "lexer.lpp" +#line 127 "lexer.lpp" { return s4::parser::make_INCREMENT(ctx->loc); } YY_BREAK case 70: YY_RULE_SETUP -#line 127 "lexer.lpp" +#line 128 "lexer.lpp" { return s4::parser::make_DECREMENT(ctx->loc); } YY_BREAK case 71: YY_RULE_SETUP -#line 128 "lexer.lpp" +#line 129 "lexer.lpp" { return s4::parser::make_ASSIGN_LSHIFT(ctx->loc); } YY_BREAK case 72: YY_RULE_SETUP -#line 129 "lexer.lpp" +#line 130 "lexer.lpp" { return s4::parser::make_ASSIGN_RSHIFT(ctx->loc); } YY_BREAK case 73: YY_RULE_SETUP -#line 130 "lexer.lpp" +#line 131 "lexer.lpp" { return s4::parser::make_LSHIFT(ctx->loc); } YY_BREAK case 74: YY_RULE_SETUP -#line 131 "lexer.lpp" +#line 132 "lexer.lpp" { return s4::parser::make_RSHIFT(ctx->loc); } YY_BREAK case 75: YY_RULE_SETUP -#line 132 "lexer.lpp" +#line 133 "lexer.lpp" { return s4::parser::make_OR(ctx->loc); } YY_BREAK case 76: YY_RULE_SETUP -#line 133 "lexer.lpp" +#line 134 "lexer.lpp" { return s4::parser::make_AND(ctx->loc); } YY_BREAK case 77: YY_RULE_SETUP -#line 134 "lexer.lpp" +#line 135 "lexer.lpp" { return s4::parser::make_EQUALITY(ctx->loc); } YY_BREAK case 78: YY_RULE_SETUP -#line 135 "lexer.lpp" +#line 136 "lexer.lpp" { return s4::parser::make_INEQUALITY(ctx->loc); } YY_BREAK case 79: YY_RULE_SETUP -#line 136 "lexer.lpp" +#line 137 "lexer.lpp" { return s4::parser::make_LESS_EQUAL(ctx->loc); } YY_BREAK case 80: YY_RULE_SETUP -#line 137 "lexer.lpp" +#line 138 "lexer.lpp" { return s4::parser::make_GREATER_EQUAL(ctx->loc); } YY_BREAK case 81: YY_RULE_SETUP -#line 138 "lexer.lpp" +#line 139 "lexer.lpp" { return s4::parser::make_LESS(ctx->loc); } YY_BREAK case 82: YY_RULE_SETUP -#line 139 "lexer.lpp" +#line 140 "lexer.lpp" { return s4::parser::make_GREATER(ctx->loc); } YY_BREAK case 83: YY_RULE_SETUP -#line 140 "lexer.lpp" +#line 141 "lexer.lpp" { return s4::parser::make_ASSIGN_ADD(ctx->loc); } YY_BREAK case 84: YY_RULE_SETUP -#line 141 "lexer.lpp" +#line 142 "lexer.lpp" { return s4::parser::make_ASSIGN_SUB(ctx->loc); } YY_BREAK case 85: YY_RULE_SETUP -#line 142 "lexer.lpp" +#line 143 "lexer.lpp" { return s4::parser::make_ASSIGN_MUL(ctx->loc); } YY_BREAK case 86: YY_RULE_SETUP -#line 143 "lexer.lpp" +#line 144 "lexer.lpp" { return s4::parser::make_ASSIGN_DIV(ctx->loc); } YY_BREAK case 87: YY_RULE_SETUP -#line 144 "lexer.lpp" +#line 145 "lexer.lpp" { return s4::parser::make_ASSIGN_MOD(ctx->loc); } YY_BREAK case 88: YY_RULE_SETUP -#line 145 "lexer.lpp" +#line 146 "lexer.lpp" { return s4::parser::make_ASSIGN_BW_OR(ctx->loc); } YY_BREAK case 89: YY_RULE_SETUP -#line 146 "lexer.lpp" +#line 147 "lexer.lpp" { return s4::parser::make_ASSIGN_BW_AND(ctx->loc); } YY_BREAK case 90: YY_RULE_SETUP -#line 147 "lexer.lpp" +#line 148 "lexer.lpp" { return s4::parser::make_ASSIGN_BW_EXOR(ctx->loc); } YY_BREAK case 91: YY_RULE_SETUP -#line 148 "lexer.lpp" +#line 149 "lexer.lpp" { return s4::parser::make_ASSIGN(ctx->loc); } YY_BREAK case 92: YY_RULE_SETUP -#line 149 "lexer.lpp" +#line 150 "lexer.lpp" { return s4::parser::make_ADD(ctx->loc); } YY_BREAK case 93: YY_RULE_SETUP -#line 150 "lexer.lpp" +#line 151 "lexer.lpp" { return s4::parser::make_SUB(ctx->loc); } YY_BREAK case 94: YY_RULE_SETUP -#line 151 "lexer.lpp" +#line 152 "lexer.lpp" { return s4::parser::make_MUL(ctx->loc); } YY_BREAK case 95: YY_RULE_SETUP -#line 152 "lexer.lpp" +#line 153 "lexer.lpp" { return s4::parser::make_DIV(ctx->loc); } YY_BREAK case 96: YY_RULE_SETUP -#line 153 "lexer.lpp" +#line 154 "lexer.lpp" { return s4::parser::make_MOD(ctx->loc); } YY_BREAK case 97: YY_RULE_SETUP -#line 154 "lexer.lpp" +#line 155 "lexer.lpp" { return s4::parser::make_NOT(ctx->loc); } YY_BREAK case 98: YY_RULE_SETUP -#line 155 "lexer.lpp" +#line 156 "lexer.lpp" { return s4::parser::make_COMPLEMENT(ctx->loc); } YY_BREAK case 99: YY_RULE_SETUP -#line 156 "lexer.lpp" +#line 157 "lexer.lpp" { return s4::parser::make_BITWISE_OR(ctx->loc); } YY_BREAK case 100: YY_RULE_SETUP -#line 157 "lexer.lpp" +#line 158 "lexer.lpp" { return s4::parser::make_BITWISE_AND(ctx->loc); } YY_BREAK case 101: YY_RULE_SETUP -#line 158 "lexer.lpp" +#line 159 "lexer.lpp" { return s4::parser::make_BITWISE_EXOR(ctx->loc); } YY_BREAK case 102: YY_RULE_SETUP -#line 159 "lexer.lpp" -{ return s4::parser::make_PATH(xsk::utils::string::fordslash(yytext), ctx->loc); } +#line 160 "lexer.lpp" +{ return s4::parser::make_PATH(xsk::gsc::s4::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 103: YY_RULE_SETUP -#line 160 "lexer.lpp" -{ return s4::parser::make_IDENTIFIER((std::string(yytext, 3) == "_ID") ? std::string(yytext) : xsk::utils::string::to_lower(yytext), ctx->loc); } +#line 161 "lexer.lpp" +{ return s4::parser::make_IDENTIFIER(xsk::gsc::s4::resolver::make_token(std::string_view(yytext, yyleng)), ctx->loc); } YY_BREAK case 104: /* rule 104 can match eol */ YY_RULE_SETUP -#line 161 "lexer.lpp" -{ return s4::parser::make_ISTRING(std::string(yytext).substr(1), ctx->loc); } +#line 162 "lexer.lpp" +{ return s4::parser::make_ISTRING(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 105: /* rule 105 can match eol */ YY_RULE_SETUP -#line 162 "lexer.lpp" +#line 163 "lexer.lpp" { return s4::parser::make_STRING(std::string(yytext), ctx->loc); } YY_BREAK case 106: YY_RULE_SETUP -#line 163 "lexer.lpp" -{ return s4::parser::make_COLOR(std::string(yytext).substr(1), ctx->loc); } +#line 164 "lexer.lpp" +{ return s4::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 107: YY_RULE_SETUP -#line 164 "lexer.lpp" -{ return s4::parser::make_FLOAT(std::string(yytext), ctx->loc); } +#line 165 "lexer.lpp" +{ return s4::parser::make_COLOR(std::string(++yytext, --yyleng), ctx->loc); } YY_BREAK case 108: YY_RULE_SETUP -#line 165 "lexer.lpp" -{ return s4::parser::make_INT_OCT(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } +#line 166 "lexer.lpp" +{ return s4::parser::make_FLOAT(std::string(yytext), ctx->loc); } YY_BREAK case 109: YY_RULE_SETUP -#line 166 "lexer.lpp" -{ return s4::parser::make_INT_BIN(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } +#line 167 "lexer.lpp" +{ return s4::parser::make_INTEGER(xsk::utils::string::oct_to_dec(yytext), ctx->loc); } YY_BREAK case 110: YY_RULE_SETUP -#line 167 "lexer.lpp" -{ return s4::parser::make_INT_HEX(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } +#line 168 "lexer.lpp" +{ return s4::parser::make_INTEGER(xsk::utils::string::bin_to_dec(yytext), ctx->loc); } YY_BREAK case 111: YY_RULE_SETUP -#line 168 "lexer.lpp" -{ return s4::parser::make_INT_DEC(std::string(yytext), ctx->loc); } - YY_BREAK -case YY_STATE_EOF(INITIAL): #line 169 "lexer.lpp" -{ if(ctx->header_top > 0) s4_pop_header(ctx); else return s4::parser::make_S4EOF(ctx->loc); } +{ return s4::parser::make_INTEGER(xsk::utils::string::hex_to_dec(yytext), ctx->loc); } YY_BREAK case 112: -/* rule 112 can match eol */ YY_RULE_SETUP #line 170 "lexer.lpp" -{ throw s4::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } +{ return s4::parser::make_INTEGER(std::string(yytext), ctx->loc); } + YY_BREAK +case YY_STATE_EOF(INITIAL): +#line 171 "lexer.lpp" +{ if(ctx->header_top > 0) s4_pop_header(ctx); else return s4::parser::make_S4EOF(ctx->loc); } YY_BREAK case 113: +/* rule 113 can match eol */ YY_RULE_SETUP #line 172 "lexer.lpp" +{ throw s4::parser::syntax_error(ctx->loc, "bad token: \'" + std::string(yytext) + "\'"); } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 174 "lexer.lpp" ECHO; YY_BREAK -#line 1862 "lexer.cpp" +#line 1867 "lexer.cpp" case YY_END_OF_BUFFER: { @@ -2989,65 +2994,65 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 172 "lexer.lpp" +#line 174 "lexer.lpp" void s4_push_header(xsk::gsc::context* ctx, const std::string& file) { - try + try { - if (ctx->header_top >= 4) - { - throw xsk::gsc::error("maximum gsh depth exceeded '4'"); - } + if (ctx->header_top >= 4) + { + throw xsk::gsc::error("maximum gsh depth exceeded '4'"); + } - ctx->header_top++; + ctx->header_top++; - char* buf_data = 0; - size_t buf_size = 0; + char* buf_data = 0; + size_t buf_size = 0; - for (auto& src : *ctx->sources) - { - if (src.name == file) - { - buf_data = reinterpret_cast(src.buf.data()); - buf_size = src.buf.size(); + for (auto& src : *ctx->sources) + { + if (src.name == file) + { + buf_data = reinterpret_cast(src.buf.data()); + buf_size = src.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&src.name); - } - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&src.name); + } + } - if (buf_data == 0) - { - ctx->sources->push_back(xsk::gsc::source()); - auto& source = ctx->sources->back(); - source.name = file; - source.buf = ctx->read_callback(file + ".gsh"); - source.buf.push_back(0); - source.buf.push_back(0); + if (buf_data == 0) + { + ctx->sources->push_back(xsk::gsc::source()); + auto& source = ctx->sources->back(); + source.name = file; + source.buf = ctx->read_callback(file + ".gsh"); + source.buf.push_back(0); + source.buf.push_back(0); - buf_data = reinterpret_cast(source.buf.data()); - buf_size = source.buf.size(); + buf_data = reinterpret_cast(source.buf.data()); + buf_size = source.buf.size(); - ctx->locs.push(ctx->loc); - ctx->loc.initialize(&source.name); - } + ctx->locs.push(ctx->loc); + ctx->loc.initialize(&source.name); + } - auto state = new yy_buffer_state(); - state->yy_buf_size = buf_size - 2; - state->yy_buf_pos = state->yy_ch_buf = buf_data; - state->yy_is_our_buffer = 0; - state->yy_input_file = NULL; - state->yy_n_chars = state->yy_buf_size; - state->yy_is_interactive = 0; - state->yy_at_bol = 1; - state->yy_fill_buffer = 0; - state->yy_buffer_status = 0; + auto state = new yy_buffer_state(); + state->yy_buf_size = buf_size - 2; + state->yy_buf_pos = state->yy_ch_buf = buf_data; + state->yy_is_our_buffer = 0; + state->yy_input_file = NULL; + state->yy_n_chars = state->yy_buf_size; + state->yy_is_interactive = 0; + state->yy_at_bol = 1; + state->yy_fill_buffer = 0; + state->yy_buffer_status = 0; - yypush_buffer_state(state, ctx->scanner); - } - catch (const std::exception& e) + yypush_buffer_state(state, ctx->scanner); + } + catch (const std::exception& e) { throw xsk::gsc::error("parsing header file '" + file + "': " + e.what()); } @@ -3055,9 +3060,9 @@ void s4_push_header(xsk::gsc::context* ctx, const std::string& file) void s4_pop_header(xsk::gsc::context* ctx) { - ctx->header_top--; - ctx->loc = ctx->locs.top(); - ctx->locs.pop(); - yypop_buffer_state(ctx->scanner); + ctx->header_top--; + ctx->loc = ctx->locs.top(); + ctx->locs.pop(); + yypop_buffer_state(ctx->scanner); } diff --git a/src/s4/xsk/lexer.hpp b/src/s4/xsk/lexer.hpp index 55d3c81..e998761 100644 --- a/src/s4/xsk/lexer.hpp +++ b/src/s4/xsk/lexer.hpp @@ -703,7 +703,7 @@ extern int yylex (yyscan_t yyscanner); #undef yyTABLES_NAME #endif -#line 172 "lexer.lpp" +#line 174 "lexer.lpp" #line 709 "lexer.hpp" diff --git a/src/s4/xsk/parser.cpp b/src/s4/xsk/parser.cpp index 87c6c2e..1fd269b 100644 --- a/src/s4/xsk/parser.cpp +++ b/src/s4/xsk/parser.cpp @@ -506,10 +506,7 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value)); break; @@ -818,10 +815,7 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (that.value)); break; @@ -1130,10 +1124,7 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (that.value); break; @@ -1441,10 +1432,7 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (that.value); break; @@ -2007,10 +1995,7 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" yylhs.value.emplace< std::string > (); break; @@ -2035,1345 +2020,1327 @@ namespace xsk { namespace gsc { namespace s4 { switch (yyn) { case 2: // root: program -#line 258 "parser.ypp" +#line 255 "parser.ypp" { ast = std::move(yystack_[0].value.as < ast::program::ptr > ()); } -#line 2041 "parser.cpp" +#line 2026 "parser.cpp" break; case 3: // root: %empty -#line 259 "parser.ypp" +#line 256 "parser.ypp" { ast = std::make_unique(yylhs.location); } -#line 2047 "parser.cpp" +#line 2032 "parser.cpp" break; case 4: // program: program inline -#line 264 "parser.ypp" +#line 261 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::move(yystack_[1].value.as < ast::program::ptr > ()); } -#line 2053 "parser.cpp" +#line 2038 "parser.cpp" break; case 5: // program: program include -#line 266 "parser.ypp" +#line 263 "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 2059 "parser.cpp" +#line 2044 "parser.cpp" break; case 6: // program: program declaration -#line 268 "parser.ypp" +#line 265 "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 2065 "parser.cpp" +#line 2050 "parser.cpp" break; case 7: // program: inline -#line 270 "parser.ypp" +#line 267 "parser.ypp" { yylhs.value.as < ast::program::ptr > () = std::make_unique(yylhs.location); } -#line 2071 "parser.cpp" +#line 2056 "parser.cpp" break; case 8: // program: include -#line 272 "parser.ypp" +#line 269 "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 2077 "parser.cpp" +#line 2062 "parser.cpp" break; case 9: // program: declaration -#line 274 "parser.ypp" +#line 271 "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 2083 "parser.cpp" +#line 2068 "parser.cpp" break; case 10: // inline: "#inline" expr_path ";" -#line 278 "parser.ypp" +#line 275 "parser.ypp" { s4_push_header(ctx, yystack_[1].value.as < ast::expr_path::ptr > ()->value); } -#line 2089 "parser.cpp" +#line 2074 "parser.cpp" break; case 11: // include: "#include" expr_path ";" -#line 283 "parser.ypp" +#line 280 "parser.ypp" { yylhs.value.as < ast::include::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr_path::ptr > ())); } -#line 2095 "parser.cpp" +#line 2080 "parser.cpp" break; case 12: // declaration: "/#" -#line 287 "parser.ypp" +#line 284 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_begin = std::make_unique(yylhs.location); } -#line 2101 "parser.cpp" +#line 2086 "parser.cpp" break; case 13: // declaration: "#/" -#line 288 "parser.ypp" +#line 285 "parser.ypp" { yylhs.value.as < ast::decl > ().as_dev_end = std::make_unique(yylhs.location); } -#line 2107 "parser.cpp" +#line 2092 "parser.cpp" break; case 14: // declaration: decl_usingtree -#line 289 "parser.ypp" +#line 286 "parser.ypp" { yylhs.value.as < ast::decl > ().as_usingtree = std::move(yystack_[0].value.as < ast::decl_usingtree::ptr > ()); } -#line 2113 "parser.cpp" +#line 2098 "parser.cpp" break; case 15: // declaration: decl_constant -#line 290 "parser.ypp" +#line 287 "parser.ypp" { yylhs.value.as < ast::decl > ().as_constant = std::move(yystack_[0].value.as < ast::decl_constant::ptr > ()); } -#line 2119 "parser.cpp" +#line 2104 "parser.cpp" break; case 16: // declaration: decl_thread -#line 291 "parser.ypp" +#line 288 "parser.ypp" { yylhs.value.as < ast::decl > ().as_thread = std::move(yystack_[0].value.as < ast::decl_thread::ptr > ()); } -#line 2125 "parser.cpp" +#line 2110 "parser.cpp" break; case 17: // decl_usingtree: "#using_animtree" "(" expr_string ")" ";" -#line 296 "parser.ypp" +#line 293 "parser.ypp" { ctx->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 2131 "parser.cpp" +#line 2116 "parser.cpp" break; case 18: // decl_constant: expr_identifier "=" expr ";" -#line 301 "parser.ypp" +#line 298 "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 2137 "parser.cpp" +#line 2122 "parser.cpp" break; case 19: // decl_thread: expr_identifier "(" expr_parameters ")" stmt_block -#line 306 "parser.ypp" +#line 303 "parser.ypp" { ctx->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 2143 "parser.cpp" +#line 2128 "parser.cpp" break; case 20: // stmt: stmt_dev -#line 310 "parser.ypp" +#line 307 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2149 "parser.cpp" +#line 2134 "parser.cpp" break; case 21: // stmt: stmt_block -#line 311 "parser.ypp" +#line 308 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_list = std::move(yystack_[0].value.as < ast::stmt_list::ptr > ()); } -#line 2155 "parser.cpp" +#line 2140 "parser.cpp" break; case 22: // stmt: stmt_call -#line 312 "parser.ypp" +#line 309 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_call = std::move(yystack_[0].value.as < ast::stmt_call::ptr > ()); } -#line 2161 "parser.cpp" +#line 2146 "parser.cpp" break; case 23: // stmt: stmt_assign -#line 313 "parser.ypp" +#line 310 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_assign = std::move(yystack_[0].value.as < ast::stmt_assign::ptr > ()); } -#line 2167 "parser.cpp" +#line 2152 "parser.cpp" break; case 24: // stmt: stmt_endon -#line 314 "parser.ypp" +#line 311 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_endon = std::move(yystack_[0].value.as < ast::stmt_endon::ptr > ()); } -#line 2173 "parser.cpp" +#line 2158 "parser.cpp" break; case 25: // stmt: stmt_notify -#line 315 "parser.ypp" +#line 312 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_notify = std::move(yystack_[0].value.as < ast::stmt_notify::ptr > ()); } -#line 2179 "parser.cpp" +#line 2164 "parser.cpp" break; case 26: // stmt: stmt_wait -#line 316 "parser.ypp" +#line 313 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_wait = std::move(yystack_[0].value.as < ast::stmt_wait::ptr > ()); } -#line 2185 "parser.cpp" +#line 2170 "parser.cpp" break; case 27: // stmt: stmt_waittill -#line 317 "parser.ypp" +#line 314 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittill = std::move(yystack_[0].value.as < ast::stmt_waittill::ptr > ()); } -#line 2191 "parser.cpp" +#line 2176 "parser.cpp" break; case 28: // stmt: stmt_waittillmatch -#line 318 "parser.ypp" +#line 315 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillmatch = std::move(yystack_[0].value.as < ast::stmt_waittillmatch::ptr > ()); } -#line 2197 "parser.cpp" +#line 2182 "parser.cpp" break; case 29: // stmt: stmt_waittillframeend -#line 319 "parser.ypp" +#line 316 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waittillframeend = std::move(yystack_[0].value.as < ast::stmt_waittillframeend::ptr > ()); } -#line 2203 "parser.cpp" +#line 2188 "parser.cpp" break; case 30: // stmt: stmt_waitframe -#line 320 "parser.ypp" +#line 317 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_waitframe = std::move(yystack_[0].value.as < ast::stmt_waitframe::ptr > ()); } -#line 2209 "parser.cpp" +#line 2194 "parser.cpp" break; case 31: // stmt: stmt_if -#line 321 "parser.ypp" +#line 318 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_if = std::move(yystack_[0].value.as < ast::stmt_if::ptr > ()); } -#line 2215 "parser.cpp" +#line 2200 "parser.cpp" break; case 32: // stmt: stmt_ifelse -#line 322 "parser.ypp" +#line 319 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_ifelse = std::move(yystack_[0].value.as < ast::stmt_ifelse::ptr > ()); } -#line 2221 "parser.cpp" +#line 2206 "parser.cpp" break; case 33: // stmt: stmt_while -#line 323 "parser.ypp" +#line 320 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_while = std::move(yystack_[0].value.as < ast::stmt_while::ptr > ()); } -#line 2227 "parser.cpp" +#line 2212 "parser.cpp" break; case 34: // stmt: stmt_dowhile -#line 324 "parser.ypp" +#line 321 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_dowhile = std::move(yystack_[0].value.as < ast::stmt_dowhile::ptr > ()); } -#line 2233 "parser.cpp" +#line 2218 "parser.cpp" break; case 35: // stmt: stmt_for -#line 325 "parser.ypp" +#line 322 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_for = std::move(yystack_[0].value.as < ast::stmt_for::ptr > ()); } -#line 2239 "parser.cpp" +#line 2224 "parser.cpp" break; case 36: // stmt: stmt_foreach -#line 326 "parser.ypp" +#line 323 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_foreach = std::move(yystack_[0].value.as < ast::stmt_foreach::ptr > ()); } -#line 2245 "parser.cpp" +#line 2230 "parser.cpp" break; case 37: // stmt: stmt_switch -#line 327 "parser.ypp" +#line 324 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_switch = std::move(yystack_[0].value.as < ast::stmt_switch::ptr > ()); } -#line 2251 "parser.cpp" +#line 2236 "parser.cpp" break; case 38: // stmt: stmt_case -#line 328 "parser.ypp" +#line 325 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_case = std::move(yystack_[0].value.as < ast::stmt_case::ptr > ()); } -#line 2257 "parser.cpp" +#line 2242 "parser.cpp" break; case 39: // stmt: stmt_default -#line 329 "parser.ypp" +#line 326 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_default = std::move(yystack_[0].value.as < ast::stmt_default::ptr > ()); } -#line 2263 "parser.cpp" +#line 2248 "parser.cpp" break; case 40: // stmt: stmt_break -#line 330 "parser.ypp" +#line 327 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_break = std::move(yystack_[0].value.as < ast::stmt_break::ptr > ()); } -#line 2269 "parser.cpp" +#line 2254 "parser.cpp" break; case 41: // stmt: stmt_continue -#line 331 "parser.ypp" +#line 328 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_continue = std::move(yystack_[0].value.as < ast::stmt_continue::ptr > ()); } -#line 2275 "parser.cpp" +#line 2260 "parser.cpp" break; case 42: // stmt: stmt_return -#line 332 "parser.ypp" +#line 329 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_return = std::move(yystack_[0].value.as < ast::stmt_return::ptr > ()); } -#line 2281 "parser.cpp" +#line 2266 "parser.cpp" break; case 43: // stmt: stmt_breakpoint -#line 333 "parser.ypp" +#line 330 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_breakpoint = std::move(yystack_[0].value.as < ast::stmt_breakpoint::ptr > ()); } -#line 2287 "parser.cpp" +#line 2272 "parser.cpp" break; case 44: // stmt: stmt_prof_begin -#line 334 "parser.ypp" +#line 331 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_begin = std::move(yystack_[0].value.as < ast::stmt_prof_begin::ptr > ()); } -#line 2293 "parser.cpp" +#line 2278 "parser.cpp" break; case 45: // stmt: stmt_prof_end -#line 335 "parser.ypp" +#line 332 "parser.ypp" { yylhs.value.as < ast::stmt > ().as_prof_end = std::move(yystack_[0].value.as < ast::stmt_prof_end::ptr > ()); } -#line 2299 "parser.cpp" +#line 2284 "parser.cpp" break; case 46: // stmt_dev: "/#" stmt_list "#/" -#line 339 "parser.ypp" +#line 336 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2305 "parser.cpp" +#line 2290 "parser.cpp" break; case 47: // stmt_dev: "/#" "#/" -#line 340 "parser.ypp" +#line 337 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2311 "parser.cpp" +#line 2296 "parser.cpp" break; case 48: // stmt_block: "{" stmt_list "}" -#line 344 "parser.ypp" +#line 341 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::move(yystack_[1].value.as < ast::stmt_list::ptr > ()); } -#line 2317 "parser.cpp" +#line 2302 "parser.cpp" break; case 49: // stmt_block: "{" "}" -#line 345 "parser.ypp" +#line 342 "parser.ypp" { yylhs.value.as < ast::stmt_list::ptr > () = std::make_unique(yylhs.location); } -#line 2323 "parser.cpp" +#line 2308 "parser.cpp" break; case 50: // stmt_list: stmt_list stmt -#line 350 "parser.ypp" +#line 347 "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 2329 "parser.cpp" +#line 2314 "parser.cpp" break; case 51: // stmt_list: stmt -#line 352 "parser.ypp" +#line 349 "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 2335 "parser.cpp" +#line 2320 "parser.cpp" break; case 52: // stmt_expr: expr_assign -#line 357 "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 2341 "parser.cpp" +#line 2326 "parser.cpp" break; case 53: // stmt_expr: expr_increment -#line 359 "parser.ypp" +#line 356 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2347 "parser.cpp" +#line 2332 "parser.cpp" break; case 54: // stmt_expr: expr_decrement -#line 361 "parser.ypp" +#line 358 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2353 "parser.cpp" +#line 2338 "parser.cpp" break; case 55: // stmt_expr: %empty -#line 363 "parser.ypp" +#line 360 "parser.ypp" { yylhs.value.as < ast::stmt_expr::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2359 "parser.cpp" +#line 2344 "parser.cpp" break; case 56: // stmt_call: expr_call ";" -#line 368 "parser.ypp" +#line 365 "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 2365 "parser.cpp" +#line 2350 "parser.cpp" break; case 57: // stmt_call: expr_method ";" -#line 370 "parser.ypp" +#line 367 "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 2371 "parser.cpp" +#line 2356 "parser.cpp" break; case 58: // stmt_assign: expr_assign ";" -#line 375 "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 2377 "parser.cpp" +#line 2362 "parser.cpp" break; case 59: // stmt_assign: expr_increment ";" -#line 377 "parser.ypp" +#line 374 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2383 "parser.cpp" +#line 2368 "parser.cpp" break; case 60: // stmt_assign: expr_decrement ";" -#line 379 "parser.ypp" +#line 376 "parser.ypp" { yylhs.value.as < ast::stmt_assign::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2389 "parser.cpp" +#line 2374 "parser.cpp" break; case 61: // stmt_endon: expr_object "endon" "(" expr ")" ";" -#line 384 "parser.ypp" +#line 381 "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 2395 "parser.cpp" +#line 2380 "parser.cpp" break; case 62: // stmt_notify: expr_object "notify" "(" expr "," expr_arguments_no_empty ")" ";" -#line 389 "parser.ypp" +#line 386 "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 2401 "parser.cpp" +#line 2386 "parser.cpp" break; case 63: // stmt_notify: expr_object "notify" "(" expr ")" ";" -#line 391 "parser.ypp" +#line 388 "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 2407 "parser.cpp" +#line 2392 "parser.cpp" break; case 64: // stmt_wait: "wait" expr ";" -#line 396 "parser.ypp" +#line 393 "parser.ypp" { yylhs.value.as < ast::stmt_wait::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2413 "parser.cpp" +#line 2398 "parser.cpp" break; case 65: // stmt_waittill: expr_object "waittill" "(" expr "," expr_arguments_no_empty ")" ";" -#line 401 "parser.ypp" +#line 398 "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 2419 "parser.cpp" +#line 2404 "parser.cpp" break; case 66: // stmt_waittill: expr_object "waittill" "(" expr ")" ";" -#line 403 "parser.ypp" +#line 400 "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 2425 "parser.cpp" +#line 2410 "parser.cpp" break; case 67: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr "," expr_arguments_no_empty ")" ";" -#line 408 "parser.ypp" +#line 405 "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 2431 "parser.cpp" +#line 2416 "parser.cpp" break; case 68: // stmt_waittillmatch: expr_object "waittillmatch" "(" expr ")" ";" -#line 410 "parser.ypp" +#line 407 "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 2437 "parser.cpp" +#line 2422 "parser.cpp" break; case 69: // stmt_waittillframeend: "waittillframeend" ";" -#line 415 "parser.ypp" +#line 412 "parser.ypp" { yylhs.value.as < ast::stmt_waittillframeend::ptr > () = std::make_unique(yylhs.location); } -#line 2443 "parser.cpp" +#line 2428 "parser.cpp" break; case 70: // stmt_waitframe: "waitframe" ";" -#line 420 "parser.ypp" +#line 417 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2449 "parser.cpp" +#line 2434 "parser.cpp" break; case 71: // stmt_waitframe: "waitframe" "(" ")" ";" -#line 422 "parser.ypp" +#line 419 "parser.ypp" { yylhs.value.as < ast::stmt_waitframe::ptr > () = std::make_unique(yylhs.location); } -#line 2455 "parser.cpp" +#line 2440 "parser.cpp" break; case 72: // stmt_if: "if" "(" expr ")" stmt -#line 427 "parser.ypp" +#line 424 "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 2461 "parser.cpp" +#line 2446 "parser.cpp" break; case 73: // stmt_ifelse: "if" "(" expr ")" stmt "else" stmt -#line 432 "parser.ypp" +#line 429 "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 2467 "parser.cpp" +#line 2452 "parser.cpp" break; case 74: // stmt_while: "while" "(" expr ")" stmt -#line 437 "parser.ypp" +#line 434 "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 2473 "parser.cpp" +#line 2458 "parser.cpp" break; case 75: // stmt_dowhile: "do" stmt "while" "(" expr ")" ";" -#line 442 "parser.ypp" +#line 439 "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 2479 "parser.cpp" +#line 2464 "parser.cpp" break; case 76: // stmt_for: "for" "(" stmt_expr ";" expr_or_empty ";" stmt_expr ")" stmt -#line 447 "parser.ypp" +#line 444 "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 2485 "parser.cpp" +#line 2470 "parser.cpp" break; case 77: // stmt_foreach: "foreach" "(" expr_identifier "in" expr ")" stmt -#line 452 "parser.ypp" +#line 449 "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 2491 "parser.cpp" +#line 2476 "parser.cpp" break; case 78: // stmt_foreach: "foreach" "(" expr_identifier "," expr_identifier "in" expr ")" stmt -#line 454 "parser.ypp" +#line 451 "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 2497 "parser.cpp" +#line 2482 "parser.cpp" break; case 79: // stmt_switch: "switch" "(" expr ")" stmt_block -#line 459 "parser.ypp" +#line 456 "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 2503 "parser.cpp" +#line 2488 "parser.cpp" break; case 80: // stmt_case: "case" expr_integer ":" -#line 464 "parser.ypp" +#line 461 "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 2509 "parser.cpp" +#line 2494 "parser.cpp" break; case 81: // stmt_case: "case" expr_string ":" -#line 466 "parser.ypp" +#line 463 "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 2515 "parser.cpp" +#line 2500 "parser.cpp" break; case 82: // stmt_default: "default" ":" -#line 471 "parser.ypp" +#line 468 "parser.ypp" { yylhs.value.as < ast::stmt_default::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2521 "parser.cpp" +#line 2506 "parser.cpp" break; case 83: // stmt_break: "break" ";" -#line 476 "parser.ypp" +#line 473 "parser.ypp" { yylhs.value.as < ast::stmt_break::ptr > () = std::make_unique(yylhs.location); } -#line 2527 "parser.cpp" +#line 2512 "parser.cpp" break; case 84: // stmt_continue: "continue" ";" -#line 481 "parser.ypp" +#line 478 "parser.ypp" { yylhs.value.as < ast::stmt_continue::ptr > () = std::make_unique(yylhs.location); } -#line 2533 "parser.cpp" +#line 2518 "parser.cpp" break; case 85: // stmt_return: "return" expr ";" -#line 486 "parser.ypp" +#line 483 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 2539 "parser.cpp" +#line 2524 "parser.cpp" break; case 86: // stmt_return: "return" ";" -#line 488 "parser.ypp" +#line 485 "parser.ypp" { yylhs.value.as < ast::stmt_return::ptr > () = std::make_unique(yylhs.location, std::make_unique(yylhs.location)); } -#line 2545 "parser.cpp" +#line 2530 "parser.cpp" break; case 87: // stmt_breakpoint: "breakpoint" ";" -#line 493 "parser.ypp" +#line 490 "parser.ypp" { yylhs.value.as < ast::stmt_breakpoint::ptr > () = std::make_unique(yylhs.location); } -#line 2551 "parser.cpp" +#line 2536 "parser.cpp" break; case 88: // stmt_prof_begin: "prof_begin" "(" expr_arguments ")" ";" -#line 498 "parser.ypp" +#line 495 "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 2557 "parser.cpp" +#line 2542 "parser.cpp" break; case 89: // stmt_prof_end: "prof_end" "(" expr_arguments ")" ";" -#line 503 "parser.ypp" +#line 500 "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 2563 "parser.cpp" +#line 2548 "parser.cpp" break; case 90: // expr: expr_ternary -#line 507 "parser.ypp" +#line 504 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2569 "parser.cpp" +#line 2554 "parser.cpp" break; case 91: // expr: expr_binary -#line 508 "parser.ypp" +#line 505 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2575 "parser.cpp" +#line 2560 "parser.cpp" break; case 92: // expr: expr_primitive -#line 509 "parser.ypp" +#line 506 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2581 "parser.cpp" +#line 2566 "parser.cpp" break; case 93: // expr_or_empty: expr -#line 513 "parser.ypp" +#line 510 "parser.ypp" { yylhs.value.as < ast::expr > () = std::move(yystack_[0].value.as < ast::expr > ()); } -#line 2587 "parser.cpp" +#line 2572 "parser.cpp" break; case 94: // expr_or_empty: %empty -#line 514 "parser.ypp" +#line 511 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location); } -#line 2593 "parser.cpp" +#line 2578 "parser.cpp" break; case 95: // expr_assign: expr_object "=" expr -#line 519 "parser.ypp" +#line 516 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2599 "parser.cpp" +#line 2584 "parser.cpp" break; case 96: // expr_assign: expr_object "|=" expr -#line 521 "parser.ypp" +#line 518 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2605 "parser.cpp" +#line 2590 "parser.cpp" break; case 97: // expr_assign: expr_object "&=" expr -#line 523 "parser.ypp" +#line 520 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2611 "parser.cpp" +#line 2596 "parser.cpp" break; case 98: // expr_assign: expr_object "^=" expr -#line 525 "parser.ypp" +#line 522 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2617 "parser.cpp" +#line 2602 "parser.cpp" break; case 99: // expr_assign: expr_object "<<=" expr -#line 527 "parser.ypp" +#line 524 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()),std::move( yystack_[0].value.as < ast::expr > ())); } -#line 2623 "parser.cpp" +#line 2608 "parser.cpp" break; case 100: // expr_assign: expr_object ">>=" expr -#line 529 "parser.ypp" +#line 526 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2629 "parser.cpp" +#line 2614 "parser.cpp" break; case 101: // expr_assign: expr_object "+=" expr -#line 531 "parser.ypp" +#line 528 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2635 "parser.cpp" +#line 2620 "parser.cpp" break; case 102: // expr_assign: expr_object "-=" expr -#line 533 "parser.ypp" +#line 530 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2641 "parser.cpp" +#line 2626 "parser.cpp" break; case 103: // expr_assign: expr_object "*=" expr -#line 535 "parser.ypp" +#line 532 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2647 "parser.cpp" +#line 2632 "parser.cpp" break; case 104: // expr_assign: expr_object "/=" expr -#line 537 "parser.ypp" +#line 534 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2653 "parser.cpp" +#line 2638 "parser.cpp" break; case 105: // expr_assign: expr_object "%=" expr -#line 539 "parser.ypp" +#line 536 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2659 "parser.cpp" +#line 2644 "parser.cpp" break; case 106: // expr_increment: "++" expr_object -#line 544 "parser.ypp" +#line 541 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2665 "parser.cpp" +#line 2650 "parser.cpp" break; case 107: // expr_increment: expr_object "++" -#line 546 "parser.ypp" +#line 543 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2671 "parser.cpp" +#line 2656 "parser.cpp" break; case 108: // expr_decrement: "--" expr_object -#line 551 "parser.ypp" +#line 548 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ()), true); } -#line 2677 "parser.cpp" +#line 2662 "parser.cpp" break; case 109: // expr_decrement: expr_object "--" -#line 553 "parser.ypp" +#line 550 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ()), false); } -#line 2683 "parser.cpp" +#line 2668 "parser.cpp" break; case 110: // expr_ternary: expr "?" expr ":" expr -#line 558 "parser.ypp" +#line 555 "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 2689 "parser.cpp" +#line 2674 "parser.cpp" break; case 111: // expr_binary: expr "||" expr -#line 563 "parser.ypp" +#line 560 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2695 "parser.cpp" +#line 2680 "parser.cpp" break; case 112: // expr_binary: expr "&&" expr -#line 565 "parser.ypp" +#line 562 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2701 "parser.cpp" +#line 2686 "parser.cpp" break; case 113: // expr_binary: expr "==" expr -#line 567 "parser.ypp" +#line 564 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2707 "parser.cpp" +#line 2692 "parser.cpp" break; case 114: // expr_binary: expr "!=" expr -#line 569 "parser.ypp" +#line 566 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2713 "parser.cpp" +#line 2698 "parser.cpp" break; case 115: // expr_binary: expr "<=" expr -#line 571 "parser.ypp" +#line 568 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2719 "parser.cpp" +#line 2704 "parser.cpp" break; case 116: // expr_binary: expr ">=" expr -#line 573 "parser.ypp" +#line 570 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2725 "parser.cpp" +#line 2710 "parser.cpp" break; case 117: // expr_binary: expr "<" expr -#line 575 "parser.ypp" +#line 572 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2731 "parser.cpp" +#line 2716 "parser.cpp" break; case 118: // expr_binary: expr ">" expr -#line 577 "parser.ypp" +#line 574 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2737 "parser.cpp" +#line 2722 "parser.cpp" break; case 119: // expr_binary: expr "|" expr -#line 579 "parser.ypp" +#line 576 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2743 "parser.cpp" +#line 2728 "parser.cpp" break; case 120: // expr_binary: expr "&" expr -#line 581 "parser.ypp" +#line 578 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2749 "parser.cpp" +#line 2734 "parser.cpp" break; case 121: // expr_binary: expr "^" expr -#line 583 "parser.ypp" +#line 580 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2755 "parser.cpp" +#line 2740 "parser.cpp" break; case 122: // expr_binary: expr "<<" expr -#line 585 "parser.ypp" +#line 582 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2761 "parser.cpp" +#line 2746 "parser.cpp" break; case 123: // expr_binary: expr ">>" expr -#line 587 "parser.ypp" +#line 584 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2767 "parser.cpp" +#line 2752 "parser.cpp" break; case 124: // expr_binary: expr "+" expr -#line 589 "parser.ypp" +#line 586 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2773 "parser.cpp" +#line 2758 "parser.cpp" break; case 125: // expr_binary: expr "-" expr -#line 591 "parser.ypp" +#line 588 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2779 "parser.cpp" +#line 2764 "parser.cpp" break; case 126: // expr_binary: expr "*" expr -#line 593 "parser.ypp" +#line 590 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2785 "parser.cpp" +#line 2770 "parser.cpp" break; case 127: // expr_binary: expr "/" expr -#line 595 "parser.ypp" +#line 592 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2791 "parser.cpp" +#line 2776 "parser.cpp" break; case 128: // expr_binary: expr "%" expr -#line 597 "parser.ypp" +#line 594 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::make_unique(yylhs.location, std::move(yystack_[2].value.as < ast::expr > ()), std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2797 "parser.cpp" +#line 2782 "parser.cpp" break; case 129: // expr_primitive: expr_complement -#line 601 "parser.ypp" +#line 598 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_complement::ptr > ()); } -#line 2803 "parser.cpp" +#line 2788 "parser.cpp" break; case 130: // expr_primitive: expr_not -#line 602 "parser.ypp" +#line 599 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_not::ptr > ()); } -#line 2809 "parser.cpp" +#line 2794 "parser.cpp" break; case 131: // expr_primitive: expr_call -#line 603 "parser.ypp" +#line 600 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 2815 "parser.cpp" +#line 2800 "parser.cpp" break; case 132: // expr_primitive: expr_method -#line 604 "parser.ypp" +#line 601 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 2821 "parser.cpp" +#line 2806 "parser.cpp" break; case 133: // expr_primitive: expr_add_array -#line 605 "parser.ypp" +#line 602 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_add_array::ptr > ()); } -#line 2827 "parser.cpp" +#line 2812 "parser.cpp" break; case 134: // expr_primitive: expr_isdefined -#line 606 "parser.ypp" +#line 603 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_isdefined::ptr > ()); } -#line 2833 "parser.cpp" +#line 2818 "parser.cpp" break; case 135: // expr_primitive: expr_istrue -#line 607 "parser.ypp" +#line 604 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istrue::ptr > ()); } -#line 2839 "parser.cpp" +#line 2824 "parser.cpp" break; case 136: // expr_primitive: expr_reference -#line 608 "parser.ypp" +#line 605 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_reference::ptr > ()); } -#line 2845 "parser.cpp" +#line 2830 "parser.cpp" break; case 137: // expr_primitive: expr_array -#line 609 "parser.ypp" +#line 606 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 2851 "parser.cpp" +#line 2836 "parser.cpp" break; case 138: // expr_primitive: expr_field -#line 610 "parser.ypp" +#line 607 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 2857 "parser.cpp" +#line 2842 "parser.cpp" break; case 139: // expr_primitive: expr_size -#line 611 "parser.ypp" +#line 608 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_size::ptr > ()); } -#line 2863 "parser.cpp" +#line 2848 "parser.cpp" break; case 140: // expr_primitive: expr_paren -#line 612 "parser.ypp" +#line 609 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_paren::ptr > ()); } -#line 2869 "parser.cpp" +#line 2854 "parser.cpp" break; case 141: // expr_primitive: expr_thisthread -#line 613 "parser.ypp" +#line 610 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_thisthread::ptr > ()); } -#line 2875 "parser.cpp" +#line 2860 "parser.cpp" break; case 142: // expr_primitive: expr_empty_array -#line 614 "parser.ypp" +#line 611 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_empty_array::ptr > ()); } -#line 2881 "parser.cpp" +#line 2866 "parser.cpp" break; case 143: // expr_primitive: expr_undefined -#line 615 "parser.ypp" +#line 612 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_undefined::ptr > ()); } -#line 2887 "parser.cpp" +#line 2872 "parser.cpp" break; case 144: // expr_primitive: expr_game -#line 616 "parser.ypp" +#line 613 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 2893 "parser.cpp" +#line 2878 "parser.cpp" break; case 145: // expr_primitive: expr_self -#line 617 "parser.ypp" +#line 614 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 2899 "parser.cpp" +#line 2884 "parser.cpp" break; case 146: // expr_primitive: expr_anim -#line 618 "parser.ypp" +#line 615 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 2905 "parser.cpp" +#line 2890 "parser.cpp" break; case 147: // expr_primitive: expr_level -#line 619 "parser.ypp" +#line 616 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 2911 "parser.cpp" +#line 2896 "parser.cpp" break; case 148: // expr_primitive: expr_animation -#line 620 "parser.ypp" +#line 617 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animation::ptr > ()); } -#line 2917 "parser.cpp" +#line 2902 "parser.cpp" break; case 149: // expr_primitive: expr_animtree -#line 621 "parser.ypp" +#line 618 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_animtree::ptr > ()); } -#line 2923 "parser.cpp" +#line 2908 "parser.cpp" break; case 150: // expr_primitive: expr_identifier -#line 622 "parser.ypp" +#line 619 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 2929 "parser.cpp" +#line 2914 "parser.cpp" break; case 151: // expr_primitive: expr_istring -#line 623 "parser.ypp" +#line 620 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_istring::ptr > ()); } -#line 2935 "parser.cpp" +#line 2920 "parser.cpp" break; case 152: // expr_primitive: expr_string -#line 624 "parser.ypp" +#line 621 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_string::ptr > ()); } -#line 2941 "parser.cpp" +#line 2926 "parser.cpp" break; case 153: // expr_primitive: expr_color -#line 625 "parser.ypp" +#line 622 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_color::ptr > ()); } -#line 2947 "parser.cpp" +#line 2932 "parser.cpp" break; case 154: // expr_primitive: expr_vector -#line 626 "parser.ypp" +#line 623 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_vector::ptr > ()); } -#line 2953 "parser.cpp" +#line 2938 "parser.cpp" break; case 155: // expr_primitive: expr_float -#line 627 "parser.ypp" +#line 624 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_float::ptr > ()); } -#line 2959 "parser.cpp" +#line 2944 "parser.cpp" break; case 156: // expr_primitive: expr_integer -#line 628 "parser.ypp" +#line 625 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_integer::ptr > ()); } -#line 2965 "parser.cpp" +#line 2950 "parser.cpp" break; case 157: // expr_primitive: expr_false -#line 629 "parser.ypp" +#line 626 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_false::ptr > ()); } -#line 2971 "parser.cpp" +#line 2956 "parser.cpp" break; case 158: // expr_primitive: expr_true -#line 630 "parser.ypp" +#line 627 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_true::ptr > ()); } -#line 2977 "parser.cpp" +#line 2962 "parser.cpp" break; case 159: // expr_complement: "~" expr -#line 635 "parser.ypp" +#line 632 "parser.ypp" { yylhs.value.as < ast::expr_complement::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2983 "parser.cpp" +#line 2968 "parser.cpp" break; case 160: // expr_not: "!" expr -#line 640 "parser.ypp" +#line 637 "parser.ypp" { yylhs.value.as < ast::expr_not::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::expr > ())); } -#line 2989 "parser.cpp" +#line 2974 "parser.cpp" break; case 161: // expr_call: expr_function -#line 644 "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 2995 "parser.cpp" +#line 2980 "parser.cpp" break; case 162: // expr_call: expr_pointer -#line 645 "parser.ypp" +#line 642 "parser.ypp" { yylhs.value.as < ast::expr_call::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[0].value.as < ast::call > ())); } -#line 3001 "parser.cpp" +#line 2986 "parser.cpp" break; case 163: // expr_method: expr_object expr_function -#line 648 "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 3007 "parser.cpp" +#line 2992 "parser.cpp" break; case 164: // expr_method: expr_object expr_pointer -#line 649 "parser.ypp" +#line 646 "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 3013 "parser.cpp" +#line 2998 "parser.cpp" break; case 165: // expr_function: expr_identifier "(" expr_arguments ")" -#line 654 "parser.ypp" +#line 651 "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 3019 "parser.cpp" +#line 3004 "parser.cpp" break; case 166: // expr_function: expr_path "::" expr_identifier "(" expr_arguments ")" -#line 656 "parser.ypp" +#line 653 "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 3025 "parser.cpp" +#line 3010 "parser.cpp" break; case 167: // expr_function: "thread" expr_identifier "(" expr_arguments ")" -#line 658 "parser.ypp" +#line 655 "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 3031 "parser.cpp" +#line 3016 "parser.cpp" break; case 168: // expr_function: "thread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 660 "parser.ypp" +#line 657 "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 3037 "parser.cpp" +#line 3022 "parser.cpp" break; case 169: // expr_function: "childthread" expr_identifier "(" expr_arguments ")" -#line 662 "parser.ypp" +#line 659 "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 3043 "parser.cpp" +#line 3028 "parser.cpp" break; case 170: // expr_function: "childthread" expr_path "::" expr_identifier "(" expr_arguments ")" -#line 664 "parser.ypp" +#line 661 "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 3049 "parser.cpp" +#line 3034 "parser.cpp" break; case 171: // expr_pointer: "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 669 "parser.ypp" +#line 666 "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 3055 "parser.cpp" +#line 3040 "parser.cpp" break; case 172: // expr_pointer: "thread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 671 "parser.ypp" +#line 668 "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 3061 "parser.cpp" +#line 3046 "parser.cpp" break; case 173: // expr_pointer: "childthread" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 673 "parser.ypp" +#line 670 "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 3067 "parser.cpp" +#line 3052 "parser.cpp" break; case 174: // expr_pointer: "call" "[" "[" expr "]" "]" "(" expr_arguments ")" -#line 675 "parser.ypp" +#line 672 "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 3073 "parser.cpp" +#line 3058 "parser.cpp" break; case 175: // expr_add_array: "[" expr_arguments_no_empty "]" -#line 680 "parser.ypp" +#line 677 "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 3079 "parser.cpp" +#line 3064 "parser.cpp" break; case 176: // expr_parameters: expr_parameters "," expr_identifier -#line 685 "parser.ypp" +#line 682 "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 3085 "parser.cpp" +#line 3070 "parser.cpp" break; case 177: // expr_parameters: expr_identifier -#line 687 "parser.ypp" +#line 684 "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 3091 "parser.cpp" +#line 3076 "parser.cpp" break; case 178: // expr_parameters: %empty -#line 689 "parser.ypp" +#line 686 "parser.ypp" { yylhs.value.as < ast::expr_parameters::ptr > () = std::make_unique(yylhs.location); } -#line 3097 "parser.cpp" +#line 3082 "parser.cpp" break; case 179: // expr_arguments: expr_arguments_no_empty -#line 694 "parser.ypp" +#line 691 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::move(yystack_[0].value.as < ast::expr_arguments::ptr > ()); } -#line 3103 "parser.cpp" +#line 3088 "parser.cpp" break; case 180: // expr_arguments: %empty -#line 696 "parser.ypp" +#line 693 "parser.ypp" { yylhs.value.as < ast::expr_arguments::ptr > () = std::make_unique(yylhs.location); } -#line 3109 "parser.cpp" +#line 3094 "parser.cpp" break; case 181: // expr_arguments_no_empty: expr_arguments "," expr -#line 701 "parser.ypp" +#line 698 "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 3115 "parser.cpp" +#line 3100 "parser.cpp" break; case 182: // expr_arguments_no_empty: expr -#line 703 "parser.ypp" +#line 700 "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 3121 "parser.cpp" +#line 3106 "parser.cpp" break; case 183: // expr_isdefined: "isdefined" "(" expr ")" -#line 708 "parser.ypp" +#line 705 "parser.ypp" { yylhs.value.as < ast::expr_isdefined::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3127 "parser.cpp" +#line 3112 "parser.cpp" break; case 184: // expr_istrue: "istrue" "(" expr ")" -#line 713 "parser.ypp" +#line 710 "parser.ypp" { yylhs.value.as < ast::expr_istrue::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3133 "parser.cpp" +#line 3118 "parser.cpp" break; case 185: // expr_reference: "::" expr_identifier -#line 718 "parser.ypp" +#line 715 "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 3139 "parser.cpp" +#line 3124 "parser.cpp" break; case 186: // expr_reference: expr_path "::" expr_identifier -#line 720 "parser.ypp" +#line 717 "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 3145 "parser.cpp" +#line 3130 "parser.cpp" break; case 187: // expr_array: expr_object "[" expr "]" -#line 725 "parser.ypp" +#line 722 "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 3151 "parser.cpp" +#line 3136 "parser.cpp" break; case 188: // expr_field: expr_object "." expr_identifier -#line 730 "parser.ypp" +#line 727 "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 3157 "parser.cpp" +#line 3142 "parser.cpp" break; case 189: // expr_size: expr_object ".size" -#line 735 "parser.ypp" +#line 732 "parser.ypp" { yylhs.value.as < ast::expr_size::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3163 "parser.cpp" +#line 3148 "parser.cpp" break; case 190: // expr_paren: "(" expr ")" -#line 740 "parser.ypp" +#line 737 "parser.ypp" { yylhs.value.as < ast::expr_paren::ptr > () = std::make_unique(yylhs.location, std::move(yystack_[1].value.as < ast::expr > ())); } -#line 3169 "parser.cpp" +#line 3154 "parser.cpp" break; case 191: // expr_object: expr_call -#line 744 "parser.ypp" +#line 741 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_call::ptr > ()); } -#line 3175 "parser.cpp" +#line 3160 "parser.cpp" break; case 192: // expr_object: expr_method -#line 745 "parser.ypp" +#line 742 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_method::ptr > ()); } -#line 3181 "parser.cpp" +#line 3166 "parser.cpp" break; case 193: // expr_object: expr_array -#line 746 "parser.ypp" +#line 743 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_array::ptr > ()); } -#line 3187 "parser.cpp" +#line 3172 "parser.cpp" break; case 194: // expr_object: expr_field -#line 747 "parser.ypp" +#line 744 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_field::ptr > ()); } -#line 3193 "parser.cpp" +#line 3178 "parser.cpp" break; case 195: // expr_object: expr_game -#line 748 "parser.ypp" +#line 745 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_game::ptr > ()); } -#line 3199 "parser.cpp" +#line 3184 "parser.cpp" break; case 196: // expr_object: expr_self -#line 749 "parser.ypp" +#line 746 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_self::ptr > ()); } -#line 3205 "parser.cpp" +#line 3190 "parser.cpp" break; case 197: // expr_object: expr_anim -#line 750 "parser.ypp" +#line 747 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_anim::ptr > ()); } -#line 3211 "parser.cpp" +#line 3196 "parser.cpp" break; case 198: // expr_object: expr_level -#line 751 "parser.ypp" +#line 748 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_level::ptr > ()); } -#line 3217 "parser.cpp" +#line 3202 "parser.cpp" break; case 199: // expr_object: expr_identifier -#line 752 "parser.ypp" +#line 749 "parser.ypp" { yylhs.value.as < ast::expr > ().as_node = std::move(yystack_[0].value.as < ast::expr_identifier::ptr > ()); } -#line 3223 "parser.cpp" +#line 3208 "parser.cpp" break; case 200: // expr_thisthread: "thisthread" -#line 757 "parser.ypp" +#line 754 "parser.ypp" { yylhs.value.as < ast::expr_thisthread::ptr > () = std::make_unique(yylhs.location); } -#line 3229 "parser.cpp" +#line 3214 "parser.cpp" break; case 201: // expr_empty_array: "[" "]" -#line 762 "parser.ypp" +#line 759 "parser.ypp" { yylhs.value.as < ast::expr_empty_array::ptr > () = std::make_unique(yylhs.location); } -#line 3235 "parser.cpp" +#line 3220 "parser.cpp" break; case 202: // expr_undefined: "undefined" -#line 767 "parser.ypp" +#line 764 "parser.ypp" { yylhs.value.as < ast::expr_undefined::ptr > () = std::make_unique(yylhs.location); } -#line 3241 "parser.cpp" +#line 3226 "parser.cpp" break; case 203: // expr_game: "game" -#line 772 "parser.ypp" +#line 769 "parser.ypp" { yylhs.value.as < ast::expr_game::ptr > () = std::make_unique(yylhs.location); } -#line 3247 "parser.cpp" +#line 3232 "parser.cpp" break; case 204: // expr_self: "self" -#line 777 "parser.ypp" +#line 774 "parser.ypp" { yylhs.value.as < ast::expr_self::ptr > () = std::make_unique(yylhs.location); } -#line 3253 "parser.cpp" +#line 3238 "parser.cpp" break; case 205: // expr_anim: "anim" -#line 782 "parser.ypp" +#line 779 "parser.ypp" { yylhs.value.as < ast::expr_anim::ptr > () = std::make_unique(yylhs.location); } -#line 3259 "parser.cpp" +#line 3244 "parser.cpp" break; case 206: // expr_level: "level" -#line 787 "parser.ypp" +#line 784 "parser.ypp" { yylhs.value.as < ast::expr_level::ptr > () = std::make_unique(yylhs.location); } -#line 3265 "parser.cpp" +#line 3250 "parser.cpp" break; case 207: // expr_animation: "%" "identifier" -#line 792 "parser.ypp" +#line 789 "parser.ypp" { yylhs.value.as < ast::expr_animation::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3271 "parser.cpp" +#line 3256 "parser.cpp" break; case 208: // expr_animtree: "#animtree" -#line 797 "parser.ypp" +#line 794 "parser.ypp" { yylhs.value.as < ast::expr_animtree::ptr > () = std::make_unique(yylhs.location); } -#line 3277 "parser.cpp" +#line 3262 "parser.cpp" break; case 209: // expr_identifier: "identifier" -#line 802 "parser.ypp" +#line 799 "parser.ypp" { yylhs.value.as < ast::expr_identifier::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3283 "parser.cpp" +#line 3268 "parser.cpp" break; case 210: // expr_path: "path" -#line 807 "parser.ypp" +#line 804 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3289 "parser.cpp" +#line 3274 "parser.cpp" break; case 211: // expr_path: expr_identifier -#line 809 "parser.ypp" +#line 806 "parser.ypp" { yylhs.value.as < ast::expr_path::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < ast::expr_identifier::ptr > ()->value); } -#line 3295 "parser.cpp" +#line 3280 "parser.cpp" break; case 212: // expr_istring: "localized string" -#line 814 "parser.ypp" +#line 811 "parser.ypp" { yylhs.value.as < ast::expr_istring::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3301 "parser.cpp" +#line 3286 "parser.cpp" break; case 213: // expr_string: "string literal" -#line 819 "parser.ypp" +#line 816 "parser.ypp" { yylhs.value.as < ast::expr_string::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3307 "parser.cpp" +#line 3292 "parser.cpp" break; case 214: // expr_color: "color" -#line 824 "parser.ypp" +#line 821 "parser.ypp" { yylhs.value.as < ast::expr_color::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3313 "parser.cpp" +#line 3298 "parser.cpp" break; case 215: // expr_vector: "(" expr "," expr "," expr ")" -#line 829 "parser.ypp" +#line 826 "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 3319 "parser.cpp" +#line 3304 "parser.cpp" break; case 216: // expr_float: "-" "float" -#line 834 "parser.ypp" +#line 831 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3325 "parser.cpp" +#line 3310 "parser.cpp" break; case 217: // expr_float: "float" -#line 836 "parser.ypp" +#line 833 "parser.ypp" { yylhs.value.as < ast::expr_float::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3331 "parser.cpp" +#line 3316 "parser.cpp" break; - case 218: // expr_integer: "-" "int" -#line 841 "parser.ypp" + case 218: // expr_integer: "-" "integer" +#line 838 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, "-" + yystack_[0].value.as < std::string > ()); } -#line 3337 "parser.cpp" +#line 3322 "parser.cpp" break; - case 219: // expr_integer: "int" -#line 843 "parser.ypp" + case 219: // expr_integer: "integer" +#line 840 "parser.ypp" { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3343 "parser.cpp" +#line 3328 "parser.cpp" break; - case 220: // expr_integer: "octal int" + case 220: // expr_false: "false" #line 845 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3349 "parser.cpp" - break; - - case 221: // expr_integer: "binary int" -#line 847 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3355 "parser.cpp" - break; - - case 222: // expr_integer: "hexadecimal int" -#line 849 "parser.ypp" - { yylhs.value.as < ast::expr_integer::ptr > () = std::make_unique(yylhs.location, yystack_[0].value.as < std::string > ()); } -#line 3361 "parser.cpp" - break; - - case 223: // expr_false: "false" -#line 854 "parser.ypp" { yylhs.value.as < ast::expr_false::ptr > () = std::make_unique(yylhs.location); } -#line 3367 "parser.cpp" +#line 3334 "parser.cpp" break; - case 224: // expr_true: "true" -#line 859 "parser.ypp" + case 221: // expr_true: "true" +#line 850 "parser.ypp" { yylhs.value.as < ast::expr_true::ptr > () = std::make_unique(yylhs.location); } -#line 3373 "parser.cpp" +#line 3340 "parser.cpp" break; -#line 3377 "parser.cpp" +#line 3344 "parser.cpp" default: break; @@ -3569,28 +3536,27 @@ namespace xsk { namespace gsc { namespace s4 { "<", ">", "!", "~", "=", "+=", "-=", "*=", "/=", "%=", "|=", "&=", "^=", ">>=", "<<=", "|", "&", "^", "+", "-", "*", "/", "%", "path", "identifier", "string literal", "localized string", "color", "float", - "int", "octal int", "binary int", "hexadecimal int", "ADD_ARRAY", "THEN", - "TERN", "NEG", "ANIMREF", "PREINC", "PREDEC", "POSTINC", "POSTDEC", - "$accept", "root", "program", "inline", "include", "declaration", - "decl_usingtree", "decl_constant", "decl_thread", "stmt", "stmt_dev", - "stmt_block", "stmt_list", "stmt_expr", "stmt_call", "stmt_assign", - "stmt_endon", "stmt_notify", "stmt_wait", "stmt_waittill", - "stmt_waittillmatch", "stmt_waittillframeend", "stmt_waitframe", - "stmt_if", "stmt_ifelse", "stmt_while", "stmt_dowhile", "stmt_for", - "stmt_foreach", "stmt_switch", "stmt_case", "stmt_default", "stmt_break", - "stmt_continue", "stmt_return", "stmt_breakpoint", "stmt_prof_begin", - "stmt_prof_end", "expr", "expr_or_empty", "expr_assign", - "expr_increment", "expr_decrement", "expr_ternary", "expr_binary", - "expr_primitive", "expr_complement", "expr_not", "expr_call", - "expr_method", "expr_function", "expr_pointer", "expr_add_array", - "expr_parameters", "expr_arguments", "expr_arguments_no_empty", - "expr_isdefined", "expr_istrue", "expr_reference", "expr_array", - "expr_field", "expr_size", "expr_paren", "expr_object", - "expr_thisthread", "expr_empty_array", "expr_undefined", "expr_game", - "expr_self", "expr_anim", "expr_level", "expr_animation", - "expr_animtree", "expr_identifier", "expr_path", "expr_istring", - "expr_string", "expr_color", "expr_vector", "expr_float", "expr_integer", - "expr_false", "expr_true", YY_NULLPTR + "integer", "ADD_ARRAY", "THEN", "TERN", "NEG", "ANIMREF", "PREINC", + "PREDEC", "POSTINC", "POSTDEC", "$accept", "root", "program", "inline", + "include", "declaration", "decl_usingtree", "decl_constant", + "decl_thread", "stmt", "stmt_dev", "stmt_block", "stmt_list", + "stmt_expr", "stmt_call", "stmt_assign", "stmt_endon", "stmt_notify", + "stmt_wait", "stmt_waittill", "stmt_waittillmatch", + "stmt_waittillframeend", "stmt_waitframe", "stmt_if", "stmt_ifelse", + "stmt_while", "stmt_dowhile", "stmt_for", "stmt_foreach", "stmt_switch", + "stmt_case", "stmt_default", "stmt_break", "stmt_continue", + "stmt_return", "stmt_breakpoint", "stmt_prof_begin", "stmt_prof_end", + "expr", "expr_or_empty", "expr_assign", "expr_increment", + "expr_decrement", "expr_ternary", "expr_binary", "expr_primitive", + "expr_complement", "expr_not", "expr_call", "expr_method", + "expr_function", "expr_pointer", "expr_add_array", "expr_parameters", + "expr_arguments", "expr_arguments_no_empty", "expr_isdefined", + "expr_istrue", "expr_reference", "expr_array", "expr_field", "expr_size", + "expr_paren", "expr_object", "expr_thisthread", "expr_empty_array", + "expr_undefined", "expr_game", "expr_self", "expr_anim", "expr_level", + "expr_animation", "expr_animtree", "expr_identifier", "expr_path", + "expr_istring", "expr_string", "expr_color", "expr_vector", "expr_float", + "expr_integer", "expr_false", "expr_true", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -3855,59 +3821,58 @@ namespace xsk { namespace gsc { namespace s4 { } - const short parser::yypact_ninf_ = -273; + const short parser::yypact_ninf_ = -276; const short parser::yytable_ninf_ = -212; const short parser::yypact_[] = { - 15, -273, -273, -40, -40, -33, -273, 27, 15, -273, - -273, -273, -273, -273, -273, -35, -273, -273, -25, -17, - -48, -273, -273, -273, -273, -45, 888, -273, -273, -273, - 19, 43, -273, -273, -21, -8, -273, 17, -273, -273, - -273, -273, -273, -273, -273, 28, 31, 888, 749, -45, - 888, 888, -34, -14, -273, -273, -273, -273, -273, -273, - -273, 2040, -273, -273, -273, -273, -273, 11, 325, -273, - -273, -273, -273, -273, -273, 515, 520, -273, -273, 601, - -273, -273, -273, 623, 775, 849, 913, -273, -273, 408, - 26, -273, -273, -273, -273, -273, -273, -273, -273, 41, - 56, -45, 62, 60, 67, 74, 93, 78, 80, 888, - 888, 1294, 749, -273, 2123, 88, 91, -273, -273, -273, - -273, -273, -273, -273, 888, 888, 888, 888, 888, 888, - 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, - 888, 888, 888, -273, 957, -45, -273, -273, 103, 96, - 888, -45, -273, 1055, -273, -273, 888, 888, -45, 888, - 888, -45, 888, 1460, 1494, -273, 888, 1806, 888, -273, - 953, 97, 97, 2154, 2164, 2246, 2246, 157, 157, 157, - 157, 2195, 2236, 2205, -30, -30, -273, -273, -273, 1846, - -273, -45, 44, -273, 117, 1108, 888, 100, -18, 118, - 1253, 120, 127, 129, 130, -11, 122, 132, 137, 819, - 138, 150, 152, -273, 153, 139, 139, -273, -273, -273, - 1154, -273, -273, -273, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, 151, 154, 155, 158, 163, - -273, -273, 672, -273, -273, -273, -273, -22, 1886, 46, - 162, 1926, 47, 167, 1966, -273, -273, 2005, 172, 2123, - 888, -273, 117, -273, 888, -273, 1207, 2075, -273, 177, - -273, 888, 190, 888, 76, -45, 888, 128, 178, 180, - -273, -273, -273, -273, 2110, -273, 888, 888, 888, -273, - -273, 22, 22, -273, -273, -273, -273, -273, -273, -273, - 186, 191, 196, 202, -273, -273, 888, 888, 888, 888, - 888, 888, 888, 888, 888, 888, 888, 198, -273, 888, - 204, -273, 888, 205, 888, 211, 2123, 53, -273, -273, - 207, 1528, 213, 1562, 208, -273, -273, -273, 1257, 4, - 1596, -273, -273, -273, 63, 73, 1806, 888, 888, 888, - 888, 2123, 2123, 2123, 2123, 2123, 2123, 2123, 2123, 2123, - 2123, 2123, 214, 75, 220, 84, 222, 1630, 888, -273, - -273, 1253, 888, 1253, 888, 888, -45, 56, 209, 216, - 1664, 1338, 1382, 1426, 888, -273, 888, -273, 888, -273, - 86, 253, 1698, -273, 2123, 217, 1732, 257, -273, -273, - -273, 224, 225, 888, 227, 888, 231, 888, 94, 110, - 113, -273, 1253, 232, 76, 1253, 888, -273, -273, 244, - -273, 245, -273, 246, -273, -273, -273, -273, -273, 247, - -273, 1766, 239, 240, 241, 1253, 1253, -273, -273, -273, - -273, -273 + 23, -276, -276, -40, -40, -30, -276, 54, 23, -276, + -276, -276, -276, -276, -276, -8, -276, -276, -1, 16, + -57, -276, -276, -276, -276, -17, 1128, -276, -276, -276, + 44, -15, -276, -276, -35, -33, -276, 43, -276, -276, + -276, -276, -276, -276, -276, 48, 57, 1128, 996, -17, + 1128, 1128, -31, 25, -276, -276, -276, -276, 2050, -276, + -276, -276, -276, -276, 305, 699, -276, -276, -276, -276, + -276, -276, 722, 1019, -276, -276, 1029, -276, -276, -276, + 1092, 1154, 1224, 1271, -276, -276, 588, 64, -276, -276, + -276, -276, -276, -276, -276, -276, 69, 78, -17, 87, + 82, 91, 93, 101, 95, 103, 1128, 1128, 1266, 996, + -276, 2133, 99, 128, -276, -276, -276, -276, -276, -276, + -276, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, + 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, 1128, + -276, 1194, -17, -276, -276, 119, 121, 1128, -17, -276, + 81, -276, -276, 1128, 1128, -17, 1128, 1128, -17, 1128, + 1434, 1468, -276, 1128, 1780, 1128, -276, 2015, 164, 164, + 2164, 2174, 2246, 2246, -42, -42, -42, -42, 2205, 717, + 2215, 45, 45, -276, -276, -276, 1820, -276, -17, 27, + -276, 135, 823, 1128, 127, -3, 141, 968, 144, 147, + 149, 153, -20, 154, 146, 148, 1062, 152, 168, 169, + -276, 160, 503, 503, -276, -276, -276, 869, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, + -276, -276, 165, 166, 170, 174, 175, -276, -276, 635, + -276, -276, -276, -276, -23, 1860, 36, 178, 1900, 38, + 179, 1940, -276, -276, 1979, 181, 2133, 1128, -276, 135, + -276, 1128, -276, 922, 2085, -276, 189, -276, 1128, 197, + 1128, 28, -17, 1128, 140, 184, 185, -276, -276, -276, + -276, 2120, -276, 1128, 1128, 1128, -276, -276, -11, -11, + -276, -276, -276, -276, -276, -276, -276, 196, 200, 201, + 202, -276, -276, 1128, 1128, 1128, 1128, 1128, 1128, 1128, + 1128, 1128, 1128, 1128, 192, -276, 1128, 205, -276, 1128, + 206, 1128, 214, 2133, 80, -276, -276, 207, 1502, 216, + 1536, 208, -276, -276, -276, 1220, -2, 1570, -276, -276, + -276, 89, 110, 1780, 1128, 1128, 1128, 1128, 2133, 2133, + 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 2133, 219, + 112, 220, 114, 222, 1604, 1128, -276, -276, 968, 1128, + 968, 1128, 1128, -17, 78, 221, 227, 1638, 1312, 1356, + 1400, 1128, -276, 1128, -276, 1128, -276, 116, 255, 1672, + -276, 2133, 229, 1706, 248, -276, -276, -276, 230, 232, + 1128, 234, 1128, 237, 1128, 122, 124, 130, -276, 968, + 238, 28, 968, 1128, -276, -276, 231, -276, 250, -276, + 261, -276, -276, -276, -276, -276, 262, -276, 1740, 239, + 246, 254, 968, 968, -276, -276, -276, -276, -276 }; const unsigned char @@ -3916,473 +3881,466 @@ namespace xsk { namespace gsc { namespace s4 { 3, 12, 13, 0, 0, 0, 209, 0, 2, 7, 8, 9, 14, 15, 16, 0, 210, 211, 0, 0, 0, 1, 4, 5, 6, 178, 0, 10, 11, 213, - 0, 0, 177, 208, 0, 0, 200, 0, 224, 223, + 0, 0, 177, 208, 0, 0, 200, 0, 221, 220, 202, 203, 204, 205, 206, 0, 0, 0, 180, 0, - 0, 0, 0, 0, 212, 214, 217, 219, 220, 221, - 222, 0, 90, 91, 92, 129, 130, 131, 132, 161, - 162, 133, 134, 135, 136, 137, 138, 139, 140, 0, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 0, 151, 152, 153, 154, 155, 156, 157, 158, 0, - 0, 0, 0, 211, 0, 0, 211, 0, 0, 0, - 0, 0, 180, 201, 182, 0, 179, 185, 160, 159, - 216, 218, 207, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 212, 214, 217, 219, 0, 90, + 91, 92, 129, 130, 131, 132, 161, 162, 133, 134, + 135, 136, 137, 138, 139, 140, 0, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 0, 151, 152, + 153, 154, 155, 156, 157, 158, 0, 0, 0, 0, + 211, 0, 0, 211, 0, 0, 0, 0, 0, 180, + 201, 182, 0, 179, 185, 160, 159, 216, 218, 207, + 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 189, 0, 0, 163, 164, 211, 0, - 180, 0, 17, 0, 19, 176, 0, 180, 0, 0, - 180, 0, 0, 0, 0, 190, 0, 182, 0, 175, - 0, 122, 123, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 124, 125, 126, 127, 128, 0, - 188, 0, 0, 179, 186, 0, 0, 0, 0, 0, + 189, 0, 0, 163, 164, 211, 0, 180, 0, 17, + 0, 19, 176, 0, 180, 0, 0, 180, 0, 0, + 0, 0, 190, 0, 182, 0, 175, 0, 122, 123, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 124, 125, 126, 127, 128, 0, 188, 0, 0, + 179, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 49, 0, 0, 0, 51, 20, 21, - 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 191, 192, - 193, 194, 0, 195, 196, 197, 198, 199, 0, 0, - 0, 0, 0, 0, 0, 183, 184, 0, 0, 181, - 0, 187, 0, 165, 180, 47, 0, 0, 69, 0, - 70, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 82, 83, 84, 86, 0, 87, 180, 180, 0, 191, - 192, 106, 108, 48, 50, 58, 59, 60, 56, 57, - 0, 0, 0, 0, 107, 109, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 167, 180, - 0, 169, 180, 0, 0, 0, 110, 0, 46, 64, - 0, 0, 0, 0, 0, 52, 53, 54, 0, 0, - 0, 81, 80, 85, 0, 0, 0, 0, 0, 0, - 0, 95, 101, 102, 103, 104, 105, 96, 97, 98, - 100, 99, 0, 0, 0, 0, 0, 0, 180, 166, - 71, 0, 0, 0, 94, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 180, 168, 180, 170, 180, 215, - 0, 72, 0, 74, 93, 0, 0, 0, 79, 88, - 89, 0, 0, 180, 0, 180, 0, 180, 0, 0, - 0, 171, 0, 0, 55, 0, 0, 61, 63, 179, - 66, 179, 68, 179, 172, 173, 174, 73, 75, 0, - 77, 0, 0, 0, 0, 0, 0, 62, 65, 67, - 76, 78 + 49, 0, 0, 0, 51, 20, 21, 0, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 0, 0, 0, 191, 192, 193, 194, 0, + 195, 196, 197, 198, 199, 0, 0, 0, 0, 0, + 0, 0, 183, 184, 0, 0, 181, 0, 187, 0, + 165, 180, 47, 0, 0, 69, 0, 70, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 82, 83, 84, + 86, 0, 87, 180, 180, 0, 191, 192, 106, 108, + 48, 50, 58, 59, 60, 56, 57, 0, 0, 0, + 0, 107, 109, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 167, 180, 0, 169, 180, + 0, 0, 0, 110, 0, 46, 64, 0, 0, 0, + 0, 0, 52, 53, 54, 0, 0, 0, 81, 80, + 85, 0, 0, 0, 0, 0, 0, 0, 95, 101, + 102, 103, 104, 105, 96, 97, 98, 100, 99, 0, + 0, 0, 0, 0, 0, 180, 166, 71, 0, 0, + 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 180, 168, 180, 170, 180, 215, 0, 72, 0, + 74, 93, 0, 0, 0, 79, 88, 89, 0, 0, + 180, 0, 180, 0, 180, 0, 0, 0, 171, 0, + 0, 55, 0, 0, 61, 63, 179, 66, 179, 68, + 179, 172, 173, 174, 73, 75, 0, 77, 0, 0, + 0, 0, 0, 0, 62, 65, 67, 76, 78 }; const short parser::yypgoto_[] = { - -273, -273, -273, 292, 295, 297, -273, -273, -273, -184, - -273, -98, 109, -118, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, -273, -273, -273, -273, -273, - -273, -273, -273, -273, -273, -273, -273, -273, 203, -273, - -272, -270, -269, -273, -273, -273, -273, -273, -147, -72, - -74, -62, -273, -273, -127, -47, -273, -273, -273, 193, - 219, -273, -273, 265, -273, -273, -273, 296, 315, 351, - 452, -273, -273, 0, 6, -273, -13, -273, -273, -273, - 105, -273, -273 + -276, -276, -276, 303, 304, 306, -276, -276, -276, -184, + -276, -95, 142, -108, -276, -276, -276, -276, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, -276, -276, + -276, -276, -276, -276, -276, -276, -276, -276, 194, -276, + -275, -269, -267, -276, -276, -276, -276, -276, -12, -6, + -71, -65, -276, -276, 13, -47, -276, -276, -276, 79, + 253, -276, -276, 279, -276, -276, -276, 345, 373, 380, + 390, -276, -276, 0, 6, -276, -13, -276, -276, -276, + 134, -276, -276 }; const short parser::yydefgoto_[] = { - 0, 7, 8, 9, 10, 11, 12, 13, 14, 217, - 218, 219, 220, 344, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 114, 405, - 245, 246, 247, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 31, 115, 193, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98 + 0, 7, 8, 9, 10, 11, 12, 13, 14, 214, + 215, 216, 217, 341, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 111, 402, + 242, 243, 244, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 31, 112, 190, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95 }; const short parser::yytable_[] = { - 15, 116, 154, 17, 17, 146, 248, 30, 15, 18, - 19, 25, 345, 20, 346, 347, 282, 147, 1, 2, - 3, 4, 5, 192, 150, 32, 385, 21, 279, 102, - 259, 27, -211, 262, 103, 106, 304, 26, 280, 28, - 104, 107, 105, -191, -191, 29, -191, 6, 248, 117, - -191, 16, 6, 248, 34, 35, 386, 37, 140, 141, - 142, -191, 120, 121, -191, 116, 99, 108, 299, 299, - 16, 6, 144, 248, 109, 145, 287, 110, 122, 148, - 151, 249, 29, 16, 6, 149, 57, 58, 59, 60, - 100, 273, 304, 328, 331, 101, 168, 152, 168, 168, - 379, 155, -191, -191, 153, 168, 157, 6, 34, 35, - 388, 37, 156, 16, 6, 168, 41, 42, 43, 44, - 389, 158, 395, 249, 159, 168, 214, 168, 249, 248, - 162, 397, 161, 421, 215, 216, 168, 299, 168, 160, - 168, 434, 169, 300, 300, 190, 168, 337, 249, 150, - 191, 194, 345, 257, 346, 347, 278, 435, 260, 149, - 436, 263, 168, 274, 281, 168, 283, 16, 6, 354, - 355, 34, 35, 284, 37, 285, 286, 290, 146, 41, - 42, 43, 44, 138, 139, 140, 141, 142, 291, 214, - 147, 272, 288, 292, 295, 257, 296, 401, 297, 403, - 257, 149, 373, 298, 249, 375, 149, 305, 329, 342, - 306, 307, 300, 332, 308, 257, 257, 125, 126, 309, - 257, 149, 149, 335, 340, 121, 149, 146, 146, 61, - 16, 6, 357, 351, 248, 352, 248, 358, 437, 147, - 147, 440, 359, 138, 139, 140, 141, 142, 360, 372, - 111, 400, 148, 118, 119, 374, 376, 378, 149, 382, - 394, 450, 451, 380, 384, 409, 396, 418, 398, 419, - 422, 420, 410, 424, 146, 248, 257, 299, 248, 426, - 427, 428, 149, 430, 257, 349, 147, 432, 438, 408, - 149, 442, 443, 444, 445, 447, 448, 449, 248, 248, - 22, 148, 148, 23, 276, 24, 439, 149, 149, 249, - 289, 249, 163, 164, 0, 167, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 250, 189, 148, 0, - 249, 0, 300, 249, 149, 0, 0, -192, -192, 258, - -192, 0, 261, 0, -192, 264, 429, 0, 431, 267, - 433, 269, 251, 249, 249, -192, 0, 0, -192, 0, - 0, 257, 0, 257, 0, 0, 407, 149, 250, 149, - 0, 0, 0, 250, 0, 0, 0, 0, 0, 277, - 0, 0, 0, 0, 0, 0, 0, 0, 250, 250, - 0, 0, 294, 250, 251, 0, -192, -192, 252, 251, - 0, 0, 257, 0, 257, 257, 0, 0, 149, 0, - 149, 149, 0, 0, 251, 251, 0, 0, 0, 251, - -199, -199, 0, -199, 0, 257, 257, -199, 0, 253, - 0, 149, 149, 0, 150, 0, 0, 0, -199, 0, - 252, -199, -211, 0, 0, 252, 0, 0, 254, 250, - 0, 0, 0, 336, 0, 0, 0, 250, 0, 0, - 301, 302, 0, 0, 341, 252, 343, 0, 0, 350, - 0, 253, 0, 0, 0, 251, 253, 0, 0, -199, - -199, 356, 0, 251, 255, 0, 0, 0, 0, 0, - 254, 253, 253, 0, 0, 254, 253, 0, 0, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 254, 254, 0, 0, 0, 254, 0, 377, 0, 0, - 0, 252, 0, 0, 0, 0, 255, -193, -193, 348, - -193, 255, -194, -194, -193, -194, 0, 0, 0, -194, - 390, 391, 392, 393, 0, -193, 255, 255, -193, 0, - -194, 255, 253, -194, 250, 0, 250, 0, 0, 0, - 253, 0, 0, 0, 0, 402, 0, 404, 406, 0, - 0, 254, 0, 0, 0, 0, 0, 0, 0, 254, - 251, 0, 251, 0, 0, 256, -193, -193, 0, 0, - 0, -194, -194, 0, 0, 250, 0, 250, 250, 0, - 0, 0, 0, 0, 0, 0, 0, 255, 0, 441, - 0, 0, 0, 34, 35, 255, 37, 0, 250, 250, - 143, 251, 0, 251, 251, 0, 252, 256, 252, 0, - 0, 144, 256, 0, 145, -195, -195, 0, -195, 0, - 0, 0, -195, 0, 251, 251, 0, 256, 256, 0, - 0, 0, 256, -195, 0, 0, -195, 253, 0, 253, - 0, 310, 311, 0, 312, 313, 0, 252, 0, 348, - 252, 0, 16, 6, 0, 0, 254, 0, 254, 0, - 0, 0, 0, 0, 34, 35, 0, 37, 0, 0, - 252, 252, 0, 0, -195, -195, 0, 0, 253, 0, - 253, 253, 144, 0, 0, 145, 0, 0, 256, 0, - 314, 315, 255, 0, 255, 0, 256, 254, 0, 254, - 254, 253, 253, 0, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 0, 0, 33, 0, 0, - 254, 254, 0, 16, 6, 0, 0, 0, 0, 0, - 0, 0, 0, 255, 0, 255, 255, 0, 0, 0, - 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, - 42, 43, 44, 45, 46, 47, 255, 255, 0, 112, - 113, 0, 0, 49, 0, 0, 0, -196, -196, 0, - -196, 0, 0, 0, -196, 0, 0, 0, 0, 50, - 51, 0, 0, 0, 0, -196, 0, 33, -196, 0, - 0, 0, 0, 256, 0, 256, 52, 0, 0, 53, - 16, 6, 29, 54, 55, 56, 57, 58, 59, 60, - 0, 34, 35, 36, 37, 38, 39, 40, 0, 41, - 42, 43, 44, 45, 46, 47, -196, -196, 0, 48, - 0, 0, 0, 49, 256, 293, 256, 256, 0, 0, - 0, -197, -197, 0, -197, 0, 0, 0, -197, 50, - 51, 0, 0, 0, 0, 0, 33, 256, 256, -197, - 0, 0, -197, 0, 0, 0, 52, 0, 0, 53, - 16, 6, 29, 54, 55, 56, 57, 58, 59, 60, + 15, 113, 151, 17, 17, 143, 342, 30, 15, 18, + 19, 144, 343, 279, 344, 99, 20, 102, 122, 123, + 382, 34, 35, 147, 37, 32, 1, 2, 3, 4, + 5, -211, 97, 301, 100, 103, 29, 98, 25, 141, + 101, 104, 142, 276, 135, 136, 137, 138, 139, 114, + 383, 16, 6, 277, 21, 27, 16, 6, 16, 6, + 34, 35, 113, 37, 26, 117, 118, 284, 41, 42, + 43, 44, 28, 29, 270, 6, 145, 57, 211, 165, + 16, 6, 146, 325, 192, 328, 212, 213, 165, 301, + 165, 96, 193, 105, 106, 194, 195, 196, 152, 197, + 198, 199, 200, 107, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 34, 35, 6, 37, 119, 148, 16, + 6, 41, 42, 43, 44, 149, 150, 376, 154, 150, + 210, 211, 165, 137, 138, 139, 385, 153, 245, 212, + 213, 165, 187, 156, 246, 155, 342, 157, 191, 158, + 254, 165, 343, 159, 344, 257, 146, 386, 260, 392, + 189, 394, 165, 418, 165, 147, 165, 256, 165, 431, + 259, 432, 16, 6, 165, 188, 165, 433, 143, 166, + 245, 271, 165, 275, 144, 245, 246, 278, 269, 285, + 280, 246, 254, 281, 398, 282, 400, 254, 146, 283, + 296, 296, 288, 146, 289, 245, 297, 297, 292, 287, + 295, 246, 254, 254, 293, 294, 339, 254, 146, 146, + 58, 302, 303, 146, 326, 329, 304, 143, 143, 247, + 305, 306, 332, 144, 144, 434, 337, 118, 437, 348, + 349, 108, 354, 369, 115, 116, 355, 356, 357, 145, + 135, 136, 137, 138, 139, 146, 371, 373, 447, 448, + 375, 245, 379, 377, 381, 391, 393, 246, 395, 296, + 423, 247, 419, 254, 143, 297, 247, 406, 439, 146, + 144, 254, 346, 407, 334, 421, 424, 146, 425, 405, + 427, 247, 247, 429, 435, 444, 247, 440, 145, 145, + 160, 161, 445, 164, 146, 146, 351, 352, 441, 442, + 446, 22, 23, 436, 24, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 273, 186, 286, -191, -191, 370, + -191, 0, 372, 0, -191, 145, 0, 255, 0, 0, + 258, 146, 247, 261, 0, -191, 0, 264, -191, 266, + 247, 0, 0, 426, 0, 428, 245, 430, 245, 0, + 0, 0, 246, 0, 246, 0, 0, 0, 254, 0, + 254, 0, 0, 404, 146, 0, 146, 274, 397, 0, + 0, 0, 0, 0, 0, 0, -191, -191, 0, 0, + 291, 0, 0, 248, 415, 0, 416, 245, 417, 296, + 245, 0, 0, 246, 0, 297, 246, 0, 0, 254, + 0, 254, 254, 0, 0, 146, 0, 146, 146, 249, + 245, 245, 0, 0, 0, 0, 246, 246, 0, 0, + 0, 0, 254, 254, 0, 248, 0, 0, 146, 146, + 248, 0, 0, 0, 0, 0, 0, 247, 0, 247, + 0, 333, 0, 0, 0, 248, 248, 0, 0, 0, + 248, 249, 338, 0, 340, 0, 249, 347, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, + 0, 298, 299, 0, 0, 250, 249, 0, 247, 0, + 247, 247, 0, 0, 0, 0, 0, 358, 359, 360, + 361, 362, 363, 364, 365, 366, 367, 368, 0, 0, + 0, 247, 247, 251, 0, 374, 248, 0, 0, 0, + 252, 0, 0, 0, 248, 34, 35, 250, 37, 0, + 253, 0, 250, 41, 42, 43, 44, 0, 387, 388, + 389, 390, 249, 211, 0, 0, 0, 250, 250, 0, + 345, 0, 250, 0, 0, 251, 0, 0, 0, 0, + 251, 0, 252, 399, 0, 401, 403, 252, 0, 0, + 0, 0, 253, 0, 0, 251, 251, 253, 0, 0, + 251, 0, 252, 252, 16, 6, 0, 252, 0, 0, + 0, 0, 253, 253, 0, 0, 0, 253, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 438, 250, 0, + -199, -199, 0, -199, 0, 0, 250, -199, 0, 0, + 0, 248, 0, 248, 147, 0, 0, 0, -199, 0, + 0, -199, -211, 0, 307, 308, 251, 309, 310, 0, + 0, 0, 0, 252, 251, 0, 0, 249, 0, 249, + 0, 252, 0, 253, 0, 0, 0, 34, 35, 0, + 37, 253, 248, 0, 248, 248, 0, 0, 0, -199, + -199, 0, 0, 0, 0, 141, 0, 0, 142, 0, + 0, 0, 0, 311, 312, 248, 248, 0, 249, 0, + 345, 249, 0, 0, 0, 0, 0, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 0, 0, + 0, 249, 249, 250, 0, 250, 16, 6, 0, 0, + 0, -192, -192, 0, -192, 0, 0, 0, -192, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -192, + 0, 251, -192, 251, -193, -193, 0, -193, 252, 0, + 252, -193, 0, 0, 250, 0, 250, 250, 253, 0, + 253, 0, -193, 0, 0, -193, 0, 122, 123, 0, + 0, 126, 127, 128, 129, 130, 131, 250, 250, 0, + -192, -192, 251, 0, 251, 251, 0, 0, 0, 252, + 0, 252, 252, 135, 136, 137, 138, 139, 0, 253, + 0, 253, 253, -193, -193, 251, 251, 0, 0, 0, + 0, 0, 252, 252, 0, 0, 192, 272, 0, 0, + 0, 0, 253, 253, 193, 0, 0, 194, 195, 196, + 0, 197, 198, 199, 200, 0, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 34, 35, 0, 37, 0, + 0, 0, 0, 41, 42, 43, 44, 0, 0, 0, + 0, 150, 192, 211, 0, 0, 0, 0, 0, 0, + 193, 212, 213, 194, 195, 196, 0, 197, 198, 199, + 200, 0, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 34, 35, 0, 37, 0, 0, 0, 0, 41, + 42, 43, 44, 0, 16, 6, 0, 150, 300, 211, + 0, 0, 0, 0, 0, 192, 335, 212, 213, 0, + 0, 0, 0, 193, 0, 0, 194, 195, 196, 0, + 197, 198, 199, 200, 0, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 34, 35, 0, 37, 0, 0, + 16, 6, 41, 42, 43, 44, 0, 0, 0, 0, + 150, 192, 211, 0, 0, 0, 0, 0, 0, 193, + 212, 213, 194, 195, 196, 0, 197, 198, 199, 200, + 0, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 34, 35, 0, 37, 33, 0, 0, 0, 41, 42, + 43, 44, 0, 16, 6, 0, 150, 0, 211, 0, + 0, 0, 0, 0, 0, 0, 212, 213, 34, 35, + 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, + 45, 46, 47, 0, 0, 0, 109, 110, 0, 0, + 49, -194, -194, 0, -194, 0, 0, 0, -194, 16, + 6, 34, 35, 0, 37, 0, 50, 51, 140, -194, + 33, 0, -194, 0, 0, 0, 0, 0, 0, 141, + 0, 0, 142, 52, 0, 0, 53, 16, 6, 29, + 54, 55, 56, 57, 34, 35, 36, 37, 38, 39, + 40, 0, 41, 42, 43, 44, 45, 46, 47, 0, + -194, -194, 48, 0, 0, 0, 49, 0, 290, 0, + 16, 6, 0, 0, -195, -195, 0, -195, 0, 0, + 0, -195, 50, 51, 0, 0, 33, 0, 0, 0, + 0, 0, -195, 0, 0, -195, 0, 0, 0, 52, + 0, 0, 53, 16, 6, 29, 54, 55, 56, 57, 34, 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, 48, 0, - -197, -197, 49, 0, 0, -198, -198, 0, -198, 0, - 0, 0, -198, 0, 0, 0, 0, 0, 50, 51, - 0, 0, 0, -198, 0, 33, -198, 0, 0, 0, + 0, 0, 49, -195, -195, 0, -196, -196, 0, -196, + 0, 0, 0, -196, 0, 0, 0, 0, 50, 51, + 0, 0, 33, 0, -196, 0, 0, -196, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 53, 16, - 6, 29, 54, 55, 56, 57, 58, 59, 60, 34, - 35, 36, 37, 38, 39, 40, 0, 41, 42, 43, - 44, 45, 46, 47, -198, -198, 0, 112, 270, 0, - 124, 49, 0, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 0, 0, 0, 0, 50, 51, 0, - 0, 0, 0, 0, 0, 0, 135, 136, 137, 138, - 139, 140, 141, 142, 52, 0, 0, 53, 16, 6, - 29, 54, 55, 56, 57, 58, 59, 60, 195, 0, - 0, 0, 0, 0, 0, 0, 196, 0, 0, 197, - 198, 199, 0, 200, 201, 202, 203, 0, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 34, 35, 0, - 37, 0, 0, 0, 0, 41, 42, 43, 44, 0, - 0, 0, 0, 153, 213, 214, 0, 0, 0, 0, - 0, 195, 275, 215, 216, 0, 0, 0, 0, 196, - 0, 0, 197, 198, 199, 0, 200, 201, 202, 203, - 0, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 34, 35, 0, 37, 0, 0, 16, 6, 41, 42, - 43, 44, 0, 0, 0, 0, 153, 195, 214, 0, - 0, 0, 0, 0, 0, 196, 215, 216, 197, 198, - 199, 0, 200, 201, 202, 203, 0, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 34, 35, 0, 37, - 0, 0, 0, 0, 41, 42, 43, 44, 0, 16, - 6, 0, 153, 303, 214, 0, 0, 0, 0, 0, - 195, 338, 215, 216, 0, 0, 0, 0, 196, 0, - 0, 197, 198, 199, 0, 200, 201, 202, 203, 0, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 34, - 35, 0, 37, 0, 0, 16, 6, 41, 42, 43, - 44, 0, 0, 0, 0, 153, 195, 214, 0, 0, - 0, 0, 0, 0, 196, 215, 216, 197, 198, 199, - 0, 200, 201, 202, 203, 0, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 34, 35, 0, 37, 34, - 35, 0, 37, 41, 42, 43, 44, 0, 16, 6, - 0, 153, 0, 214, 0, 0, 0, 144, 0, 0, - 145, 215, 216, 0, 0, 314, 315, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 0, 165, 0, 0, 16, 6, 166, 0, 16, 6, - 0, 124, 0, 0, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 412, 0, 0, 0, 0, - 413, 0, 0, 0, 0, 124, 0, 0, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 0, 0, + 6, 29, 54, 55, 56, 57, 34, 35, 36, 37, + 38, 39, 40, 0, 41, 42, 43, 44, 45, 46, + 47, 0, 0, 0, 109, -196, -196, 0, 49, 0, + 0, 0, 34, 35, 0, 37, -197, -197, 0, -197, + 0, 0, 0, -197, 50, 51, 0, 0, 0, 0, + 141, 0, 0, 142, -197, 0, 0, -197, 311, 312, + 0, 52, 0, 0, 53, 16, 6, 29, 54, 55, + 56, 57, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 323, -198, -198, 0, -198, 0, 0, 0, + -198, 16, 6, 162, 0, -197, -197, 0, 163, 0, + 0, -198, 0, 121, -198, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 0, 0, 409, + 0, 0, -198, -198, 410, 0, 0, 0, 0, 121, + 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 411, 0, 0, 0, 0, 412, 0, + 0, 0, 0, 121, 0, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 413, 0, 0, + 0, 0, 414, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 135, 136, 137, 138, 139, 140, 141, 142, 414, - 0, 0, 0, 0, 415, 0, 0, 0, 0, 124, - 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 135, 136, 137, 138, 139, - 140, 141, 142, 416, 0, 0, 0, 0, 417, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 265, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 0, 262, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 121, 0, 0, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 263, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 121, 0, 0, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 378, + 0, 132, 133, 134, 135, 136, 137, 138, 139, 121, + 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 380, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 121, 0, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 384, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 266, 0, 135, 136, 137, 138, 139, 140, 141, - 142, 124, 0, 0, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 381, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 124, 0, 0, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, - 0, 135, 136, 137, 138, 139, 140, 141, 142, 124, - 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 387, 0, 135, 136, 137, 138, 139, - 140, 141, 142, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 399, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 0, 396, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 121, 0, 0, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 408, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 121, 0, 0, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 420, + 0, 132, 133, 134, 135, 136, 137, 138, 139, 121, + 0, 0, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 422, 0, 132, 133, 134, 135, 136, + 137, 138, 139, 121, 0, 0, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 443, 0, 132, + 133, 134, 135, 136, 137, 138, 139, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 411, 0, 135, 136, 137, 138, 139, 140, 141, - 142, 124, 0, 0, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 423, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 124, 0, 0, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 425, - 0, 135, 136, 137, 138, 139, 140, 141, 142, 124, - 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 446, 0, 135, 136, 137, 138, 139, - 140, 141, 142, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 268, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 271, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 327, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 330, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 333, 0, 0, - 0, 0, 0, 124, 0, 0, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, - 136, 137, 138, 139, 140, 141, 142, 334, 0, 0, - 0, 0, 124, 0, 0, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 135, 136, - 137, 138, 139, 140, 141, 142, 123, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 265, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 135, 136, 137, 138, 139, 140, 141, - 142, 339, 124, 0, 0, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 135, 136, - 137, 138, 139, 140, 141, 142, 353, 124, 0, 0, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 124, 0, 0, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 0, 0, 0, 0, 0, 135, 136, 137, 138, - 139, 140, 141, 142, 125, 126, 0, 128, 129, 130, - 131, 132, 133, 134, 125, 126, 0, 0, 129, 130, - 131, 132, 133, 134, 0, 0, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 0, 0, 135, 136, 137, - 138, 139, 140, 141, 142, 125, 126, 0, 0, 129, - 130, 131, 132, 133, 134, 125, 126, 0, 0, 129, - 130, 131, 132, 133, 134, 0, 0, 0, 0, 136, - 137, 138, 139, 140, 141, 142, 0, 0, 0, 136, - 0, 138, 139, 140, 141, 142, 125, 126, 0, 0, - 129, 130, 131, 132, 133, 134, 125, 126, 0, 0, - 0, 0, 131, 132, 133, 134, 0, 0, 0, 0, - 0, 0, 138, 139, 140, 141, 142, 0, 0, 0, - 0, 0, 138, 139, 140, 141, 142 + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 268, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 324, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 327, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 330, 0, 0, 0, 0, 0, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 331, 0, 0, 0, 0, 121, 0, 0, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 132, 133, 134, 135, 136, 137, 138, 139, + 267, 0, 121, 0, 0, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 132, 133, + 134, 135, 136, 137, 138, 139, 120, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 135, 136, 137, 138, + 139, 336, 121, 0, 0, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 132, 133, + 134, 135, 136, 137, 138, 139, 350, 121, 0, 0, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 121, 0, 0, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 0, 0, 0, 0, 0, 132, 133, 134, 135, + 136, 137, 138, 139, 122, 123, 0, 125, 126, 127, + 128, 129, 130, 131, 122, 123, 0, 0, 126, 127, + 128, 129, 130, 131, 0, 0, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 0, 0, 132, 133, 134, + 135, 136, 137, 138, 139, 122, 123, 0, 0, 126, + 127, 128, 129, 130, 131, 122, 123, 0, 0, 126, + 127, 128, 129, 130, 131, 0, 0, 0, 0, 133, + 134, 135, 136, 137, 138, 139, 0, 0, 0, 133, + 0, 135, 136, 137, 138, 139, 122, 123, 0, 0, + 0, 0, 128, 129, 130, 131, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 135, 136, 137, 138, 139 }; const short parser::yycheck_[] = { - 0, 48, 100, 3, 4, 79, 153, 20, 8, 3, - 4, 46, 284, 46, 284, 284, 200, 79, 3, 4, - 5, 6, 7, 150, 46, 25, 22, 0, 46, 50, - 157, 56, 54, 160, 34, 35, 220, 72, 56, 56, - 34, 35, 50, 32, 33, 93, 35, 92, 195, 49, - 39, 91, 92, 200, 32, 33, 52, 35, 88, 89, - 90, 50, 96, 97, 53, 112, 47, 50, 215, 216, - 91, 92, 50, 220, 46, 53, 87, 46, 92, 79, - 54, 153, 93, 91, 92, 79, 97, 98, 99, 100, - 47, 47, 276, 47, 47, 52, 52, 56, 52, 52, - 47, 101, 91, 92, 48, 52, 46, 92, 32, 33, - 47, 35, 50, 91, 92, 52, 40, 41, 42, 43, - 47, 54, 47, 195, 50, 52, 50, 52, 200, 276, - 50, 47, 54, 47, 58, 59, 52, 284, 52, 46, - 52, 47, 51, 215, 216, 145, 52, 274, 220, 46, - 54, 151, 424, 153, 424, 424, 56, 47, 158, 153, - 47, 161, 52, 46, 46, 52, 46, 91, 92, 296, - 297, 32, 33, 46, 35, 46, 46, 55, 252, 40, - 41, 42, 43, 86, 87, 88, 89, 90, 56, 50, - 252, 191, 205, 56, 56, 195, 46, 381, 46, 383, - 200, 195, 329, 50, 276, 332, 200, 56, 46, 19, - 56, 56, 284, 46, 56, 215, 216, 60, 61, 56, - 220, 215, 216, 51, 47, 97, 220, 301, 302, 26, - 91, 92, 46, 55, 381, 55, 383, 46, 422, 301, - 302, 425, 46, 86, 87, 88, 89, 90, 46, 51, - 47, 378, 252, 50, 51, 51, 51, 46, 252, 46, - 46, 445, 446, 56, 56, 56, 46, 394, 46, 396, - 17, 398, 56, 56, 348, 422, 276, 424, 425, 22, - 56, 56, 276, 56, 284, 285, 348, 56, 56, 387, - 284, 47, 47, 47, 47, 56, 56, 56, 445, 446, - 8, 301, 302, 8, 195, 8, 424, 301, 302, 381, - 205, 383, 109, 110, -1, 112, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 153, 144, 348, -1, - 422, -1, 424, 425, 348, -1, -1, 32, 33, 156, - 35, -1, 159, -1, 39, 162, 413, -1, 415, 166, - 417, 168, 153, 445, 446, 50, -1, -1, 53, -1, - -1, 381, -1, 383, -1, -1, 386, 381, 195, 383, - -1, -1, -1, 200, -1, -1, -1, -1, -1, 196, - -1, -1, -1, -1, -1, -1, -1, -1, 215, 216, - -1, -1, 209, 220, 195, -1, 91, 92, 153, 200, - -1, -1, 422, -1, 424, 425, -1, -1, 422, -1, - 424, 425, -1, -1, 215, 216, -1, -1, -1, 220, - 32, 33, -1, 35, -1, 445, 446, 39, -1, 153, - -1, 445, 446, -1, 46, -1, -1, -1, 50, -1, - 195, 53, 54, -1, -1, 200, -1, -1, 153, 276, - -1, -1, -1, 270, -1, -1, -1, 284, -1, -1, - 215, 216, -1, -1, 281, 220, 283, -1, -1, 286, - -1, 195, -1, -1, -1, 276, 200, -1, -1, 91, - 92, 298, -1, 284, 153, -1, -1, -1, -1, -1, - 195, 215, 216, -1, -1, 200, 220, -1, -1, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - 215, 216, -1, -1, -1, 220, -1, 334, -1, -1, - -1, 276, -1, -1, -1, -1, 195, 32, 33, 284, - 35, 200, 32, 33, 39, 35, -1, -1, -1, 39, - 357, 358, 359, 360, -1, 50, 215, 216, 53, -1, - 50, 220, 276, 53, 381, -1, 383, -1, -1, -1, - 284, -1, -1, -1, -1, 382, -1, 384, 385, -1, - -1, 276, -1, -1, -1, -1, -1, -1, -1, 284, - 381, -1, 383, -1, -1, 153, 91, 92, -1, -1, - -1, 91, 92, -1, -1, 422, -1, 424, 425, -1, - -1, -1, -1, -1, -1, -1, -1, 276, -1, 426, - -1, -1, -1, 32, 33, 284, 35, -1, 445, 446, - 39, 422, -1, 424, 425, -1, 381, 195, 383, -1, - -1, 50, 200, -1, 53, 32, 33, -1, 35, -1, - -1, -1, 39, -1, 445, 446, -1, 215, 216, -1, - -1, -1, 220, 50, -1, -1, 53, 381, -1, 383, - -1, 9, 10, -1, 12, 13, -1, 422, -1, 424, - 425, -1, 91, 92, -1, -1, 381, -1, 383, -1, - -1, -1, -1, -1, 32, 33, -1, 35, -1, -1, - 445, 446, -1, -1, 91, 92, -1, -1, 422, -1, - 424, 425, 50, -1, -1, 53, -1, -1, 276, -1, - 58, 59, 381, -1, 383, -1, 284, 422, -1, 424, - 425, 445, 446, -1, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, -1, -1, 8, -1, -1, - 445, 446, -1, 91, 92, -1, -1, -1, -1, -1, - -1, -1, -1, 422, -1, 424, 425, -1, -1, -1, - -1, 32, 33, 34, 35, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, 46, 445, 446, -1, 50, - 51, -1, -1, 54, -1, -1, -1, 32, 33, -1, - 35, -1, -1, -1, 39, -1, -1, -1, -1, 70, - 71, -1, -1, -1, -1, 50, -1, 8, 53, -1, - -1, -1, -1, 381, -1, 383, 87, -1, -1, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - -1, 32, 33, 34, 35, 36, 37, 38, -1, 40, - 41, 42, 43, 44, 45, 46, 91, 92, -1, 50, - -1, -1, -1, 54, 422, 56, 424, 425, -1, -1, - -1, 32, 33, -1, 35, -1, -1, -1, 39, 70, - 71, -1, -1, -1, -1, -1, 8, 445, 446, 50, - -1, -1, 53, -1, -1, -1, 87, -1, -1, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 0, 48, 97, 3, 4, 76, 281, 20, 8, 3, + 4, 76, 281, 197, 281, 50, 46, 50, 60, 61, + 22, 32, 33, 46, 35, 25, 3, 4, 5, 6, + 7, 54, 47, 217, 34, 35, 93, 52, 46, 50, + 34, 35, 53, 46, 86, 87, 88, 89, 90, 49, + 52, 91, 92, 56, 0, 56, 91, 92, 91, 92, + 32, 33, 109, 35, 72, 96, 97, 87, 40, 41, + 42, 43, 56, 93, 47, 92, 76, 97, 50, 52, + 91, 92, 76, 47, 3, 47, 58, 59, 52, 273, + 52, 47, 11, 50, 46, 14, 15, 16, 98, 18, + 19, 20, 21, 46, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 92, 35, 92, 54, 91, + 92, 40, 41, 42, 43, 56, 48, 47, 46, 48, + 49, 50, 52, 88, 89, 90, 47, 50, 150, 58, + 59, 52, 142, 50, 150, 54, 421, 46, 148, 54, + 150, 52, 421, 50, 421, 155, 150, 47, 158, 47, + 147, 47, 52, 47, 52, 46, 52, 154, 52, 47, + 157, 47, 91, 92, 52, 54, 52, 47, 249, 51, + 192, 46, 52, 56, 249, 197, 192, 46, 188, 202, + 46, 197, 192, 46, 378, 46, 380, 197, 192, 46, + 212, 213, 56, 197, 56, 217, 212, 213, 56, 55, + 50, 217, 212, 213, 46, 46, 19, 217, 212, 213, + 26, 56, 56, 217, 46, 46, 56, 298, 299, 150, + 56, 56, 51, 298, 299, 419, 47, 97, 422, 55, + 55, 47, 46, 51, 50, 51, 46, 46, 46, 249, + 86, 87, 88, 89, 90, 249, 51, 51, 442, 443, + 46, 273, 46, 56, 56, 46, 46, 273, 46, 281, + 22, 192, 17, 273, 345, 281, 197, 56, 47, 273, + 345, 281, 282, 56, 271, 56, 56, 281, 56, 384, + 56, 212, 213, 56, 56, 56, 217, 47, 298, 299, + 106, 107, 56, 109, 298, 299, 293, 294, 47, 47, + 56, 8, 8, 421, 8, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 192, 141, 202, 32, 33, 326, + 35, -1, 329, -1, 39, 345, -1, 153, -1, -1, + 156, 345, 273, 159, -1, 50, -1, 163, 53, 165, + 281, -1, -1, 410, -1, 412, 378, 414, 380, -1, + -1, -1, 378, -1, 380, -1, -1, -1, 378, -1, + 380, -1, -1, 383, 378, -1, 380, 193, 375, -1, + -1, -1, -1, -1, -1, -1, 91, 92, -1, -1, + 206, -1, -1, 150, 391, -1, 393, 419, 395, 421, + 422, -1, -1, 419, -1, 421, 422, -1, -1, 419, + -1, 421, 422, -1, -1, 419, -1, 421, 422, 150, + 442, 443, -1, -1, -1, -1, 442, 443, -1, -1, + -1, -1, 442, 443, -1, 192, -1, -1, 442, 443, + 197, -1, -1, -1, -1, -1, -1, 378, -1, 380, + -1, 267, -1, -1, -1, 212, 213, -1, -1, -1, + 217, 192, 278, -1, 280, -1, 197, 283, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 295, + -1, 212, 213, -1, -1, 150, 217, -1, 419, -1, + 421, 422, -1, -1, -1, -1, -1, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, -1, -1, + -1, 442, 443, 150, -1, 331, 273, -1, -1, -1, + 150, -1, -1, -1, 281, 32, 33, 192, 35, -1, + 150, -1, 197, 40, 41, 42, 43, -1, 354, 355, + 356, 357, 273, 50, -1, -1, -1, 212, 213, -1, + 281, -1, 217, -1, -1, 192, -1, -1, -1, -1, + 197, -1, 192, 379, -1, 381, 382, 197, -1, -1, + -1, -1, 192, -1, -1, 212, 213, 197, -1, -1, + 217, -1, 212, 213, 91, 92, -1, 217, -1, -1, + -1, -1, 212, 213, -1, -1, -1, 217, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 423, 273, -1, + 32, 33, -1, 35, -1, -1, 281, 39, -1, -1, + -1, 378, -1, 380, 46, -1, -1, -1, 50, -1, + -1, 53, 54, -1, 9, 10, 273, 12, 13, -1, + -1, -1, -1, 273, 281, -1, -1, 378, -1, 380, + -1, 281, -1, 273, -1, -1, -1, 32, 33, -1, + 35, 281, 419, -1, 421, 422, -1, -1, -1, 91, + 92, -1, -1, -1, -1, 50, -1, -1, 53, -1, + -1, -1, -1, 58, 59, 442, 443, -1, 419, -1, + 421, 422, -1, -1, -1, -1, -1, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, + -1, 442, 443, 378, -1, 380, 91, 92, -1, -1, + -1, 32, 33, -1, 35, -1, -1, -1, 39, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, + -1, 378, 53, 380, 32, 33, -1, 35, 378, -1, + 380, 39, -1, -1, 419, -1, 421, 422, 378, -1, + 380, -1, 50, -1, -1, 53, -1, 60, 61, -1, + -1, 64, 65, 66, 67, 68, 69, 442, 443, -1, + 91, 92, 419, -1, 421, 422, -1, -1, -1, 419, + -1, 421, 422, 86, 87, 88, 89, 90, -1, 419, + -1, 421, 422, 91, 92, 442, 443, -1, -1, -1, + -1, -1, 442, 443, -1, -1, 3, 4, -1, -1, + -1, -1, 442, 443, 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, -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, 91, 92, -1, 48, 49, 50, + -1, -1, -1, -1, -1, 3, 4, 58, 59, -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, + 91, 92, 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, 91, 92, -1, 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, 91, + 92, 32, 33, -1, 35, -1, 70, 71, 39, 50, + 8, -1, 53, -1, -1, -1, -1, -1, -1, 50, + -1, -1, 53, 87, -1, -1, 90, 91, 92, 93, + 94, 95, 96, 97, 32, 33, 34, 35, 36, 37, + 38, -1, 40, 41, 42, 43, 44, 45, 46, -1, + 91, 92, 50, -1, -1, -1, 54, -1, 56, -1, + 91, 92, -1, -1, 32, 33, -1, 35, -1, -1, + -1, 39, 70, 71, -1, -1, 8, -1, -1, -1, + -1, -1, 50, -1, -1, 53, -1, -1, -1, 87, + -1, -1, 90, 91, 92, 93, 94, 95, 96, 97, 32, 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, 46, -1, -1, -1, 50, -1, - 91, 92, 54, -1, -1, 32, 33, -1, 35, -1, - -1, -1, 39, -1, -1, -1, -1, -1, 70, 71, - -1, -1, -1, 50, -1, 8, 53, -1, -1, -1, + -1, -1, 54, 91, 92, -1, 32, 33, -1, 35, + -1, -1, -1, 39, -1, -1, -1, -1, 70, 71, + -1, -1, 8, -1, 50, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, 87, -1, -1, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 32, - 33, 34, 35, 36, 37, 38, -1, 40, 41, 42, - 43, 44, 45, 46, 91, 92, -1, 50, 55, -1, - 57, 54, -1, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, -1, -1, -1, -1, 70, 71, -1, - -1, -1, -1, -1, -1, -1, 83, 84, 85, 86, - 87, 88, 89, 90, 87, -1, -1, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 3, -1, - -1, -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, -1, -1, 40, 41, 42, 43, -1, - -1, -1, -1, 48, 49, 50, -1, -1, -1, -1, - -1, 3, 4, 58, 59, -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, 91, 92, 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, 91, - 92, -1, 48, 49, 50, -1, -1, -1, -1, -1, - 3, 4, 58, 59, -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, 91, 92, 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, 32, - 33, -1, 35, 40, 41, 42, 43, -1, 91, 92, - -1, 48, -1, 50, -1, -1, -1, 50, -1, -1, - 53, 58, 59, -1, -1, 58, 59, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - -1, 47, -1, -1, 91, 92, 52, -1, 91, 92, - -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, + 92, 93, 94, 95, 96, 97, 32, 33, 34, 35, + 36, 37, 38, -1, 40, 41, 42, 43, 44, 45, + 46, -1, -1, -1, 50, 91, 92, -1, 54, -1, + -1, -1, 32, 33, -1, 35, 32, 33, -1, 35, + -1, -1, -1, 39, 70, 71, -1, -1, -1, -1, + 50, -1, -1, 53, 50, -1, -1, 53, 58, 59, + -1, 87, -1, -1, 90, 91, 92, 93, 94, 95, + 96, 97, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 32, 33, -1, 35, -1, -1, -1, + 39, 91, 92, 47, -1, 91, 92, -1, 52, -1, + -1, 50, -1, 57, 53, -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, -1, -1, 47, + -1, -1, 91, 92, 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, 47, -1, 83, - 84, 85, 86, 87, 88, 89, 90, 57, -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, 47, -1, 83, 84, 85, 86, 87, 88, 89, @@ -4415,29 +4373,36 @@ namespace xsk { namespace gsc { namespace s4 { -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, -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, -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, -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, -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, -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, -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, + -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, -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, -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, -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, -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, -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, -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, -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, @@ -4461,89 +4426,87 @@ namespace xsk { namespace gsc { namespace s4 { 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, - 64, 65, 66, 67, 68, 69, 60, 61, -1, -1, -1, -1, 66, 67, 68, 69, -1, -1, -1, -1, - -1, -1, 86, 87, 88, 89, 90, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 86, 87, 88, 89, 90 }; const unsigned char parser::yystos_[] = { - 0, 3, 4, 5, 6, 7, 92, 111, 112, 113, - 114, 115, 116, 117, 118, 183, 91, 183, 184, 184, - 46, 0, 113, 114, 115, 46, 72, 56, 56, 93, - 186, 163, 183, 8, 32, 33, 34, 35, 36, 37, + 0, 3, 4, 5, 6, 7, 92, 108, 109, 110, + 111, 112, 113, 114, 115, 180, 91, 180, 181, 181, + 46, 0, 110, 111, 112, 46, 72, 56, 56, 93, + 183, 160, 180, 8, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 50, 54, - 70, 71, 87, 90, 94, 95, 96, 97, 98, 99, - 100, 148, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 166, 167, 168, 169, 170, 171, 172, 173, + 70, 71, 87, 90, 94, 95, 96, 97, 145, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 163, + 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, 191, 192, 47, - 47, 52, 50, 183, 184, 50, 183, 184, 50, 46, - 46, 148, 50, 51, 148, 164, 165, 183, 148, 148, - 96, 97, 92, 56, 57, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 83, 84, 85, 86, 87, - 88, 89, 90, 39, 50, 53, 160, 161, 183, 184, - 46, 54, 56, 48, 121, 183, 50, 46, 54, 50, - 46, 54, 50, 148, 148, 47, 52, 148, 52, 51, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 183, 54, 164, 165, 183, 3, 11, 14, 15, 16, - 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 49, 50, 58, 59, 119, 120, 121, - 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 184, 185, 186, 187, 188, 189, 47, 47, 52, 50, + 180, 181, 50, 180, 181, 50, 46, 46, 145, 50, + 51, 145, 161, 162, 180, 145, 145, 96, 97, 92, + 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 83, 84, 85, 86, 87, 88, 89, 90, + 39, 50, 53, 157, 158, 180, 181, 46, 54, 56, + 48, 118, 180, 50, 46, 54, 50, 46, 54, 50, + 145, 145, 47, 52, 145, 52, 51, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 180, 54, 161, + 162, 180, 3, 11, 14, 15, 16, 18, 19, 20, + 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 49, 50, 58, 59, 116, 117, 118, 119, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 150, 151, 152, 158, 159, - 169, 170, 173, 177, 178, 179, 180, 183, 148, 164, - 183, 148, 164, 183, 148, 47, 47, 148, 51, 148, - 55, 51, 183, 47, 46, 4, 122, 148, 56, 46, - 56, 46, 119, 46, 46, 46, 46, 87, 186, 190, - 55, 56, 56, 56, 148, 56, 46, 46, 50, 158, - 159, 173, 173, 49, 119, 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, 148, 164, 4, 56, - 47, 148, 19, 148, 123, 150, 151, 152, 173, 183, - 148, 55, 55, 56, 164, 164, 148, 46, 46, 46, - 46, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 51, 164, 51, 164, 51, 148, 46, 47, - 56, 47, 46, 47, 56, 22, 52, 47, 47, 47, - 148, 148, 148, 148, 46, 47, 46, 47, 46, 47, - 164, 119, 148, 119, 148, 149, 148, 183, 121, 56, - 56, 47, 47, 52, 47, 52, 47, 52, 164, 164, - 164, 47, 17, 47, 56, 47, 22, 56, 56, 165, - 56, 165, 56, 165, 47, 47, 47, 119, 56, 123, - 119, 148, 47, 47, 47, 47, 47, 56, 56, 56, - 119, 119 + 143, 144, 147, 148, 149, 155, 156, 166, 167, 170, + 174, 175, 176, 177, 180, 145, 161, 180, 145, 161, + 180, 145, 47, 47, 145, 51, 145, 55, 51, 180, + 47, 46, 4, 119, 145, 56, 46, 56, 46, 116, + 46, 46, 46, 46, 87, 183, 187, 55, 56, 56, + 56, 145, 56, 46, 46, 50, 155, 156, 170, 170, + 49, 116, 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, 145, 161, 4, 56, 47, 145, 19, + 145, 120, 147, 148, 149, 170, 180, 145, 55, 55, + 56, 161, 161, 145, 46, 46, 46, 46, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 51, + 161, 51, 161, 51, 145, 46, 47, 56, 47, 46, + 47, 56, 22, 52, 47, 47, 47, 145, 145, 145, + 145, 46, 47, 46, 47, 46, 47, 161, 116, 145, + 116, 145, 146, 145, 180, 118, 56, 56, 47, 47, + 52, 47, 52, 47, 52, 161, 161, 161, 47, 17, + 47, 56, 47, 22, 56, 56, 162, 56, 162, 56, + 162, 47, 47, 47, 116, 56, 120, 116, 145, 47, + 47, 47, 47, 47, 56, 56, 56, 116, 116 }; const unsigned char parser::yyr1_[] = { - 0, 110, 111, 111, 112, 112, 112, 112, 112, 112, - 113, 114, 115, 115, 115, 115, 115, 116, 117, 118, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 120, 120, 121, 121, - 122, 122, 123, 123, 123, 123, 124, 124, 125, 125, - 125, 126, 127, 127, 128, 129, 129, 130, 130, 131, - 132, 132, 133, 134, 135, 136, 137, 138, 138, 139, - 140, 140, 141, 142, 143, 144, 144, 145, 146, 147, - 148, 148, 148, 149, 149, 150, 150, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 151, 151, 152, 152, - 153, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 154, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 155, 156, - 157, 158, 158, 159, 159, 160, 160, 160, 160, 160, - 160, 161, 161, 161, 161, 162, 163, 163, 163, 164, - 164, 165, 165, 166, 167, 168, 168, 169, 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, - 190, 190, 190, 191, 192 + 0, 107, 108, 108, 109, 109, 109, 109, 109, 109, + 110, 111, 112, 112, 112, 112, 112, 113, 114, 115, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 117, 117, 118, 118, + 119, 119, 120, 120, 120, 120, 121, 121, 122, 122, + 122, 123, 124, 124, 125, 126, 126, 127, 127, 128, + 129, 129, 130, 131, 132, 133, 134, 135, 135, 136, + 137, 137, 138, 139, 140, 141, 141, 142, 143, 144, + 145, 145, 145, 146, 146, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 148, 148, 149, 149, + 150, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, + 154, 155, 155, 156, 156, 157, 157, 157, 157, 157, + 157, 158, 158, 158, 158, 159, 160, 160, 160, 161, + 161, 162, 162, 163, 164, 165, 165, 166, 167, 168, + 169, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 181, 182, 183, 184, 185, 186, 186, 187, 187, + 188, 189 }; const signed char @@ -4571,7 +4534,7 @@ namespace xsk { namespace gsc { namespace s4 { 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 7, 2, 1, 2, 1, - 1, 1, 1, 1, 1 + 1, 1 }; @@ -4581,29 +4544,29 @@ namespace xsk { namespace gsc { namespace s4 { const short parser::yyrline_[] = { - 0, 258, 258, 259, 263, 265, 267, 269, 271, 273, - 278, 282, 287, 288, 289, 290, 291, 295, 300, 305, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, - 330, 331, 332, 333, 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, 734, - 739, 744, 745, 746, 747, 748, 749, 750, 751, 752, - 756, 761, 766, 771, 776, 781, 786, 791, 796, 801, - 806, 808, 813, 818, 823, 828, 833, 835, 840, 842, - 844, 846, 848, 853, 858 + 0, 255, 255, 256, 260, 262, 264, 266, 268, 270, + 275, 279, 284, 285, 286, 287, 288, 292, 297, 302, + 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, 332, 336, 337, 341, 342, + 346, 348, 353, 355, 357, 360, 364, 366, 371, 373, + 375, 380, 385, 387, 392, 397, 399, 404, 406, 411, + 416, 418, 423, 428, 433, 438, 443, 448, 450, 455, + 460, 462, 467, 472, 477, 482, 484, 489, 494, 499, + 504, 505, 506, 510, 511, 515, 517, 519, 521, 523, + 525, 527, 529, 531, 533, 535, 540, 542, 547, 549, + 554, 559, 561, 563, 565, 567, 569, 571, 573, 575, + 577, 579, 581, 583, 585, 587, 589, 591, 593, 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, 625, 626, 627, 631, + 636, 641, 642, 645, 646, 650, 652, 654, 656, 658, + 660, 665, 667, 669, 671, 676, 681, 683, 686, 690, + 693, 697, 699, 704, 709, 714, 716, 721, 726, 731, + 736, 741, 742, 743, 744, 745, 746, 747, 748, 749, + 753, 758, 763, 768, 773, 778, 783, 788, 793, 798, + 803, 805, 810, 815, 820, 825, 830, 832, 837, 839, + 844, 849 }; void @@ -4636,9 +4599,9 @@ namespace xsk { namespace gsc { namespace s4 { #line 13 "parser.ypp" } } } // xsk::gsc::s4 -#line 4640 "parser.cpp" +#line 4603 "parser.cpp" -#line 862 "parser.ypp" +#line 853 "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 8a85866..893b164 100644 --- a/src/s4/xsk/parser.hpp +++ b/src/s4/xsk/parser.hpp @@ -630,10 +630,7 @@ namespace xsk { namespace gsc { namespace s4 { // "localized string" // "color" // "float" - // "int" - // "octal int" - // "binary int" - // "hexadecimal int" + // "integer" char dummy69[sizeof (std::string)]; }; @@ -780,19 +777,16 @@ namespace xsk { namespace gsc { namespace s4 { ISTRING = 94, // "localized string" COLOR = 95, // "color" FLOAT = 96, // "float" - INT_DEC = 97, // "int" - INT_OCT = 98, // "octal int" - INT_BIN = 99, // "binary int" - INT_HEX = 100, // "hexadecimal int" - ADD_ARRAY = 101, // ADD_ARRAY - THEN = 102, // THEN - TERN = 103, // TERN - NEG = 104, // NEG - ANIMREF = 105, // ANIMREF - PREINC = 106, // PREINC - PREDEC = 107, // PREDEC - POSTINC = 108, // POSTINC - POSTDEC = 109 // POSTDEC + INTEGER = 97, // "integer" + ADD_ARRAY = 98, // ADD_ARRAY + THEN = 99, // THEN + TERN = 100, // TERN + NEG = 101, // NEG + ANIMREF = 102, // ANIMREF + PREINC = 103, // PREINC + PREDEC = 104, // PREDEC + POSTINC = 105, // POSTINC + POSTDEC = 106 // POSTDEC }; /// Backward compatibility alias (Bison 3.6). typedef token_kind_type yytokentype; @@ -809,7 +803,7 @@ namespace xsk { namespace gsc { namespace s4 { { enum symbol_kind_type { - YYNTOKENS = 110, ///< Number of tokens. + YYNTOKENS = 107, ///< Number of tokens. S_YYEMPTY = -2, S_YYEOF = 0, // "end of file" S_YYerror = 1, // error @@ -908,102 +902,99 @@ namespace xsk { namespace gsc { namespace s4 { S_ISTRING = 94, // "localized string" S_COLOR = 95, // "color" S_FLOAT = 96, // "float" - S_INT_DEC = 97, // "int" - S_INT_OCT = 98, // "octal int" - S_INT_BIN = 99, // "binary int" - S_INT_HEX = 100, // "hexadecimal int" - S_ADD_ARRAY = 101, // ADD_ARRAY - S_THEN = 102, // THEN - S_TERN = 103, // TERN - S_NEG = 104, // NEG - S_ANIMREF = 105, // ANIMREF - S_PREINC = 106, // PREINC - S_PREDEC = 107, // PREDEC - S_POSTINC = 108, // POSTINC - S_POSTDEC = 109, // POSTDEC - S_YYACCEPT = 110, // $accept - S_root = 111, // root - S_program = 112, // program - S_inline = 113, // inline - S_include = 114, // include - S_declaration = 115, // declaration - S_decl_usingtree = 116, // decl_usingtree - S_decl_constant = 117, // decl_constant - S_decl_thread = 118, // decl_thread - S_stmt = 119, // stmt - S_stmt_dev = 120, // stmt_dev - S_stmt_block = 121, // stmt_block - S_stmt_list = 122, // stmt_list - S_stmt_expr = 123, // stmt_expr - S_stmt_call = 124, // stmt_call - S_stmt_assign = 125, // stmt_assign - S_stmt_endon = 126, // stmt_endon - S_stmt_notify = 127, // stmt_notify - S_stmt_wait = 128, // stmt_wait - S_stmt_waittill = 129, // stmt_waittill - S_stmt_waittillmatch = 130, // stmt_waittillmatch - S_stmt_waittillframeend = 131, // stmt_waittillframeend - S_stmt_waitframe = 132, // stmt_waitframe - S_stmt_if = 133, // stmt_if - S_stmt_ifelse = 134, // stmt_ifelse - S_stmt_while = 135, // stmt_while - S_stmt_dowhile = 136, // stmt_dowhile - S_stmt_for = 137, // stmt_for - S_stmt_foreach = 138, // stmt_foreach - S_stmt_switch = 139, // stmt_switch - S_stmt_case = 140, // stmt_case - S_stmt_default = 141, // stmt_default - S_stmt_break = 142, // stmt_break - S_stmt_continue = 143, // stmt_continue - S_stmt_return = 144, // stmt_return - S_stmt_breakpoint = 145, // stmt_breakpoint - S_stmt_prof_begin = 146, // stmt_prof_begin - S_stmt_prof_end = 147, // stmt_prof_end - S_expr = 148, // expr - S_expr_or_empty = 149, // expr_or_empty - S_expr_assign = 150, // expr_assign - S_expr_increment = 151, // expr_increment - S_expr_decrement = 152, // expr_decrement - S_expr_ternary = 153, // expr_ternary - S_expr_binary = 154, // expr_binary - S_expr_primitive = 155, // expr_primitive - S_expr_complement = 156, // expr_complement - S_expr_not = 157, // expr_not - S_expr_call = 158, // expr_call - S_expr_method = 159, // expr_method - S_expr_function = 160, // expr_function - S_expr_pointer = 161, // expr_pointer - S_expr_add_array = 162, // expr_add_array - S_expr_parameters = 163, // expr_parameters - S_expr_arguments = 164, // expr_arguments - S_expr_arguments_no_empty = 165, // expr_arguments_no_empty - S_expr_isdefined = 166, // expr_isdefined - S_expr_istrue = 167, // expr_istrue - 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 + S_INTEGER = 97, // "integer" + S_ADD_ARRAY = 98, // ADD_ARRAY + S_THEN = 99, // THEN + S_TERN = 100, // TERN + S_NEG = 101, // NEG + S_ANIMREF = 102, // ANIMREF + S_PREINC = 103, // PREINC + S_PREDEC = 104, // PREDEC + S_POSTINC = 105, // POSTINC + S_POSTDEC = 106, // POSTDEC + S_YYACCEPT = 107, // $accept + S_root = 108, // root + S_program = 109, // program + S_inline = 110, // inline + S_include = 111, // include + S_declaration = 112, // declaration + S_decl_usingtree = 113, // decl_usingtree + S_decl_constant = 114, // decl_constant + S_decl_thread = 115, // decl_thread + S_stmt = 116, // stmt + S_stmt_dev = 117, // stmt_dev + S_stmt_block = 118, // stmt_block + S_stmt_list = 119, // stmt_list + S_stmt_expr = 120, // stmt_expr + S_stmt_call = 121, // stmt_call + S_stmt_assign = 122, // stmt_assign + S_stmt_endon = 123, // stmt_endon + S_stmt_notify = 124, // stmt_notify + S_stmt_wait = 125, // stmt_wait + S_stmt_waittill = 126, // stmt_waittill + S_stmt_waittillmatch = 127, // stmt_waittillmatch + S_stmt_waittillframeend = 128, // stmt_waittillframeend + S_stmt_waitframe = 129, // stmt_waitframe + S_stmt_if = 130, // stmt_if + S_stmt_ifelse = 131, // stmt_ifelse + S_stmt_while = 132, // stmt_while + S_stmt_dowhile = 133, // stmt_dowhile + S_stmt_for = 134, // stmt_for + S_stmt_foreach = 135, // stmt_foreach + S_stmt_switch = 136, // stmt_switch + S_stmt_case = 137, // stmt_case + S_stmt_default = 138, // stmt_default + S_stmt_break = 139, // stmt_break + S_stmt_continue = 140, // stmt_continue + S_stmt_return = 141, // stmt_return + S_stmt_breakpoint = 142, // stmt_breakpoint + S_stmt_prof_begin = 143, // stmt_prof_begin + S_stmt_prof_end = 144, // stmt_prof_end + S_expr = 145, // expr + S_expr_or_empty = 146, // expr_or_empty + S_expr_assign = 147, // expr_assign + S_expr_increment = 148, // expr_increment + S_expr_decrement = 149, // expr_decrement + S_expr_ternary = 150, // expr_ternary + S_expr_binary = 151, // expr_binary + S_expr_primitive = 152, // expr_primitive + S_expr_complement = 153, // expr_complement + S_expr_not = 154, // expr_not + S_expr_call = 155, // expr_call + S_expr_method = 156, // expr_method + S_expr_function = 157, // expr_function + S_expr_pointer = 158, // expr_pointer + S_expr_add_array = 159, // expr_add_array + S_expr_parameters = 160, // expr_parameters + S_expr_arguments = 161, // expr_arguments + S_expr_arguments_no_empty = 162, // expr_arguments_no_empty + S_expr_isdefined = 163, // expr_isdefined + S_expr_istrue = 164, // expr_istrue + S_expr_reference = 165, // expr_reference + S_expr_array = 166, // expr_array + S_expr_field = 167, // expr_field + S_expr_size = 168, // expr_size + S_expr_paren = 169, // expr_paren + S_expr_object = 170, // expr_object + S_expr_thisthread = 171, // expr_thisthread + S_expr_empty_array = 172, // expr_empty_array + S_expr_undefined = 173, // expr_undefined + S_expr_game = 174, // expr_game + S_expr_self = 175, // expr_self + S_expr_anim = 176, // expr_anim + S_expr_level = 177, // expr_level + S_expr_animation = 178, // expr_animation + S_expr_animtree = 179, // expr_animtree + S_expr_identifier = 180, // expr_identifier + S_expr_path = 181, // expr_path + S_expr_istring = 182, // expr_istring + S_expr_string = 183, // expr_string + S_expr_color = 184, // expr_color + S_expr_vector = 185, // expr_vector + S_expr_float = 186, // expr_float + S_expr_integer = 187, // expr_integer + S_expr_false = 188, // expr_false + S_expr_true = 189 // expr_true }; }; @@ -1330,10 +1321,7 @@ namespace xsk { namespace gsc { namespace s4 { case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (std::move (that.value)); break; @@ -2638,10 +2626,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.template destroy< std::string > (); break; @@ -2751,7 +2736,7 @@ switch (yykind) : super_type(token_type (tok), v, l) #endif { - S4_ASSERT ((token::PATH <= tok && tok <= token::INT_HEX)); + S4_ASSERT ((token::PATH <= tok && tok <= token::INTEGER)); } }; @@ -4259,61 +4244,16 @@ switch (yykind) #if 201103L <= YY_CPLUSPLUS static symbol_type - make_INT_DEC (std::string v, location_type l) + make_INTEGER (std::string v, location_type l) { - return symbol_type (token::INT_DEC, std::move (v), std::move (l)); + return symbol_type (token::INTEGER, std::move (v), std::move (l)); } #else static symbol_type - make_INT_DEC (const std::string& v, const location_type& l) + make_INTEGER (const std::string& v, const location_type& l) { - return symbol_type (token::INT_DEC, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_OCT (std::string v, location_type l) - { - return symbol_type (token::INT_OCT, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_OCT (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_OCT, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_BIN (std::string v, location_type l) - { - return symbol_type (token::INT_BIN, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_BIN (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_BIN, v, l); - } -#endif -#if 201103L <= YY_CPLUSPLUS - static - symbol_type - make_INT_HEX (std::string v, location_type l) - { - return symbol_type (token::INT_HEX, std::move (v), std::move (l)); - } -#else - static - symbol_type - make_INT_HEX (const std::string& v, const location_type& l) - { - return symbol_type (token::INT_HEX, v, l); + return symbol_type (token::INTEGER, v, l); } #endif #if 201103L <= YY_CPLUSPLUS @@ -5114,10 +5054,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.copy< std::string > (YY_MOVE (that.value)); break; @@ -5440,10 +5377,7 @@ switch (yykind) case symbol_kind::S_ISTRING: // "localized string" case symbol_kind::S_COLOR: // "color" case symbol_kind::S_FLOAT: // "float" - case symbol_kind::S_INT_DEC: // "int" - case symbol_kind::S_INT_OCT: // "octal int" - case symbol_kind::S_INT_BIN: // "binary int" - case symbol_kind::S_INT_HEX: // "hexadecimal int" + case symbol_kind::S_INTEGER: // "integer" value.move< std::string > (YY_MOVE (s.value)); break; @@ -5510,7 +5444,7 @@ switch (yykind) #line 13 "parser.ypp" } } } // xsk::gsc::s4 -#line 5514 "parser.hpp" +#line 5448 "parser.hpp" diff --git a/src/s4/xsk/resolver.cpp b/src/s4/xsk/resolver.cpp index c27c40c..5d61c9b 100644 --- a/src/s4/xsk/resolver.cpp +++ b/src/s4/xsk/resolver.cpp @@ -9,16 +9,16 @@ namespace xsk::gsc::s4 { -std::unordered_map opcode_map; -std::unordered_map function_map; -std::unordered_map method_map; -std::unordered_map file_map; -std::unordered_map token_map; -std::unordered_map opcode_map_rev; -std::unordered_map function_map_rev; -std::unordered_map method_map_rev; -std::unordered_map file_map_rev; -std::unordered_map token_map_rev; +std::unordered_map opcode_map; +std::unordered_map function_map; +std::unordered_map method_map; +std::unordered_map file_map; +std::unordered_map token_map; +std::unordered_map opcode_map_rev; +std::unordered_map function_map_rev; +std::unordered_map method_map_rev; +std::unordered_map file_map_rev; +std::unordered_map token_map_rev; auto resolver::opcode_id(const std::string& name) -> std::uint8_t { @@ -38,7 +38,7 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string if (itr != opcode_map.end()) { - return itr->second; + return std::string(itr->second); } throw error(utils::string::va("Couldn't resolve opcode name for id '0x%hhX'!", id)); @@ -46,6 +46,11 @@ auto resolver::opcode_name(std::uint8_t id) -> std::string auto resolver::function_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_func_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -62,15 +67,19 @@ auto resolver::function_name(std::uint16_t id) -> std::string if (itr != function_map.end()) { - return itr->second; + return std::string(itr->second); } return utils::string::va("_func_%04X", id); -// throw error(utils::string::va("Couldn't resolve builtin function name for id '%i'!", id)); } auto resolver::method_id(const std::string& name) -> std::uint16_t { + if(name.starts_with("_meth_")) + { + return std::stoul(name.substr(6), nullptr, 16); + } + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -87,15 +96,19 @@ auto resolver::method_name(std::uint16_t id) -> std::string if (itr != method_map.end()) { - return itr->second; + return std::string(itr->second); } return utils::string::va("_meth_%04X", id); -// throw error(utils::string::va("Couldn't resolve builtin method name for id '%i'!", id)); } auto resolver::file_id(const std::string& name) -> std::uint32_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = file_map_rev.find(name); if (itr != file_map_rev.end()) @@ -112,14 +125,19 @@ auto resolver::file_name(std::uint32_t id) -> std::string if (itr != file_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::token_id(const std::string& name) -> std::uint32_t { + if(name.starts_with("_id_")) + { + return std::stoul(name.substr(4), nullptr, 16); + } + const auto itr = token_map_rev.find(name); if (itr != token_map_rev.end()) @@ -136,14 +154,16 @@ auto resolver::token_name(std::uint32_t id) -> std::string if (itr != token_map.end()) { - return itr->second; + return std::string(itr->second); } - return utils::string::va("_ID%i", id); + return utils::string::va("_id_%04X", id); } auto resolver::find_function(const std::string& name) -> bool { + if(name.starts_with("_func_")) return true; + const auto itr = function_map_rev.find(name); if (itr != function_map_rev.end()) @@ -156,6 +176,8 @@ auto resolver::find_function(const std::string& name) -> bool auto resolver::find_method(const std::string& name) -> bool { + if(name.starts_with("_meth_")) return true; + const auto itr = method_map_rev.find(name); if (itr != method_map_rev.end()) @@ -166,224 +188,242 @@ auto resolver::find_method(const std::string& name) -> bool return false; } -const std::array opcode_list +auto resolver::make_token(std::string_view str) -> std::string +{ + if(str.starts_with("_id_") || str.starts_with("_func_") || str.starts_with("_meth_")) + { + return std::string(str); + } + + auto data = std::string(str.begin(), str.end()); + + for (std::size_t i = 0; i < data.size(); i++) + { + data[i] = std::tolower(str[i]); + if (data[i] == '\\') data[i] = '/'; + } + + return data; +} + +const std::array, 190> opcode_list {{ - { std::uint8_t(opcode::OP_CastFieldObject), "CAST_FIELD_OBJECT" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached), "SET_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_plus), "PLUS" }, - { std::uint8_t(opcode::OP_RemoveLocalVariables), "REMOVE_LOCAL_VARIABLES" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariableRef), "EVAL_SELF_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ScriptFarMethodChildThreadCall), "SCRIPT_FAR_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetGameRef), "GET_GAME_REF" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariable), "EVAL_ANIM_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariableRef), "EVAL_LEVEL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_GetThisthread), "GET_THISTHREAD" }, - { std::uint8_t(opcode::OP_greater), "GREATER" }, - { std::uint8_t(opcode::OP_waittillmatch), "WAITTILLMATCH" }, - { std::uint8_t(opcode::OP_shift_right), "SHIFT_RIGHT" }, - { std::uint8_t(opcode::OP_dec), "DECREMENT" }, - { std::uint8_t(opcode::OP_JumpOnTrue), "JUMP_ON_TRUE" }, - { std::uint8_t(opcode::OP_bit_or), "BIT_OR" }, - { std::uint8_t(opcode::OP_equality), "EQUALITY" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached0), "CLEAR_LOCAL_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_notify), "NOTIFY" }, - { std::uint8_t(opcode::OP_GetVector), "GET_VECTOR" }, - { std::uint8_t(opcode::OP_ScriptMethodChildThreadCallPointer), "SCRIPT_METHOD_CHILD_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_PreScriptCall), "PRE_SCRIPT_CALL" }, - { std::uint8_t(opcode::OP_GetByte), "GET_BYTE" }, - { std::uint8_t(opcode::OP_ScriptFarThreadCall), "SCRIPT_FAR_THREAD_CALL" }, - { std::uint8_t(opcode::OP_SetSelfFieldVariableField), "SET_SELF_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_JumpOnFalseExpr), "JUMP_ON_FALSE_EXPR" }, - { std::uint8_t(opcode::OP_GetUndefined), "GET_UNDEFINED" }, - { std::uint8_t(opcode::OP_jumpback), "JUMP_BACK" }, - { std::uint8_t(opcode::OP_JumpOnTrueExpr), "JUMP_ON_TRUE_EXPR" }, - { std::uint8_t(opcode::OP_CallBuiltin0),"CALL_BUILTIN_FUNC_0" }, - { std::uint8_t(opcode::OP_CallBuiltin1),"CALL_BUILTIN_FUNC_1" }, - { std::uint8_t(opcode::OP_CallBuiltin2),"CALL_BUILTIN_FUNC_2" }, - { std::uint8_t(opcode::OP_CallBuiltin3),"CALL_BUILTIN_FUNC_3" }, - { std::uint8_t(opcode::OP_CallBuiltin4),"CALL_BUILTIN_FUNC_4" }, - { std::uint8_t(opcode::OP_CallBuiltin5),"CALL_BUILTIN_FUNC_5" }, - { std::uint8_t(opcode::OP_CallBuiltin),"CALL_BUILTIN_FUNC" }, - { std::uint8_t(opcode::OP_SetLocalVariableFieldCached0), "SET_LOCAL_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_ClearFieldVariable), "CLEAR_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_GetLevel), "GET_LEVEL" }, - { std::uint8_t(opcode::OP_size), "SIZE" }, - { std::uint8_t(opcode::OP_SafeSetWaittillVariableFieldCached), "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodThreadCall), "SCRIPT_LOCAL_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_AddArray), "ADD_ARRAY" }, - { std::uint8_t(opcode::OP_endon), "ENDON" }, - { std::uint8_t(opcode::OP_EvalFieldVariable), "EVAL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_shift_left), "SHIFT_LEFT" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached0), "EVAL_LOCAL_ARRAY_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_Return), "RETURN" }, - { std::uint8_t(opcode::OP_CreateLocalVariable), "CREATE_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached0), "SAFE_SET_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_GetBuiltinFunction), "GET_BUILTIN_FUNCTION" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodCall), "SCRIPT_LOCAL_METHOD_CALL" }, - { std::uint8_t(opcode::OP_CallBuiltinMethodPointer), "CALL_BUILTIN_METHOD_POINTER" }, - { std::uint8_t(opcode::OP_ScriptLocalChildThreadCall), "SCRIPT_LOCAL_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetSelfObject), "GET_SELF_OBJECT" }, - { std::uint8_t(opcode::OP_GetGame), "GET_GAME" }, - { std::uint8_t(opcode::OP_SetLevelFieldVariableField), "SET_LEVEL_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_EvalArray), "EVAL_ARRAY" }, - { std::uint8_t(opcode::OP_GetSelf), "GET_SELF" }, - { std::uint8_t(opcode::OP_End), "END" }, - { std::uint8_t(opcode::OP_EvalSelfFieldVariable), "EVAL_SELF_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_less_equal), "LESS_EQUAL" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached0), "EVAL_LOCAL_VARIABLE_CACHED_0" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached1), "EVAL_LOCAL_VARIABLE_CACHED_1" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached2), "EVAL_LOCAL_VARIABLE_CACHED_2" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached3), "EVAL_LOCAL_VARIABLE_CACHED_3" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached4), "EVAL_LOCAL_VARIABLE_CACHED_4" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached5), "EVAL_LOCAL_VARIABLE_CACHED_5" }, - { std::uint8_t(opcode::OP_EvalLocalVariableCached), "EVAL_LOCAL_VARIABLE_CACHED" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0), "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_ScriptChildThreadCallPointer), "SCRIPT_CHILD_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_EvalLocalVariableObjectCached), "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, - { std::uint8_t(opcode::OP_ScriptLocalThreadCall), "SCRIPT_LOCAL_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetInteger), "GET_INTEGER" }, - { std::uint8_t(opcode::OP_ScriptMethodCallPointer), "SCRIPT_METHOD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_checkclearparams), "CHECK_CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_SetAnimFieldVariableField), "SET_ANIM_FIELD_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_waittillmatch2), "WAITTILLMATCH2" }, - { std::uint8_t(opcode::OP_minus), "MINUS" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall2), "SCRIPT_LOCAL_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_GetNegUnsignedShort), "GET_NEG_USHORT" }, - { std::uint8_t(opcode::OP_GetNegByte), "GET_NEG_BYTE" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached), "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_greater_equal), "GREATER_EQUAL" }, - { std::uint8_t(opcode::OP_vector), "VECTOR" }, - { std::uint8_t(opcode::OP_GetBuiltinMethod), "GET_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_endswitch), "END_SWITCH" }, - { std::uint8_t(opcode::OP_ClearArray), "CLEAR_ARRAY" }, - { std::uint8_t(opcode::OP_DecTop), "DECREMENT_TOP" }, - { std::uint8_t(opcode::OP_CastBool), "CAST_BOOL" }, - { std::uint8_t(opcode::OP_EvalArrayRef), "EVAL_ARRAY_REF" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0), "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0" }, - { std::uint8_t(opcode::OP_GetZero), "GET_ZERO" }, - { std::uint8_t(opcode::OP_wait), "WAIT" }, - { std::uint8_t(opcode::OP_waittill), "WAITTILL" }, - { std::uint8_t(opcode::OP_GetIString), "GET_ISTRING" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall), "SCRIPT_FAR_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_GetAnimObject), "GET_ANIM_OBJECT" }, - { std::uint8_t(opcode::OP_GetAnimTree), "GET_ANIMTREE" }, - { std::uint8_t(opcode::OP_EvalLocalArrayCached), "EVAL_LOCAL_ARRAY_CACHED" }, - { std::uint8_t(opcode::OP_mod), "MOD" }, - { std::uint8_t(opcode::OP_ScriptFarMethodThreadCall), "SCRIPT_FAR_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_GetUnsignedShort), "GET_USHORT" }, - { std::uint8_t(opcode::OP_clearparams), "CLEAR_PARAMS" }, - { std::uint8_t(opcode::OP_ScriptMethodThreadCallPointer), "SCRIPT_METHOD_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_ScriptFunctionCallPointer), "SCRIPT_FUNCTION_CALL_POINTER" }, - { std::uint8_t(opcode::OP_EmptyArray), "EMPTY_ARRAY" }, - { std::uint8_t(opcode::OP_SafeSetVariableFieldCached), "SAFE_SET_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_ClearVariableField), "CLEAR_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_EvalFieldVariableRef), "EVAL_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_ScriptLocalMethodChildThreadCall), "SCRIPT_LOCAL_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_EvalNewLocalVariableRefCached0), "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_GetFloat), "GET_FLOAT" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached), "EVAL_LOCAL_VARIABLE_REF_CACHED" }, - { std::uint8_t(opcode::OP_JumpOnFalse), "JUMP_ON_FALSE" }, - { std::uint8_t(opcode::OP_BoolComplement), "BOOL_COMPLEMENT" }, - { std::uint8_t(opcode::OP_ScriptThreadCallPointer), "SCRIPT_THREAD_CALL_POINTER" }, - { std::uint8_t(opcode::OP_ScriptFarFunctionCall2), "SCRIPT_FAR_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_less), "LESS" }, - { std::uint8_t(opcode::OP_BoolNot), "BOOL_NOT" }, - { std::uint8_t(opcode::OP_waittillFrameEnd), "WAITTILLFRAMEEND" }, - { std::uint8_t(opcode::OP_waitframe), "WAITFRAME" }, - { std::uint8_t(opcode::OP_GetString), "GET_STRING" }, - { std::uint8_t(opcode::OP_EvalLevelFieldVariable), "EVAL_LEVEL_FIELD_VARIABLE" }, - { std::uint8_t(opcode::OP_GetLevelObject), "GET_LEVEL_OBJECT" }, - { std::uint8_t(opcode::OP_inc), "INCREMENT" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod0),"CALL_BUILTIN_METHOD_0" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod1),"CALL_BUILTIN_METHOD_1" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod2),"CALL_BUILTIN_METHOD_2" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod3),"CALL_BUILTIN_METHOD_3" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod4),"CALL_BUILTIN_METHOD_4" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod5),"CALL_BUILTIN_METHOD_5" }, - { std::uint8_t(opcode::OP_CallBuiltinMethod),"CALL_BUILTIN_METHOD" }, - { std::uint8_t(opcode::OP_GetAnim), "GET_ANIM" }, - { std::uint8_t(opcode::OP_switch), "SWITCH" }, - { std::uint8_t(opcode::OP_SetVariableField), "SET_VARIABLE_FIELD" }, - { std::uint8_t(opcode::OP_divide), "DIV" }, - { std::uint8_t(opcode::OP_GetLocalFunction), "GET_LOCAL_FUNCTION" }, - { std::uint8_t(opcode::OP_ScriptFarChildThreadCall), "SCRIPT_FAR_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_multiply), "MUL" }, - { std::uint8_t(opcode::OP_ClearLocalVariableFieldCached), "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, - { std::uint8_t(opcode::OP_EvalAnimFieldVariableRef), "EVAL_ANIM_FIELD_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_EvalLocalArrayRefCached), "EVAL_LOCAL_ARRAY_REF_CACHED" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRefCached0), "EVAL_LOCAL_VARIABLE_REF_CACHED_0" }, - { std::uint8_t(opcode::OP_bit_and), "BIT_AND" }, - { std::uint8_t(opcode::OP_GetAnimation), "GET_ANIMATION" }, - { std::uint8_t(opcode::OP_GetFarFunction), "GET_FAR_FUNCTION" }, - { std::uint8_t(opcode::OP_CallBuiltinPointer), "CALL_BUILTIN_POINTER" }, - { std::uint8_t(opcode::OP_jump), "JUMP" }, - { std::uint8_t(opcode::OP_voidCodepos), "VOIDCODEPOS" }, - { std::uint8_t(opcode::OP_ScriptFarMethodCall), "SCRIPT_FAR_METHOD_CALL" }, - { std::uint8_t(opcode::OP_inequality), "INEQUALITY" }, - { std::uint8_t(opcode::OP_ScriptLocalFunctionCall), "SCRIPT_LOCAL_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_bit_ex_or), "BIT_EXOR" }, - { std::uint8_t(opcode::OP_NOP), "NOP" }, - { std::uint8_t(opcode::OP_abort), "ABORT" }, - { std::uint8_t(opcode::OP_object), "OBJECT" }, - { std::uint8_t(opcode::OP_thread_object), "THREAD_OBJECT" }, - { std::uint8_t(opcode::OP_EvalLocalVariable), "EVAL_LOCAL_VARIABLE" }, - { std::uint8_t(opcode::OP_EvalLocalVariableRef), "EVAL_LOCAL_VARIABLE_REF" }, - { std::uint8_t(opcode::OP_prof_begin), "PROF_BEGIN" }, - { std::uint8_t(opcode::OP_prof_end), "PROF_END" }, - { std::uint8_t(opcode::OP_breakpoint), "BREAKPOINT" }, - { std::uint8_t(opcode::OP_assignmentBreakpoint), "ASSIGN_BREAKPOINT" }, - { std::uint8_t(opcode::OP_manualAndAssignmentBreakpoint), "MANUAL_AND_ASSIGN_BREAKPOINT" }, - { std::uint8_t(opcode::OP_BoolNotAfterAnd), "BOOL_NOT_AFTER_AND" }, - { std::uint8_t(opcode::OP_FormalParams), "FORMAL_PARAMS" }, - { std::uint8_t(opcode::OP_IsDefined), "IS_DEFINED" }, - { std::uint8_t(opcode::OP_IsTrue), "IS_TRUE" }, - { std::uint8_t(opcode::OP_NativeGetLocalFunction), "NATIVE_GET_LOCAL_FUNCTION" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionCall), "NATIVE_LOCAL_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionCall2), "NATIVE_LOCAL_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_NativeLocalMethodCall), "NATIVE_LOCAL_METHOD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionThreadCall), "NATIVE_LOCAL_FUNCTION_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalMethodThreadCall), "NATIVE_LOCAL_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalFunctionChildThreadCall), "NATIVE_LOCAL_FUNCTION_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeLocalMethodChildThreadCall), "NATIVE_LOCAL_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeGetFarFunction), "NATIVE_GET_FAR_FUNCTION" }, - { std::uint8_t(opcode::OP_NativeFarFunctionCall), "NATIVE_FAR_FUNCTION_CALL" }, - { std::uint8_t(opcode::OP_NativeFarFunctionCall2), "NATIVE_FAR_FUNCTION_CALL2" }, - { std::uint8_t(opcode::OP_NativeFarMethodCall), "NATIVE_FAR_METHOD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarFunctionThreadCall), "NATIVE_FAR_FUNCTION_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarMethodThreadCall), "NATIVE_FAR_METHOD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarFunctionChildThreadCall), "NATIVE_FAR_FUNCTION_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_NativeFarMethodChildThreadCall), "NATIVE_FAR_METHOD_CHILD_THREAD_CALL" }, - { std::uint8_t(opcode::OP_EvalNewLocalArrayRefCached0_Precompiled), "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0_PRECOMPILED" }, - { std::uint8_t(opcode::OP_SetNewLocalVariableFieldCached0_Precompiled), "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0_PRECOMPILED" }, - { std::uint8_t(opcode::OP_CreateLocalVariable_Precompiled), "CREATE_LOCAL_VARIABLE_PRECOMPILED" }, - { std::uint8_t(opcode::OP_SafeCreateVariableFieldCached_Precompiled), "SAFE_CREATE_VARIABLE_FIELD_CACHED_PRECOMPILED" }, - { std::uint8_t(opcode::OP_FormalParams_Precompiled), "FORMAL_PARAMS_PRECOMPILED" }, + { 0x00, "CAST_FIELD_OBJECT" }, + { 0x01, "SET_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x02, "PLUS" }, + { 0x03, "REMOVE_LOCAL_VARIABLES" }, + { 0x04, "EVAL_SELF_FIELD_VARIABLE_REF" }, + { 0x05, "SCRIPT_FAR_METHOD_CHILD_THREAD_CALL" }, + { 0x06, "GET_GAME_REF" }, + { 0x07, "EVAL_ANIM_FIELD_VARIABLE" }, + { 0x08, "EVAL_LEVEL_FIELD_VARIABLE_REF" }, + { 0x09, "GET_THISTHREAD" }, + { 0x0A, "GREATER" }, + { 0x0B, "WAITTILLMATCH" }, + { 0x0C, "SHIFT_RIGHT" }, + { 0x0D, "DECREMENT" }, + { 0x0E, "JUMP_ON_TRUE" }, + { 0x0F, "BIT_OR" }, + { 0x10, "EQUALITY" }, + { 0x11, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED_0" }, + { 0x12, "NOTIFY" }, + { 0x13, "GET_VECTOR" }, + { 0x14, "SCRIPT_METHOD_CHILD_THREAD_CALL_POINTER" }, + { 0x15, "PRE_SCRIPT_CALL" }, + { 0x16, "GET_BYTE" }, + { 0x17, "SCRIPT_FAR_THREAD_CALL" }, + { 0x18, "SET_SELF_FIELD_VARIABLE_FIELD" }, + { 0x19, "JUMP_ON_FALSE_EXPR" }, + { 0x1A, "GET_UNDEFINED" }, + { 0x1B, "JUMP_BACK" }, + { 0x1C, "JUMP_ON_TRUE_EXPR" }, + { 0x1D, "CALL_BUILTIN_FUNC_0" }, + { 0x1E, "CALL_BUILTIN_FUNC_1" }, + { 0x1F, "CALL_BUILTIN_FUNC_2" }, + { 0x20, "CALL_BUILTIN_FUNC_3" }, + { 0x21, "CALL_BUILTIN_FUNC_4" }, + { 0x22, "CALL_BUILTIN_FUNC_5" }, + { 0x23, "CALL_BUILTIN_FUNC" }, + { 0x24, "SET_LOCAL_VARIABLE_FIELD_CACHED_0" }, + { 0x25, "CLEAR_FIELD_VARIABLE" }, + { 0x26, "GET_LEVEL" }, + { 0x27, "SIZE" }, + { 0x28, "SAFE_SET_WAITTILL_VARIABLE_FIELD_CACHED" }, + { 0x29, "SCRIPT_LOCAL_METHOD_THREAD_CALL" }, + { 0x2A, "ADD_ARRAY" }, + { 0x2B, "ENDON" }, + { 0x2C, "EVAL_FIELD_VARIABLE" }, + { 0x2D, "SHIFT_LEFT" }, + { 0x2E, "EVAL_LOCAL_ARRAY_REF_CACHED_0" }, + { 0x2F, "RETURN" }, + { 0x30, "CREATE_LOCAL_VARIABLE" }, + { 0x31, "SAFE_SET_VARIABLE_FIELD_CACHED_0" }, + { 0x32, "GET_BUILTIN_FUNCTION" }, + { 0x33, "SCRIPT_LOCAL_METHOD_CALL" }, + { 0x34, "CALL_BUILTIN_METHOD_POINTER" }, + { 0x35, "SCRIPT_LOCAL_CHILD_THREAD_CALL" }, + { 0x36, "GET_SELF_OBJECT" }, + { 0x37, "GET_GAME" }, + { 0x38, "SET_LEVEL_FIELD_VARIABLE_FIELD" }, + { 0x39, "EVAL_ARRAY" }, + { 0x3A, "GET_SELF" }, + { 0x3B, "END" }, + { 0x3C, "EVAL_SELF_FIELD_VARIABLE" }, + { 0x3D, "LESS_EQUAL" }, + { 0x3E, "EVAL_LOCAL_VARIABLE_CACHED_0" }, + { 0x3F, "EVAL_LOCAL_VARIABLE_CACHED_1" }, + { 0x40, "EVAL_LOCAL_VARIABLE_CACHED_2" }, + { 0x41, "EVAL_LOCAL_VARIABLE_CACHED_3" }, + { 0x42, "EVAL_LOCAL_VARIABLE_CACHED_4" }, + { 0x43, "EVAL_LOCAL_VARIABLE_CACHED_5" }, + { 0x44, "EVAL_LOCAL_VARIABLE_CACHED" }, + { 0x45, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0" }, + { 0x46, "SCRIPT_CHILD_THREAD_CALL_POINTER" }, + { 0x47, "EVAL_LOCAL_VARIABLE_OBJECT_CACHED" }, + { 0x48, "SCRIPT_LOCAL_THREAD_CALL" }, + { 0x49, "GET_INTEGER" }, + { 0x4A, "SCRIPT_METHOD_CALL_POINTER" }, + { 0x4B, "CHECK_CLEAR_PARAMS" }, + { 0x4C, "SET_ANIM_FIELD_VARIABLE_FIELD" }, + { 0x4D, "WAITTILLMATCH2" }, + { 0x4E, "MINUS" }, + { 0x4F, "SCRIPT_LOCAL_FUNCTION_CALL2" }, + { 0x50, "GET_NEG_USHORT" }, + { 0x51, "GET_NEG_BYTE" }, + { 0x52, "SAFE_CREATE_VARIABLE_FIELD_CACHED" }, + { 0x53, "GREATER_EQUAL" }, + { 0x54, "VECTOR" }, + { 0x55, "GET_BUILTIN_METHOD" }, + { 0x56, "END_SWITCH" }, + { 0x57, "CLEAR_ARRAY" }, + { 0x58, "DECREMENT_TOP" }, + { 0x59, "CAST_BOOL" }, + { 0x5A, "EVAL_ARRAY_REF" }, + { 0x5B, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0" }, + { 0x5C, "GET_ZERO" }, + { 0x5D, "WAIT" }, + { 0x5E, "WAITTILL" }, + { 0x5F, "GET_ISTRING" }, + { 0x60, "SCRIPT_FAR_FUNCTION_CALL" }, + { 0x61, "GET_ANIM_OBJECT" }, + { 0x62, "GET_ANIMTREE" }, + { 0x63, "EVAL_LOCAL_ARRAY_CACHED" }, + { 0x64, "MOD" }, + { 0x65, "SCRIPT_FAR_METHOD_THREAD_CALL" }, + { 0x66, "GET_USHORT" }, + { 0x67, "CLEAR_PARAMS" }, + { 0x68, "SCRIPT_METHOD_THREAD_CALL_POINTER" }, + { 0x69, "SCRIPT_FUNCTION_CALL_POINTER" }, + { 0x6A, "EMPTY_ARRAY" }, + { 0x6B, "SAFE_SET_VARIABLE_FIELD_CACHED" }, + { 0x6C, "CLEAR_VARIABLE_FIELD" }, + { 0x6D, "EVAL_FIELD_VARIABLE_REF" }, + { 0x6E, "SCRIPT_LOCAL_METHOD_CHILD_THREAD_CALL" }, + { 0x6F, "EVAL_NEW_LOCAL_VARIABLE_REF_CACHED_0" }, + { 0x70, "GET_FLOAT" }, + { 0x71, "EVAL_LOCAL_VARIABLE_REF_CACHED" }, + { 0x72, "JUMP_ON_FALSE" }, + { 0x73, "BOOL_COMPLEMENT" }, + { 0x74, "SCRIPT_THREAD_CALL_POINTER" }, + { 0x75, "SCRIPT_FAR_FUNCTION_CALL2" }, + { 0x76, "LESS" }, + { 0x77, "BOOL_NOT" }, + { 0x78, "WAITTILLFRAMEEND" }, + { 0x79, "WAITFRAME" }, + { 0x7A, "GET_STRING" }, + { 0x7B, "EVAL_LEVEL_FIELD_VARIABLE" }, + { 0x7C, "GET_LEVEL_OBJECT" }, + { 0x7D, "INCREMENT" }, + { 0x7E, "CALL_BUILTIN_METHOD_0" }, + { 0x7F, "CALL_BUILTIN_METHOD_1" }, + { 0x80, "CALL_BUILTIN_METHOD_2" }, + { 0x81, "CALL_BUILTIN_METHOD_3" }, + { 0x82, "CALL_BUILTIN_METHOD_4" }, + { 0x83, "CALL_BUILTIN_METHOD_5" }, + { 0x84, "CALL_BUILTIN_METHOD" }, + { 0x85, "GET_ANIM" }, + { 0x86, "SWITCH" }, + { 0x87, "SET_VARIABLE_FIELD" }, + { 0x88, "DIV" }, + { 0x89, "GET_LOCAL_FUNCTION" }, + { 0x8A, "SCRIPT_FAR_CHILD_THREAD_CALL" }, + { 0x8B, "MUL" }, + { 0x8C, "CLEAR_LOCAL_VARIABLE_FIELD_CACHED" }, + { 0x8D, "EVAL_ANIM_FIELD_VARIABLE_REF" }, + { 0x8E, "EVAL_LOCAL_ARRAY_REF_CACHED" }, + { 0x8F, "EVAL_LOCAL_VARIABLE_REF_CACHED_0" }, + { 0x90, "BIT_AND" }, + { 0x91, "GET_ANIMATION" }, + { 0x92, "GET_FAR_FUNCTION" }, + { 0x93, "CALL_BUILTIN_POINTER" }, + { 0x94, "JUMP" }, + { 0x95, "VOIDCODEPOS" }, + { 0x96, "SCRIPT_FAR_METHOD_CALL" }, + { 0x97, "INEQUALITY" }, + { 0x98, "SCRIPT_LOCAL_FUNCTION_CALL" }, + { 0x99, "BIT_EXOR" }, + { 0x9A, "NOP" }, + { 0x9B, "ABORT" }, + { 0x9C, "OBJECT" }, + { 0x9D, "THREAD_OBJECT" }, + { 0x9E, "EVAL_LOCAL_VARIABLE" }, + { 0x9F, "EVAL_LOCAL_VARIABLE_REF" }, + { 0xA0, "PROF_BEGIN" }, + { 0xA1, "PROF_END" }, + { 0xA2, "BREAKPOINT" }, + { 0xA3, "ASSIGN_BREAKPOINT" }, + { 0xA4, "MANUAL_AND_ASSIGN_BREAKPOINT" }, + { 0xA5, "BOOL_NOT_AFTER_AND" }, + { 0xA6, "FORMAL_PARAMS" }, + { 0xA7, "IS_DEFINED" }, + { 0xA8, "IS_TRUE" }, + { 0xA9, "NATIVE_GET_LOCAL_FUNCTION" }, + { 0xAA, "NATIVE_LOCAL_FUNCTION_CALL" }, + { 0xAB, "NATIVE_LOCAL_FUNCTION_CALL2" }, + { 0xAC, "NATIVE_LOCAL_METHOD_CALL" }, + { 0xAD, "NATIVE_LOCAL_FUNCTION_THREAD_CALL" }, + { 0xAE, "NATIVE_LOCAL_METHOD_THREAD_CALL" }, + { 0xAF, "NATIVE_LOCAL_FUNCTION_CHILD_THREAD_CALL" }, + { 0xB0, "NATIVE_LOCAL_METHOD_CHILD_THREAD_CALL" }, + { 0xB1, "NATIVE_GET_FAR_FUNCTION" }, + { 0xB2, "NATIVE_FAR_FUNCTION_CALL" }, + { 0xB3, "NATIVE_FAR_FUNCTION_CALL2" }, + { 0xB4, "NATIVE_FAR_METHOD_CALL" }, + { 0xB5, "NATIVE_FAR_FUNCTION_THREAD_CALL" }, + { 0xB6, "NATIVE_FAR_METHOD_THREAD_CALL" }, + { 0xB7, "NATIVE_FAR_FUNCTION_CHILD_THREAD_CALL" }, + { 0xB8, "NATIVE_FAR_METHOD_CHILD_THREAD_CALL" }, + { 0xB9, "EVAL_NEW_LOCAL_ARRAY_REF_CACHED_0_PRECOMPILED" }, + { 0xBA, "SET_NEW_LOCAL_VARIABLE_FIELD_CACHED_0_PRECOMPILED" }, + { 0xBB, "CREATE_LOCAL_VARIABLE_PRECOMPILED" }, + { 0xBC, "SAFE_CREATE_VARIABLE_FIELD_CACHED_PRECOMPILED" }, + { 0xBD, "FORMAL_PARAMS_PRECOMPILED" }, }}; -const std::array function_list +const std::array, 4> function_list {{ { 0x08F, "getdvar" }, { 0x09B, "getfirstarraykey" }, { 0x0B1, "getnextarraykey" }, { 0x126, "isusingmatchrulesdata" }, }}; -const std::array method_list +const std::array, 1> method_list {{ { 0x0, "null" }, }}; -const std::array file_list +const std::array, 1> file_list {{ { 0x0, "null" }, }}; -const std::array token_list +const std::array, 5> token_list {{ - { 0x00, "" }, // VOID - { 0x01, "pl#" }, // PL - { 0x02, "-" }, // MINUS -// { 0x03, "" }, // RADIUS_TYPO - { 0x04, ":" }, // NOTE_COLON + { 0x00, "" }, + { 0x01, "pl#" }, + { 0x02, "-" }, + { 0x03, "radius`" }, + { 0x04, "note:" }, }}; struct __init__ @@ -407,32 +447,32 @@ struct __init__ for(const auto& entry : opcode_list) { - opcode_map.insert({ entry.key, entry.value }); - opcode_map_rev.insert({ entry.value, entry.key }); + opcode_map.insert({ entry.first, entry.second }); + opcode_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : function_list) { - function_map.insert({ entry.key, entry.value }); - function_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + function_map.insert({ entry.first, entry.second }); + function_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : method_list) { - method_map.insert({ entry.key, entry.value }); - method_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + method_map.insert({ entry.first, entry.second }); + method_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : file_list) { - file_map.insert({ entry.key, entry.value }); - file_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + file_map.insert({ entry.first, entry.second }); + file_map_rev.insert({ entry.second, entry.first }); } for(const auto& entry : token_list) { - token_map.insert({ entry.key, entry.value }); - token_map_rev.insert({ utils::string::to_lower(entry.value), entry.key }); + token_map.insert({ entry.first, entry.second }); + token_map_rev.insert({ entry.second, entry.first }); } } }; diff --git a/src/s4/xsk/resolver.hpp b/src/s4/xsk/resolver.hpp index 1f53985..15c92a0 100644 --- a/src/s4/xsk/resolver.hpp +++ b/src/s4/xsk/resolver.hpp @@ -28,6 +28,8 @@ public: static auto find_function(const std::string& name) -> bool; static auto find_method(const std::string& name) -> bool; + + static auto make_token(std::string_view str) -> std::string; }; } // namespace xsk::gsc::s4 diff --git a/src/s4/xsk/s4.hpp b/src/s4/xsk/s4.hpp index f4e96ce..690c64b 100644 --- a/src/s4/xsk/s4.hpp +++ b/src/s4/xsk/s4.hpp @@ -16,6 +16,8 @@ namespace xsk::gsc::s4 { +constexpr std::uint32_t max_string_id = 0x110F3; + enum class opcode : std::uint8_t { OP_CastFieldObject = 0x0, diff --git a/src/tool/xsk/main.cpp b/src/tool/xsk/main.cpp index 770c8cb..853fca1 100644 --- a/src/tool/xsk/main.cpp +++ b/src/tool/xsk/main.cpp @@ -23,24 +23,24 @@ enum class encd { __, SOURCE, ASSEMBLY, BINARY }; enum class mode { __, ASM, DISASM, COMP, DECOMP }; enum class game { __, IW5, IW6, IW7, IW8, S1, S2, S4, H1, H2 }; -const std::map exts = -{ +const std::map exts = +{ { ".gsc", encd::SOURCE }, { ".gscasm", encd::ASSEMBLY }, { ".cgsc", encd::BINARY }, { ".gscbin", encd::BINARY }, }; -const std::map modes = -{ +const std::map modes = +{ { "asm", mode::ASM }, { "disasm", mode::DISASM }, { "comp", mode::COMP }, { "decomp", mode::DECOMP }, }; -const std::map games = -{ +const std::map games = +{ { "iw5", game::IW5 }, { "iw6", game::IW6 }, { "iw7", game::IW7 }, @@ -52,8 +52,8 @@ const std::map games = { "h2", game::H2 }, }; -const std::map encds = -{ +const std::map encds = +{ { mode::ASM , encd::ASSEMBLY }, { mode::DISASM, encd::BINARY }, { mode::COMP, encd::SOURCE }, @@ -128,7 +128,7 @@ void assemble_file(game game, std::string file) const auto& assembler = assemblers[game]; const auto ext = std::string(".gscasm"); const auto extpos = file.find(ext); - + if (extpos != std::string::npos) { file.replace(extpos, ext.length(), ""); @@ -207,7 +207,7 @@ void disassemble_file(game game, std::string file) const auto ext = std::string(".gscbin"); const auto extpos = file.find(ext); - + if (extpos != std::string::npos) { file.replace(extpos, ext.length(), ""); @@ -251,7 +251,7 @@ void disassemble_file(game game, std::string file) catch (const std::exception& e) { std::cerr << e.what() << '\n'; - } + } } void compile_file(game game, std::string file) @@ -262,7 +262,7 @@ void compile_file(game game, std::string file) const auto& compiler = compilers[game]; const auto ext = std::string(".gsc"); const auto extpos = file.find(ext); - + if (extpos != std::string::npos) { file.replace(extpos, ext.length(), ""); @@ -414,7 +414,7 @@ void execute(mode mode, game game, const std::string& path) { funcs[mode](game, entry.path().string()); } - } + } } } else if (std::filesystem::is_regular_file(path)) @@ -469,9 +469,9 @@ int parse_flags(int argc, char** argv, game& game, mode& mode, std::string& path void print_usage() { std::cout << "usage: gsc-tool.exe \n"; - std::cout << " * modes: asm, disasm, comp, decomp\n"; - std::cout << " * games: iw5, iw6, iw7, iw8, s1, s2, s4, h1, h2\n"; - std::cout << " * paths: file or directory (recursive)\n"; + std::cout << "\t* modes: asm, disasm, comp, decomp\n"; + std::cout << "\t* games: iw5, iw6, iw7, iw8, s1, s2, s4, h1, h2\n"; + std::cout << "\t* paths: file or directory (recursive)\n"; } std::uint32_t main(std::uint32_t argc, char** argv) diff --git a/src/utils/xsk/gsc/asset.cpp b/src/utils/xsk/gsc/asset.cpp index 4e21452..08364e1 100644 --- a/src/utils/xsk/gsc/asset.cpp +++ b/src/utils/xsk/gsc/asset.cpp @@ -16,7 +16,7 @@ auto asset::serialize() -> std::vector std::memset(data.data(), 0, data.size()); auto pos = 0u; - + std::memcpy(&data[pos], name.data(), name.size() + 1); pos += name.size() + 1; diff --git a/src/utils/xsk/gsc/block.cpp b/src/utils/xsk/gsc/block.cpp index c1d50da..77c492f 100644 --- a/src/utils/xsk/gsc/block.cpp +++ b/src/utils/xsk/gsc/block.cpp @@ -30,10 +30,10 @@ void block::transfer(const block::ptr& child) auto& v = child->local_vars; if (pos > std::int32_t(i)) std::rotate(v.rend() - pos - 1, v.rend() - pos, v.rend() - i); - else + else std::rotate(v.begin() + pos, v.begin() + pos + 1, v.begin() + i + 1); child->local_vars.at(i).init = this->local_vars.at(i).init; - + if (child->local_vars_public_count <= i) child->local_vars_public_count++; } @@ -83,7 +83,7 @@ void block::merge(const std::vector& childs) { if (childs.size() == 0) return; - for (std::size_t childidx = 0; childidx < childs.size(); childidx++ ) + for (std::size_t childidx = 0; childidx < childs.size(); childidx++) { auto child = childs[childidx]; @@ -93,7 +93,7 @@ void block::merge(const std::vector& childs) auto& name = this->local_vars.at(i).name; auto pos = child->find_variable(i, name); - + if (pos < 0) { child->local_vars.insert(child->local_vars.begin() + i, this->local_vars.at(i)); diff --git a/src/utils/xsk/gsc/block.hpp b/src/utils/xsk/gsc/block.hpp index a81e64f..f6b37d0 100644 --- a/src/utils/xsk/gsc/block.hpp +++ b/src/utils/xsk/gsc/block.hpp @@ -28,7 +28,7 @@ struct block abort_t abort; bool is_last; - block(); + block(); void transfer(const block::ptr& child); void copy(const block::ptr& child); void append(const std::vector& childs); diff --git a/src/utils/xsk/gsc/interfaces/decompiler.hpp b/src/utils/xsk/gsc/interfaces/decompiler.hpp index 85e2243..938d127 100644 --- a/src/utils/xsk/gsc/interfaces/decompiler.hpp +++ b/src/utils/xsk/gsc/interfaces/decompiler.hpp @@ -7,7 +7,7 @@ namespace xsk::gsc { - + class decompiler { public: diff --git a/src/utils/xsk/gsc/nodetree.cpp b/src/utils/xsk/gsc/nodetree.cpp index d7d5554..ebcd14c 100644 --- a/src/utils/xsk/gsc/nodetree.cpp +++ b/src/utils/xsk/gsc/nodetree.cpp @@ -75,7 +75,7 @@ auto node::is_binary() -> bool case kind::expr_div: case kind::expr_mod: return true; - default: + default: return false; } } @@ -326,7 +326,7 @@ stmt_call::stmt_call(const location& loc, ast::expr expr) : node(kind::stmt_call stmt_assign::stmt_assign(ast::expr expr) : node(kind::stmt_assign), expr(std::move(expr)) {} stmt_assign::stmt_assign(const location& loc, ast::expr expr) : node(kind::stmt_assign, loc), expr(std::move(expr)) {} - + stmt_endon::stmt_endon(expr obj, expr event) : node(kind::stmt_endon), obj(std::move(obj)), event(std::move(event)) {} stmt_endon::stmt_endon(const location& loc, expr obj, expr event) : node(kind::stmt_endon, loc), obj(std::move(obj)), event(std::move(event)) {} @@ -503,7 +503,7 @@ auto expr_istring::print() const -> std::string auto expr_path::print() const -> std::string { - return value; + return utils::string::backslash(value); } auto expr_identifier::print() const -> std::string @@ -630,7 +630,7 @@ auto expr_pointer::print() const -> std::string data += "call "; else if (mode == call::mode::thread) data += "thread "; - else if (mode == call::mode::childthread) + else if (mode == call::mode::childthread) data += "childthread "; return data += "[[ "s + func.print() + " ]](" + args->print() + ")"; @@ -642,7 +642,7 @@ auto expr_function::print() const -> std::string if (mode == call::mode::thread) data += "thread "; - else if (mode == call::mode::childthread) + else if (mode == call::mode::childthread) data += "childthread "; if (path->value != "") @@ -903,7 +903,7 @@ auto stmt_endon::print() const -> std::string auto stmt_notify::print() const -> std::string { if (args->list.size() == 0) - return obj.print() + " notify( " + event.print() + " );"; + return obj.print() + " notify( " + event.print() + " );"; else return obj.print() + " notify( " + event.print() + ", " + args->print() + " );"; }; @@ -956,7 +956,7 @@ auto stmt_if::print() const -> std::string data += indented(indent_) + stmt.print(); indent_ -= 4; } - + return data; }; @@ -995,7 +995,7 @@ auto stmt_ifelse::print() const -> std::string indent_ -= 4; } } - + return data; }; @@ -1092,9 +1092,9 @@ auto stmt_foreach::print() const -> std::string std::string data; data += "foreach ( "; - + if (use_key) data += key_expr.print() + ", "; - + data += value_expr.print() + " in " + array_expr.print() + " )\n"; if (stmt == kind::stmt_list) diff --git a/src/utils/xsk/gsc/nodetree.hpp b/src/utils/xsk/gsc/nodetree.hpp index 1d31fa7..92c7e0c 100644 --- a/src/utils/xsk/gsc/nodetree.hpp +++ b/src/utils/xsk/gsc/nodetree.hpp @@ -460,7 +460,7 @@ public: protected: static std::uint32_t indent_; static void reset_indentation(); - static std::string indented(std::uint32_t indent); + static std::string indented(std::uint32_t indent); }; struct expr_true : public node diff --git a/src/utils/xsk/gsc/types.hpp b/src/utils/xsk/gsc/types.hpp index f883103..c950b26 100644 --- a/src/utils/xsk/gsc/types.hpp +++ b/src/utils/xsk/gsc/types.hpp @@ -10,8 +10,8 @@ namespace xsk::gsc enum class build { - dev, - prod, + dev, + prod, }; enum class abort_t @@ -83,22 +83,4 @@ struct function function() : index(0), size(0), id(0) {} }; -struct pair_8C -{ - std::uint8_t key; - const char* value; -}; - -struct pair_16C -{ - std::uint16_t key; - const char* value; -}; - -struct pair_32C -{ - std::uint32_t key; - const char* value; -}; - } // namespace xsk::gsc diff --git a/src/utils/xsk/utils/byte_buffer.cpp b/src/utils/xsk/utils/byte_buffer.cpp index 36b7ae6..8b31e68 100644 --- a/src/utils/xsk/utils/byte_buffer.cpp +++ b/src/utils/xsk/utils/byte_buffer.cpp @@ -79,7 +79,7 @@ auto byte_buffer::read_c_string() -> std::string auto byte_buffer::print_bytes(std::size_t pos, std::size_t count) -> std::string { std::string shit; - + for (auto i = pos; i < pos + count; i++) { shit += utils::string::va("%s %02X", shit.data(), (*reinterpret_cast(data_.data() + i))); diff --git a/src/utils/xsk/utils/compression.cpp b/src/utils/xsk/utils/compression.cpp index ead276d..3458224 100644 --- a/src/utils/xsk/utils/compression.cpp +++ b/src/utils/xsk/utils/compression.cpp @@ -17,11 +17,11 @@ auto zlib::compress(const std::vector& data) -> std::vector(output.data()), &length, reinterpret_cast(data.data()), static_cast(data.size()), Z_BEST_COMPRESSION); - + if (result != Z_OK) return {}; output.resize(length); - + return output; }